Hi Rin,
Sorry for failing to notify you about the code changes. Yeah we modify the code to accomodate flash file embedding.
Here's the step-by-step tutorial on how to do the splash tab.
1.)
Include the required javascript file in your HTML header.
- Code: Select all
<script type="text/javascript" src="http://www.unl.edu/ucomm/templatedependents/templatesharedcode/scripts/splash.js"></script>
2.)
Declared the javascript function as follow:- Code: Select all
var displayNum = 5; //number of tabs to display
var xmlURL = 'http://www.unl.edu/ucomm/splash/story.xml'; //your xml file (absolute url please)
addLoadEvent(function() {
randomSplashContent();
});
Change the variable displayNum value to the number of tabs you want to use. In the splash page case, it's 5 tabs.
Another things about the new implementation is that the whole data structure is formatted into an xml file, which you will need to point to as a value for the variable xmlURL.
3.)
Place this html codes to the area within your HTML body tags where you want the splash tab to be displayed.- Code: Select all
<div id="splash_top"></div>
<div id="tabs3">
<ul id="splashtab">
<li style="display:none;"><noscript>Javascript is required.</noscript></li>
</ul>
</div>
Let me explain a little bit about how the xml file is formatted. Below are the xml source for UNL's splash page:
- Code: Select all
<random>
<story>
<name>
Dummy nodes to counter random number generator zero bug
</name>
<permalink>
Dummy nodes to counter random number generator zero bug
</permalink>
</story>
<story>
<name>Steve</name>
<permalink>http://www.unl.edu/ucomm/splash/story/story1.htm</permalink>
</story>
<story>
<name>Michael</name>
<permalink>http://www.unl.edu/ucomm/splash/story/story2.htm</permalink>
</story>
</random>
To add a new story/content, we create the 'story' parent node. Inside the parent node, we have two child nodes - the name and permalink nodes. The name nodes specify the text you want to appear on the tab while the permalink points to the page content itself.
Bear in mind that the first story node is added for you for 2 reasons - as a tutorial and to counter a nasty javascript random function bug. You can start by writing the second node. So in all, if you want to have 3 feature stories, then you should have four 'story' parent nodes (3 + 1 dummy nodes).
All the story nodes are then wrapped by a supernode called 'random'.
Let me know if there's anything that needs more clarification.