Subscribe by Email

Your email:

Current Articles | RSS Feed RSS Feed

XInet WebNative Suite adds HTML, MP3 and enhanced SWF support.

Posted by Kenny Kirsch on Mon, Jun 14, 2010 @ 10:19 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

There are a lot of chocies for DAM [Digital Asset Management] out there and many of them do a good job with specific features. The reality is - Xinet indexes files like no other DAM does. It's ingestion engine is fast and powerful and gives users the ability to share, repupose and distribute files from any standard web browser.

Xinet has been slow to add many new 'digital' formats to it's list of previewable file types – until recently. With Xinet's Video 4 module you get a lot of the new formats and it does a great job with HTML (see image above).

If you own Xinet already - it's a no brainer. If you don't it's still worth a look. I was very impressed with how quickly it displayed HTML previews and made them browsable and searchable in seconds. 

1 Comments Click here to read/write comments

What's Your Favorite Trigger Action in WebNative Venture

Posted by Robert Sullivan on Thu, Apr 15, 2010 @ 09:15 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 
 
I just got back from a road trip to a new client site. Training is getting so much more
involved as the programs have more and more built in functionality. Xinet always 
seems to have multiple ways to accomplish whatever your task might be. The jump
to Suite 16 is big, and aside from the newer version of MySQL ( It's version 5 now )
and all that new power, we now have a combined web GUI for FullPress, 
WebNative and Venture.

We're expanding training classes to include several more exercises within each 
application for a more 'hands-on' experience during training. It's true of learning any
new skill, the more you can touch it, the easier it will be to remember later on in
real world situations. We're creating challenges that have more than one way to resolve
and the trainees can use any means available to them to complete the assignment.

I'm finding that there are favorites as far as Trigger Actions. Mine use to be the
'setdatafield' Action. As of last week my new favorite Action is the
'inherit-parent-metadata'
Xinet has a sample of it on their web site and it's proving to be very cool. So I'd like to
do a very unscientific mini survey. You can answer here with comments or email
me directly.
What is your most used Trigger Action in Venture. And...
is there something you "want" in an Action.
Please let me know.

-Sully
 

0 Comments Click here to read/write comments

2010 and Apple Inc.

Posted by Brian Dolan on Mon, Jan 04, 2010 @ 06:12 PM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 
Tags: , ,

Happy New Year all!

 

Since we all work on Macs in some way shape or form, I thought I’d talk a bit about Apple Inc. to start the year.  As a company, Apply is as strong as it has ever been and looks to continue to dominate the consumer market with new desktop & laptop computers, phones and other personal gadgets that are designed to make our lives easier.  Is the Apple tablet computer coming soon???  Hmmm, we'll see!  On the enterprise side, I think Apple did the right thing by dropping the Xserve Raid and continuing to upgrade the Xserve itself.  The Xserve is one of the most popular servers we help integrate into our customers sites especially with small to medium sized Xinet installs as it performs well in those areas.  I think Apple will continue to grow and refine it's Xserve product over time mostly because the server version of Mac OS X is fairly straight forward to maintain by an IT professional compared with other systems.  That's not to say it's super easy to maintain the Mac OS, just a little more "mac" like with buttons to enable a service versus editing a config file in a text editor for example.  You know what I mean right!?!?

 

On another note, MacWorld this year normally would fall on the second week in January but has been moved to mid-February this year.  Why?  Well for one reason, Apple as a company is not going to be exibiting at this years MW and the Consumer Electronics show in Vegas has always been on the same week as MW.  So, IDG (the people organizing MW and plenty of other trade shows) decided to move it out to February.  I for one am happy since there is no "overshadowing" of either show now and . . . I've never been to San Francisco in February!  Yeah, probably not much different than going in January but it'll be something different, I guess....  So, what will Macworld be like without Apple???  My guess is a litte smaller, a little less hype, and less people but, MW lives (for now any way).  Some people say this one will be the last.  I have no clue if that is the case but what I can say is that Apple fans of all types will still be there and even if there is no MacWorld 2011, there still will be passion for a company that makes gadgets intended to make our lives easier.  I'd even bet that there will be more Apple fans next year but I can't say for sure because my crystal ball is not working right now.  It runs on Vista! :)

 

