« back

Fleb Framework: XML Attributes

Info about multi language usage:
Note the character ”{” in the nodes, for example in description, language, btnLabel etc. This character is used to split the strings into arrays. Throughout the website, the language is referred to as a position number in these arrays. Therefor, the first language you set will be number 0, the second is number 1 and so on. You can have 5 different languages in structure.xml. This should be enough for most cases, if not, you can increase the number in NavigationParser2 (languageCount). If you don't use a ”{”, the same string will be used for all 5 elements in the array.

Overview

The nodes of the XML file looks like this:

<structure>
   <!-- SITE -->
   <site>
      <title/>
      <description/>
      <keywords/>
      <language/>
      <contentfolders/>
      <bgcolor/>
      <flashversion/>
   </site>
   <!-- PRELOAD FILES TO CACHE -->
   <preload_cache>
      <data/>
   </preload_cache>
   <!-- NAVIGATION SETTINGS -->
   <navigation_settings>
      <setSuspendAfterInit/>
      <setFade/>
      <setFadeInOnMouseOver/>
      <setFadeInDepth/>
      <setFadeOutTimerDelay/>
      <setFadeInChainDelay/>
      <setKeepRolloverStatus/>
      <setAlwaysHideChildren/>
      <setBtnLabelTextNewLine/>
      <setBtnDepths/>
      <setAutoActivateDelay/>
   </navigation_settings>
   <!-- NAVIGATION -->
   <navigation>
      <button>
         <data/>
         <yournode/>
      </button>
   </navigation>
</structure>

site

title

<title>Demo-Flebsite</title>
  • The browser window title of the website.

description

<description>This website is a pure flash website, or short: a flebsite!{Dies ist eine reine flash website, oder einfacher: eine flebsite!</description>
  • Description used for SEO.

keywords

<keywords>flash,website framework,cms</keywords>
  • Keywords used as metatags for SEO.

language

<language id="en{de">english{deutsch</language>
  • The attribute “id” is used for the address bar. For example: http://www.flashcmsframework.com/flebsitedemo/#/en/service/. As you can see, the language is english, because of “en” in the url.
    Important: Always use 2 characters (no more, no less) for the language (like “en”, “de”, “fr”, “it” etc.).

contentfolders

<contentfolders src="content_source" swf="content_swf"/>
  • The place where you have you content in. If you like to have all files in the root folder, just set the attributes (src and swf) to blank. If you want to have a different folder per language, just use the ”{” character for the language split (described above).
  • content_source is the place to store php and xml files (the data sources), while content_swf contains your page.swf files.

bgcolor

<bgcolor>FFFFFF</bgcolor>
  • The background color which will be used in index.php nd base.swf

flashversion

<flashversion>9.0.124</flashversion>
  • The required Flashversion. The reason why this is set in structure.xml is that you don't have to touch index.php.

preload cache

data

<data file="mainBtn.swf" bytes="63351"/>
<data file="images/b1africanl001.jpg" bytes="16384"/>
<data file="images/b2architecturals018.jpg" bytes="16759"/>
  • You can define SWFs and image files to be preloaded to the cache at the time the site is initialized. If you leave bytes empty, the size of the file will be calculated when the site loads. That's convenient, but it's faster if the bytes are set manually here.

navigation_settings

Here you set up the global navigation. In net.kaegi.fleb.Core, the XML is parsed and the corresponding method will be called. Please refer to the global navigation docs for more details.

Here are the default values:

<setSuspendAfterInit>false</setSuspendAfterInit>
<setFade>false</setFade>
<setFadeInOnMouseOver>false</setFadeInOnMouseOver>
<setFadeInDepth>front</setFadeInDepth>
<setFadeOutTimerDelay>2</setFadeOutTimerDelay>
<setFadeInChainDelay>0</setFadeInChainDelay>
<setKeepRolloverStatus>false</setKeepRolloverStatus>
<setAlwaysHideChildren>false</setAlwaysHideChildren>
<setBtnLabelTextNewLine></setBtnLabelTextNewLine>
<setBtnDepths rollout="front" rollover="front" press="front" release="front"/>
<setAutoActivateDelay>0</setAutoActivateDelay>

Note: The values shown above are the default values. If you remove a navigation_settings these default values will be used.

navigation

button

<button id="home" btnSWF="mainBtn.swf" btnPosX="150" btnPosY="57" btnSpacingX="5" btnAddLabelSpace="10" btnLabel="Home{Startseite" btnStayActive="true">

Please refer to the global navigation xml attributes for detailed description.

data

<data swf="%site%/page.swf" source="%site%/service.xml{%site%/dienstleistungen.xml" seosource="content_source/page.php" title="Service - %site%{Dienstleistungen - %site%" address="/en/service/{/de/dienstleistungen/" keywords="service,%site%{dienstleistungen,%site%" description="service - %site%{dienstleistungen - %site%"/>
swf
  • The “content page” of your site. If not needed, just leave it blank. For example, there are some cases where you don't want to load an SWF, maybe you just want to fade in text, attach a movieclip from the library etc. You can later access these values via the global variable varcentral.flebActiveData.swfArr[varcentral.flebLanguage]. More details here.
source
  • The source file that you will be loading content from in your page swf. This can be an xml or php file. But you can also use this attribute to just hold a name, for example “home”. Because maybe you don't need to load data but want to have an ID to do some other action, a text animation for example. It's all up to you. If needed, you can later access these values via the global variable varcentral.flebActiveData.sourceArr[varcentral.flebLanguage]. More details here.
seosource
  • This source file is needed for the no javascript versions of your site, or in other words, the content for the search engines. Important: Please always provide the same content to the search engines that you show in your flash site if you don't want your site on a black list!
address
  • The adress used for SWFAddress. Example:
    address="/en/service/{/de/dienstleistungen/"

    If needed, you can later access these values via the global variable varcentral.flebActiveData.addressArr[varcentral.flebLanguage]. More details here.

title
  • The title of the browser window. Example:
    title="Welcome to the %site%{Willkommen auf der %site%"

    Note the %site%. This is a placeholder if you want to reuse the site title. That way you don't have to retype it a dozen times. If needed, you can later access these values via the global variable varcentral.flebActiveData.titleArr[varcentral.flebLanguage]. More details here.

keywords
  • The keywords for a particular page, used for SEO. Again, you can use %site% as a placeholder:
    keywords="service,%site%{dienstleistungen,%site%"
description
  • The description for a particular page, used for SEO. Again, you can use %site% as a placeholder:
    description="service - %site%{dienstleistungen - %site%"

Your own nodes

You can have as many individual nodes as you like per content page section.

<yournode yourattriute="hello world 1">This is text of yournode 1</yournode>
<yournode yourattribute="hello world 2">This is text of yournode 2</yournode>
<yournode yourattribute="hello world 3">This is text of yournode 3</yournode>
<yournode yourattribute="hello world 4">This is text of yournode 4</yournode>

Later in your code you can access these nodes and its attributes like this:

var nodeList:XMLList = event.params.node.yournode;
for (var n in nodeList)
{
   // get the attribute:
   trace(nodeList[n].@yourattribute);
   // get the node text:
   trace(nodeList[n].text());
}

Use this to have any kind of data in the structure.xml file, for example images for galleries, mp3 sounds or whatever.

fleb-framework-structure-xml.txt · Last modified: 2011/11/11 18:55 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki