'/'), index.xbf is automaticly appended.
- Added two new functions to deal with subdirectories and Apaches 'PATH_INFO':
getWebPath() and getFsPath(). Both returns a string to prepend to a path to
fix it, one for URL paths and the other for Filesystem paths.
- Added subdirectory support examples.
- Updated UML diagram and version numbers.
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "BIFE Base"
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "BIFE Base"
-PROJECT_NUMBER = 1.0.0beta1
+PROJECT_NUMBER = 1.0.0beta2
OUTPUT_DIRECTORY = api
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
OUTPUT_DIRECTORY = api
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
<XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
</XMI.header>
<XMI.content>
<XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
</XMI.header>
<XMI.content>
- <docsettings viewid="2" documentation="Parse XML data getting widgets." uniqueid="159" />
+ <docsettings viewid="2" documentation="Parse XML data getting widgets." uniqueid="161" />
<umlobjects>
<UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="x2c:extern" name="Container" static="0" scope="200" />
<UML:Class stereotype="" package="BIFE" xmi.id="61" abstract="1" documentation="x2c:extern" name="Fallback" static="0" scope="200" />
<umlobjects>
<UML:Class stereotype="" package="BIFE" xmi.id="5" abstract="1" documentation="x2c:extern" name="Container" static="0" scope="200" />
<UML:Class stereotype="" package="BIFE" xmi.id="61" abstract="1" documentation="x2c:extern" name="Fallback" static="0" scope="200" />
<UML:Operation stereotype="" package="" xmi.id="142" type="string" abstract="0" documentation="Gets a URL string based on Link attributes." name="getURL" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Link attributes." name="attrs" static="0" scope="200" />
</UML:Operation>
<UML:Operation stereotype="" package="" xmi.id="142" type="string" abstract="0" documentation="Gets a URL string based on Link attributes." name="getURL" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Link attributes." name="attrs" static="0" scope="200" />
</UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="160" type="string" abstract="0" documentation="Gets the relative path of the current BIFE file for web (URL) usage." name="getWebPath" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="161" type="string" abstract="0" documentation="Gets the relative path of the current BIFE file for filesystem usage." name="getFsPath" static="0" scope="200" />
<UML:Operation stereotype="" package="" xmi.id="157" type="string" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&HTML_Template_HIT" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
</UML:Operation>
<UML:Operation stereotype="" package="" xmi.id="157" type="string" abstract="0" documentation="Renders the widget." name="render" static="0" scope="200" >
<UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&HTML_Template_HIT" abstract="0" documentation="Template to use to render the widget." name="template" static="0" scope="200" />
</UML:Operation>
<widgets>
<UML:ConceptWidget usesdiagramfillcolour="0" width="106" showattsigs="600" usesdiagramusefillcolour="0" x="82" linecolour="#ff0000" y="11" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="5" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="97" showattsigs="601" usesdiagramusefillcolour="0" x="15" linecolour="#ff0000" y="90" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="61" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
<widgets>
<UML:ConceptWidget usesdiagramfillcolour="0" width="106" showattsigs="600" usesdiagramusefillcolour="0" x="82" linecolour="#ff0000" y="11" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="5" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="0" width="97" showattsigs="601" usesdiagramusefillcolour="0" x="15" linecolour="#ff0000" y="90" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#dcdcdc" height="25" usefillcolor="1" showattributes="0" xmi.id="61" showoperations="0" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
- <UML:ConceptWidget usesdiagramfillcolour="1" width="107" showattsigs="601" usesdiagramusefillcolour="1" x="152" linecolour="none" y="89" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="82" usefillcolor="1" showattributes="1" xmi.id="110" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="107" showattsigs="601" usesdiagramusefillcolour="0" x="152" linecolour="#ff0000" y="89" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="112" usefillcolor="1" showattributes="1" xmi.id="110" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
<UML:ConceptWidget usesdiagramfillcolour="1" width="104" showattsigs="601" usesdiagramusefillcolour="1" x="11" linecolour="none" y="150" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="37" usefillcolor="1" showattributes="1" xmi.id="7" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
</widgets>
<messages/>
<UML:ConceptWidget usesdiagramfillcolour="1" width="104" showattsigs="601" usesdiagramusefillcolour="1" x="11" linecolour="none" y="150" showopsigs="600" usesdiagramlinecolour="1" fillcolour="none" height="37" usefillcolor="1" showattributes="1" xmi.id="7" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
</widgets>
<messages/>
<listitem open="0" type="813" id="110" label="Link" >
<listitem open="0" type="815" id="111" label="BIFE_Link" />
<listitem open="0" type="815" id="112" label="__construct" />
<listitem open="0" type="813" id="110" label="Link" >
<listitem open="0" type="815" id="111" label="BIFE_Link" />
<listitem open="0" type="815" id="112" label="__construct" />
+ <listitem open="0" type="815" id="161" label="getFsPath" />
<listitem open="0" type="815" id="142" label="getURL" />
<listitem open="0" type="815" id="142" label="getURL" />
+ <listitem open="0" type="815" id="160" label="getWebPath" />
<listitem open="0" type="815" id="157" label="render" />
</listitem>
<listitem open="0" type="813" id="7" label="Translate" >
<listitem open="0" type="815" id="157" label="render" />
</listitem>
<listitem open="0" type="813" id="7" label="Translate" >
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Page title="Güinas!">
+ <Title>It worked!</Title>
+ <P>You're now in a directory. You can go <Link url="../">back</Link>.</P>
+ <HR noshade="noshade" size="2"/>
+ <Link data-s="1" data-b="1">View BIFE (xbf) source</Link> |
+ <Link data-s="1">View PHP source</Link>
+</Page>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Page title="Hi all!">
+ <Title>It worked!</Title>
+ <P>
+ You're now in a subdirectory. You can go
+ <Link url="../../">back</Link>.
+ </P>
+ <HR noshade="noshade" size="2"/>
+ <Link data-s="1" data-b="1">View BIFE (xbf) source</Link> |
+ <Link data-s="1">View PHP source</Link>
+</Page>
<P>This is a very bad use for BIFE, because I'm writing HTML :-P</P>
<Title>A little of 'real' use</Title>
<P>Here's a <Link url="link.xbf">link</Link> to another BIFE file</P>
<P>This is a very bad use for BIFE, because I'm writing HTML :-P</P>
<Title>A little of 'real' use</Title>
<P>Here's a <Link url="link.xbf">link</Link> to another BIFE file</P>
+ <Title>Links to subdirectories</Title>
+ <P>Here's a <Link url="dir/">file in a directory</Link>.</P>
+ <P>And a <Link url="dir/subdir/">file in a subdirectory</Link>.</P>
+ <P>Finally a <Link url="otherdir/">file in a another directory</Link>.</P>
<HR noshade="noshade" size="2"/>
<Link data-s="1" data-b="1">View BIFE (xbf) source</Link> |
<Link data-s="1">View PHP source</Link>
<HR noshade="noshade" size="2"/>
<Link data-s="1" data-b="1">View BIFE (xbf) source</Link> |
<Link data-s="1">View PHP source</Link>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Page title="Hola mundo!">
+ <Title>It worked!</Title>
+ <P>
+ You're now in a another directory. You can go
+ <Link url="../">back</Link>.
+ </P>
+ <HR noshade="noshade" size="2"/>
+ <Link data-s="1" data-b="1">View BIFE (xbf) source</Link> |
+ <Link data-s="1">View PHP source</Link>
+</Page>
- <version>1.0.0beta1</version>
+ <version>1.0.0beta2</version>
<date>2003-06-29</date>
<state>beta</state>
<notes>Check http://bife.llucax.hn.org/ for details.</notes>
<date>2003-06-29</date>
<state>beta</state>
<notes>Check http://bife.llucax.hn.org/ for details.</notes>
function getURL($attrs) // ~X2C
{
$url = @$attrs['URL'];
function getURL($attrs) // ~X2C
{
$url = @$attrs['URL'];
+ if (substr($url, strlen($url)-1) == '/') {
+ $url .= 'index.xbf'; // TODO - add a configuration option for this.
+ }
unset($attrs['URL']);
$query = array();
foreach($attrs as $name => $value) {
unset($attrs['URL']);
$query = array();
foreach($attrs as $name => $value) {
+ // +X2C Operation 160
+ /**
+ * Gets the relative path of the current BIFE file for web (URL) usage.
+ *
+ * @return string
+ * @access public
+ */
+ function getWebPath() // ~X2C
+ {
+ return (@$_SERVER['PATH_INFO']) ? '../' : './';
+ }
+ // -X2C
+
+ // +X2C Operation 161
+ /**
+ * Gets the relative path of the current BIFE file for filesystem usage.
+ *
+ * @return string
+ * @access public
+ */
+ function getFsPath() // ~X2C
+ {
+ return dirname('.' . @$_SERVER['PATH_INFO']) . '/';
+ }
+ // -X2C
+
// +X2C Operation 157
/**
* Renders the widget.
// +X2C Operation 157
/**
* Renders the widget.
+?>
\ No newline at end of file