Look for a new blog entry after MacWorld as I will report on what I find while out there.  For now, Happy New Year and may 2010 be the best year so far!

 

Oh and one more thing, if you or anyone in your company plans on attending MacWorld, drop me a line so we can discuss Xinet's new Suite 16 upgrade over an Irish Coffee or whatever adult beverage you prefer!

 

Brian Dolan

<bdolan@napc.com>

0 Comments Click here to read/write comments

IE6: Time To Let It Go

Posted by Kai McBride on Wed, Oct 21, 2009 @ 10:38 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

A collective groan fills our room of developers at NAPC. Another Internet Explorer 6 (IE6) incompatibility with one our products has been uncovered. The preferred solution is to quit IE6, take a deep breath, and launch a different browser. Unfortunately, for a number of our customers this is not yet an option and we are faced with the challenge of trying to make an old dog (circa 2001) ignore a new trick.

In the late 90s, developing interactive websites required you to choose sides between Netscape Navigator and Internet Explorer. Each offered its own subset of exciting new features that were guaranteed to not work on the other. If you strayed from anything but the most standard HTML tags one of the browsers would fail miserably. Many stale and boring (but functional !!!) websites were born. This was also the era where all colors were picked from the limited "Web-Safe" palette to avoid dithering.   

Thanks to the adoption of standards for HTML and JavaScript, common rendering engines, and Cascading Style Sheets (CSS) most of these show-stopper browser incompatibility issues have gone away, leaving fewer magical incantations that the Web 2.0 developer needs to keep in their toolbox. The majority of these workarounds, unfortunately, have to do with IE6. A quick look at the style sheet for NAPC's Elegant for Xinet Portal reveals a number of hacks to fool IE6 into doing the right thing:

# Ignores the html>body line
hr.mainhr {  top: 120px;  }
html>body hr.mainhr { top: 115px; }

# Ignores the pseudo-commented line
input.btn{ width: 150px; }
/* commented backslash hack v2 \*/
input.btn{ width: 156px; }
/*end hack */


These examples are minor tweaks that take into account differences in the box model used by IE6. More serious issues arise from bugs with CSS v2, ignoring transparency in PNG files, and differences in traversing the HTML Document Object Model. The latter usually results in a breakdown of the friendlier Web 2.0 AJAX features.

And the developers groan.

We are aware that Internet Explorer 6 still commands a significant market share on corporate PCs, and wherever possible we do try and maintain some level of functionality on IE6. However, our products use a great deal of Web 2.0 technology to provide sophisticated interfaces and cutting edge design and IE6 is incapable of keeping up. To be fair, it isn't as bad as IE5 on the Mac was !

With the exciting HTML 5 spec around the corner a number of big players on the web (ex: Facebook, YouTube, Digg) are actively encouraging their users to upgrade or switch browsers. So are we.

2 Comments Click here to read/write comments

Staying Current on Support

Posted by Robert Sullivan on Tue, Oct 13, 2009 @ 10:28 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

I ride dirt bikes and recently incurred a 700 dollar repair bill on my sons bike.
What? What was the cause of this? It's a two stroke motocross and the engine had
seized up, which is not all that unusual, but we had done a new top-end not all that
long ago. So why had it blown again so early?

The 'real mechanic' I brought it to explained that pump gas has changed drastically
from what the engine was designed to run on. But the bike is only four years old..!
Pump gas these days is going Greener with at lease 10% ethanol or more, and is so
oxygenated that it burns hotter, expanding the rings tighter around the piston...
you get the idea. Ring-ding-a-ding, goes to bwop-bwooooop... silence.

As back yard mechanics working on dirt bike engines we hadn't done anything wrong with
our top-end. The gas we run had changed and we didn't ever realize the consequences.

I had an issue last week that drove home the importance of staying current
with system wide support. My customer was having difficulty with XMP metadata
that was not showing up in Venture. This was for XMP fields that were working
correctly not that long ago. Venture syncs were also not showing the field values
either. The first instinctive question is "what changed?" And the answer is
"we're not doing anything differently." Like me with my dirt bike.

Xinet engineering had me activate fpod vlog per a specific tech note which will
create a special output file. Copy on a questionable file again and watch for it to
show up in the log. Verify that the XMP data is not showing in the browser and then
run the syncxmp command in debug mode to capture what the sync is actually doing,
or having issues with. Verify if the data still doesn't show up and send the logs and
sample file in to them for analysis.
They came back with a new syncxmp binary file to slip in, and this was the resolution
to the problem.

I inquired with Xinet engineering about the 'why' and 'how' questions having to do with
the metadata not showing up in Venture. Xinet replied that from their perspective,
the issue had to do with a non-compatible file: specifically,  the jpeg image that I
had sent, which caused syncxmp to fail with these errors:

syncxmp(87535) malloc: *** error for object 0x512060: Non-aligned pointer being freed (2)
syncxmp(87535) malloc: *** error for object 0x512390: double free

Now this error is gobbly-gouk to me. I would have thought a pointer being freed was
a good thing, but I'm not a code writing engineer for several reasons, which is why I
have a very defined escalation path.

The way they "fixed" this was to test my sample file against a newer build of syncxmp,
from the new Suite 16 code, which incorporates some newer XMP libraries provided by Adobe.
In short, the newer Adobe libraries resolved the issue.

So as far as my customer was concerned, they were "not doing anything differently"
But apparently Adobe was. The problem came from the fact that Adobe doesn't stand
still. Ever! They continue to evolve and improve their XMP libraries and those
changes were not recognized by the Xinet version my customer was running.
This is the intrinsic value of having support. We were able to update to a newer
binary to stay current with the ever changing world.

So even though you may not be doing anything different... Change Happens!
My dirt bike solution is to run race gas. The world keeps changing around us without our
consent or input and will not wait for us to adapt or catch up. The leading edge is really
not all that far ahead. But by falling behind, the distance becomes huge and costly.
So stay current with good support.
And if you ride dirt bikes, check your gas.

-Sully

1 Comments Click here to read/write comments

Portal v3 - Markups and Annotations on your assets

Posted by Brian Dolan on Wed, Oct 07, 2009 @ 07:51 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

Now that version 3 of Portal is out, the markup and annotations feature is available to those that upgrade.  Now, that doesn't mean go out and install it immediately people!  Always make sure to contact NAPC first before any upgrades and ya know what, we're here to install it for you any way!  So, back to my point.

Portal 3, annotations & markups, yeah that's right!.  It's a very cool feature that deserves it's own min-blog.

Let's make this easy . . . the notes below come directly from Xinet's release notes of Portal v3:

"WebNative Portal 3.0, in conjunction with WebNative 16.0, allows on-line annotations of all images, documents, and videos. A palette allows users to add text, boxes, stamps, or sketches, and all of the annotations can be done in black or a range of colors. When adding annotations, the preview can be magnified for closer inspection. Individual annotations may be saved (with or without comments), deleted, or temporarily hidden from view. The annotations are stored in the Venture database, so any other WebNative user may access saved annotations via mview in Portal but the annotations are not saved to the file on the file system."

If you'd like to see a demo of this, please contact your Account Manager so we can arrange a quick demo.  Just another reason to get Portal or upgrade to the latest version!

0 Comments Click here to read/write comments

Who's On My Portal Server?

Posted by Sean Kenny on Thu, Oct 01, 2009 @ 12:37 PM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

 

Sometimes it would be nice to know who is actively logged into your Xinet Portal Server. Unfortunately there is not a current tool offered to retrieve this information...until now!

Using a simple php script it's actually possible to scrape the current php sessions that have been created and obtain a list of users that have active php sessions in Portal.

A little background on this....

On Portal servers php stores it session data inside of th session directory /tmp, this is specified by the session.save_path ini variable. All session files start with the prefix "sess_". Inside of a session file you will find a plethora of serialized text data, that php is managing with its session functions. Although this serialized information is highly unreadable, is is still possible to pick some key data out of it, without needing to go through a deserialization process.

So basically for each user logged in via Portal, a corresponding session file will be created inside of the /tmp directory. Contained within this file will be useful information including the username. So at this point all we need to to is create a php script that will read all the php session files located on the server and displays the count of usernames that it finds!

php code that does this looks like the following:

<?php

//create an empty array to house our users in
$users = array();


//loop through all of the sesssion files found in the php session temporary directory
foreach(glob('/tmp/sess_*') as $session_file){

    //get the contents of the sessions as a string
    $session_data = file_get_contents($session_file);
    
    //with a regex mine out the username contained within the session data
    preg_match('/USERNAME.*?"(.*?)";/', $session_data, $matches);

   //get the matched pattern out of the first grouping of the pattern
    $session_user = $matches[1];

   //if the found value is not empty then create the key for the array and/or increment the user count (users can be logged in multiple times)
    if ($session_user) $users[$session_user]++;
  }

//now that we have done the heavy lifting proceed to display the result with a simple foreach iteration over the users array that we have populated...

?>

<H1>Active Portal User Sessions</H1>

<UL>

<?php foreach($users as $username=>$count): ?>
<LI><?= $username ?>(<?= $count ?>)</LI>
<?php endforeach; ?>

</UL>

If You install this php code on your Portal Server you would get the following output.


 

This successfully displays all users currently logged into the Portal server.

As you can see, inspecting php sessions is a very useful technique for finding Xinet Portal user information, and using this technique it is possible to provide enhanced user tracking functionality.

1 Comments Click here to read/write comments

Xinet Suite-16 Has A Sweet Interface

Posted by Robert Sullivan on Fri, Jul 17, 2009 @ 10:33 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 
Tags: , , ,
We've been working with Xinet's newest upcoming version release, Suite 16,
and I'm telling you, it is sweet! Aside from the video excitement that Brian talked
about, there are a lot of cool developments in Suite 16.

All of the administration tools from FullPress and WebNative Venture are all in one
web based GUI. The old Java GUI for FullPress will still be available in Suite 16,
but I don't think it will be developed beyond that. Once you get use to the new web
base admin, you'll toss that old interface like yesterdays newspaper anyway.

There are three control bars in the new interface and the top row has six control
categories. You can see in the two screen captures below that as I change the top
row category, the next two rows will change and give you access to all of the pertinent
settings for that selection. It's very well thought out were simple things like the
Volumes/User category also gives you the Venture Permission settings to assign.
 
 

As an administrator I think the "Logging" category is the big boom, no-brainer.
All of the logs that were scattered about before are now under one button. Xinet has
also added some more views to information that users are always asking about.
'Preview Generation' will now show you what is in the pipe line as far as how many files
are being processed. So if a user dumps 25 movie files and 71 images into the system,
you can see the numbers of what is processing, waiting or holding. Helping to take the
guess work out of, what is my system working on.

There's a nice feature for importing any existing custom XMP panels you may have also.
What was a manual process of adding one field at a time is now a batch in the interface.
If you have custom XMP panels within your Adobe programs you can now import them into
the Venture database very easily. Drop your panel in and select which data fields you'd
like in Venture, create it's own Data Field Set on the fly, and even determine which
fields you'd like to be XMP writable. Submit and it's done. All of those custom data
fields are now available to put into your data templates.

There's a lot more in here too. We'll be talking a lot about new features and I'm sure
NAPC will be holding a Webinar or two as the release date draws near. I think when you
see it, you'll agree with me, Xinet Suite 16, is pretty sweet!

-Sully
  

0 Comments Click here to read/write comments

New Video featues in Xinet v16

Posted by Brian Dolan on Fri, Jul 03, 2009 @ 07:29 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

As the Holiday weekend starts up for us all, lets close the week out and chat a bit about all the cool things that are coming to the masses soon.  Xinet is going to be releasing version 16 of it’s suite of tools including a new, faster version of Portal, a unified web interface for all administration, easier tools and setup for PDF Image replacement, greatly enhanced video capabilities, basic web based markup and annotation tools and a whole bunch of other “under the hood” improvements.  Currently, NAPC is testing beta 2 of version 16 and we’re all pretty impressed with it so far.  One of the biggest features I’m excited about is the enhanced video features.  Let me esplain (as Ricky would say).


Xinet, in the new soon to be released version of video in Suite 16, has greatly enhanced how users in Portal interact with video assets.  In the current release of Video 2.0 in Xinet, it is possible to stream many video formats, create keyframes at a preset interval, and really, thats about it.  With the new version, you’ll be able to do much, much more.  First and foremost, the ability to create what I would call mini-reels, is now available as a basket plugin in Portal.  This is how it works:


1)    User logs in to a Portal site and identifies the files they want to work with.  Those files could be video files of various formats, InDesign files, static picture files, just about anything you can have in Xinet.
2)    The user would then add those files to a shopping basket.
3)    Once in the basket, the user would click the basket plugin named “Video Generation”
4)    This brings up a new Web 2.0 type of interface to arrange the assets into whatever order makes sense to the end user.  Asset arrangement is made simple by using drag and drop in a web browser-me likey!
5)    Once in the correct order, the user can set the ‘in and out’ times of the files based on keyframes generated by Xinet or by hours:minutes:seconds.
6)    The user can also set basic fade outs from clip to clip as well.  Gives it a nice touch!
7)    Once the files are arranged in the correct order and the in/out times are set, a new video file can be generated from those assets in either a Quicktime, Windows Media, or Flash format.
8)    The server then generates the appropriate file on the Xinet file system and once done, it gives the end user the ability to download the file to their desktop.

Here's a peek of what it'll look like:

 

This is huge everyone.  Think of it this way, if you have 30 second spots for a client for all of 2008, and they want to create a quick reel of all the ones that won awards (that you made of course!), they can quickly log in to Xinet via Portal, collect the assets, set the times and format and let Xinet make the file for them.  To be clear, this is not intended for broadcast but more for the web or computer screen aka small screen.  I think this is a huge leap forward for Xinet and since I used to work in the broadcast world, it’s pretty exciting for me as you might be able to tell!

On top of that, screen detection for keyframing is also part of the new release.  The current version can be set to sample a keyframe at a set interval say every 5 seconds or so regardless of scene change or not.  That can potentially add a bunch of useless keyframes into your database.  With the new scene detection functionality, you can set the admin preferences so it is “smart” and only creates keyframes when a scene actually changes with tolerance controls.  So, instead of keyframing a movie that is 1 minute long and getting 12 keyframes (when sampled every 5 seconds), you may only get 7 or 8 frames stored in the database. This can be very helpful!

Overall, we have a lot to look forward to with the upcoming release of version 16 of Xinet’s Suite of tools.

Enjoy the weekend all and as always, if you have any questions on any of this information, please give us a ring and we’ll be happy to help!  Want to see this new functionality for yourself???  Give your Account Manager a call and we’ll be happy to show you all the new stuff.

Happy 4th of July!

Brian Dolan

0 Comments Click here to read/write comments

Exploring Portal Template Variable Arrays

Posted by Sean Kenny on Mon, Jun 29, 2009 @ 10:44 AM
Share on Facebook Facebook | Submit to Digg digg it |  Add to delicious  delicious |  Submit to StumbleUpon StumbleUpon |  Share on LinkedIn LinkedIn |  Share On Technorati Technorati | Submit to Reddit reddit 

Portal has a variety of template variable arrays that contain the data used by the HTML template pages for display. When making custom Portal sites it becomes a common need to investigate the data found in these arrays via a PHP print_r statement like the following.

<?php
print "<pre>";
#print_r($_SERVER);
#print_r($_SESSION);
#print_r($volume_info);
#print_r($dir_info);
#print_r($file_info);
#print_r($files_info);
#print_r($keywords_info);
#print_r($tmpl->variables['PORTALPAGE']);
#print_r($links_info);
#print_r($spreads_info);
print "</pre>";
?>

Through using this approach it becomes possible to display Portal’s template variables arrays directly in a web browser, which can be convenient for inspection and debugging. This article expands on alternatives and twists to this standard approach.

Alternative variable display functions

When exploring a variable's contents in PHP var_dump() and var_export() are common alternatives to the print_r() function. Each performs a similar task with a slightly different behavior. var_dump() prints slightly more informative (but less readable) information about the given variable’s data, while var_export() prints interpretable PHP code. The following table illustrates the output differences for these functions.

print_r() var_dump() var_export()
Array
(
[0] => Apples
[1] => Oranges
[2] => Pears
)
array(3) {
[0]=>
string(6) "Apples"
[1]=>
string(7) "Oranges"
[2]=>
string(5) "Pears"
}
array (
0 => 'Apples',
1 => 'Oranges',
2 => 'Pears',
)

Depending on your needs, these standard functions give a good set of options for displaying Portal template variable data for inspection and debugging.

Storing Portal variable information in a variable and/or file

Sometimes it is not always ideal to send Portal’s template variable data to the web browser for inspection and debugging. To help alleviate this issue the print_r() and var_export() functions both accept a second Boolean parameter that, when set as true, causes both of these functions to return a variable’s data from the function call instead of printing it. This allows for capturing a variable’s data in another variable and/or file for later inspection and debugging. The following snippet is an example of such an approach.

<?php
$portal_page = print_r($tmpl->variables['PORTALPAGE'], true);
file_put_contents('/some/directory/var_data.log', $portal_page);
?>

The print_r() function is called with a second parameter set to true. This cause the print_r() function to return the $tmpl->variables['PORTALPAGE’] variable information to the $portal_page variable instead of printing it. The contents of the $portal_page variable are then written to an external log file. This data could then be viewed, searched, and stored at another point in time.

Storing variable information as XML

Using PHP it is also possible to store the portal variable information in your own XML format. This XML data could then be transmitted and interpreted by any type of program geared to help inspection and debugging of Portal’s template variable arrays. The following code example could be placed inside of any one of your site’s local.inc.php files. This code snippet checks known Portal template variables arrays, and inserts their data into a hierarchical XML data structure. This file is then saved as XML on the server in the same directory as the file being executed.

<?php

$var_trees = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

//start the xml var trees hierarchical data structure
$var_trees .= "<var_trees>";

//check the known portal variables. If they exist generate an xml tree of the data
if ($volume_info != NULL) $var_trees .= var_tree('$volume_info', $volume_info);
if ($file_info != NULL) $var_trees .= var_tree('$file_info', $file_info);
if ($files_info != NULL) $var_trees .= var_tree('$files_info', $files_info);
if ($keywords_info != NULL) $var_trees .= var_tree('$keywords_info', $keywords_info);
if ($tmpl->variables['PORTALPAGE'] != NULL) $var_trees .=
var_tree('$tmpl->variables[\'PORTALPAGE\']', $tmpl->variables['PORTALPAGE']);
if ($links_info != NULL) $var_trees .= var_tree('$links_info', $links_info);
if ($spreads_info != NULL) $var_trees .= var_tree('$spreads_info', $spreads_info);
if ($_SERVER != NULL) $var_trees .= var_tree('$_SERVER', $_SERVER);
if ($_SESSION != NULL) $var_trees .= var_tree('$_SESSION', $_SESSION);

//close the xml var_tree hierarchical data structure
$var_trees .= "</var_trees>";

//store the xml data in an external xml file
file_put_contents(dirname(__FILE__).'/var_trees.xml', $var_trees);

//recursive function to generate nested xml data structure for a given variables data
function var_tree($key, $value){
$var_tree = "";
if(is_array($value)){
$var_tree .= "<var_tree label=\"".htmlentities($key)."\" >";
foreach($value as $key => $val){
$var_tree .= var_tree($key, $val);
}
$var_tree .= "</var_tree>";
}else{
$var_tree .= "<var_node label=\"".htmlentities($key)."\" value=\"".htmlentities($value)."\" />";
}
return $var_tree;
}
Creating a variable inspection and debugging tool using XML data

Taking this one step further, you can then utilize this developed XML format to create more advanced debugging tools. One quick example for this is a small Flex application that I quickly developed to interpret the previous example’s generated XML data. This debugger interface is automatically opened in a separate window when any portal template page embeds the {varviewer} template tag, which can be generated in your site’s local.inc.php file using a code snippet similar to the following.

$tmpl->variables['PORTALPAGE']['varviewer'] = 
"<SCRIPT TYPE='text/javascript'>winRef ="+
"window.open( '/VarViewer/templates/varviewer/PortalVariableViewer.html', 'varviewer',"+
"'height=450, width=750'); </SCRIPT>";

View the demo of this application HERE (user: blogdemo/pass: blogdemo). This XML variable debugger application has also been packaged as a House portal site named VarViewer that you can use and experiment with on your own portal server. You can download it HERE. This is a simple example, but illustrates the possibility of developing a more advanced and searchable Portal template variable arrays debugger.

Conclusion

There are a variety of ways to inspect and debug the Portal template variables. Using PHP’s built in variable display functions, and even custom data XML formats allows for a greater degree of flexibility when working with them. In the end these variables are an important to understand when trying to modify and extend Portal’s appearance and functionality, and using these techniques may help you during this learning process.

1 Comments Click here to read/write comments

All Posts | Next Page