]> git.llucax.com Git - software/bife/bife-all.git/commitdiff
Added new Widget, Link:
authorLeandro Lucarella <llucax@gmail.com>
Mon, 2 Jun 2003 04:26:36 +0000 (04:26 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Mon, 2 Jun 2003 04:26:36 +0000 (04:26 +0000)
- Updated UML diagram.
- Updated example to use Link widget in a smart way (removed photo.php). Even
  so, Link is not yet used in Album.
- Fixed bugs.

doc/bife.xmi
examples/index.php
examples/index.xbf [moved from examples/simple.xbf with 100% similarity]
examples/templates/bife_album_item.html
examples/templates/bife_link.html [new file with mode: 0644]
src/BIFE/Album.php
src/BIFE/AlbumPhoto.php
src/BIFE/Link.php [moved from examples/photo.php with 51% similarity]

index cd94d32a4736b3a4ca65ffed94fe943160286187..f5871672fb2a2234846ef206a24567b0152abb73 100644 (file)
@@ -5,11 +5,11 @@
    <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
    <XMI.exporterVersion>1.1</XMI.exporterVersion>
   </XMI.documentation>
-  <XMI.model xmi.name="bife" href="/home/llucar/public_html/bife/doc/bife.xmi" />
+  <XMI.model xmi.name="bife" href="/mnt/burns/luca/website/www/test/bife/doc/bife.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
-  <docsettings viewid="2" documentation="" uniqueid="109" />
+  <docsettings viewid="2" documentation="" uniqueid="112" />
   <umlobjects>
    <UML:Class stereotype="" package="BIFE" xmi.id="3" abstract="1" documentation="Base widget class." name="Widget" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="4" type="string" abstract="1" documentation="Renders the widget using a template returning a string with the results." name="render" static="0" scope="200" >
@@ -179,86 +179,101 @@ Returns an array of associative arrays with this keys:
     <UML:Attribute stereotype="" package="" xmi.id="104" value="" type="string" abstract="0" documentation="Photo filename." name="file" static="0" scope="202" />
     <UML:Attribute stereotype="" package="" xmi.id="105" value="" type="string" abstract="0" documentation="Photo Description." name="desc" static="0" scope="202" />
    </UML:Class>
+   <UML:Class stereotype="" package="BIFE" xmi.id="110" abstract="0" documentation="Link to another page." name="Link" static="0" scope="200" >
+    <UML:Operation stereotype="" package="" xmi.id="111" type="void" abstract="0" documentation="Constructor." name="BIFE_Link" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="112" type="void" abstract="0" documentation="Constructor." name="__construct" static="0" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="array" abstract="0" documentation="Attributes." name="attrs" static="0" scope="200" />
+    </UML:Operation>
+   </UML:Class>
   </umlobjects>
   <diagrams>
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="1" showopsig="0" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="2" documentation="" type="402" showops="1" showpackage="1" name="Class Diagram" localid="30000" showstereotype="0" showscope="1" font="Helvetica,9,-1,5,48,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="104" showattsigs="601" usesdiagramusefillcolour="0" x="235" linecolour="#ff0000" y="23" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="45" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="145" showattsigs="601" usesdiagramusefillcolour="0" x="215" linecolour="#ff0000" y="133" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="131" showattsigs="601" usesdiagramusefillcolour="0" x="67" linecolour="#ff0000" y="357" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" 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" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="127" showattsigs="601" usesdiagramusefillcolour="0" x="379" linecolour="#ff0000" y="471" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="14" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="72" linecolour="#ff0000" y="514" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="169" showattsigs="601" usesdiagramusefillcolour="0" x="432" linecolour="#ff0000" y="103" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="180" usefillcolor="1" showattributes="1" xmi.id="20" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="134" showattsigs="601" usesdiagramusefillcolour="0" x="220" linecolour="#ff0000" y="357" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="61" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="227" linecolour="#ff0000" y="471" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="76" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="382" linecolour="#ff0000" y="357" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" showattributes="1" xmi.id="85" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="160" showattsigs="601" usesdiagramusefillcolour="0" x="7" linecolour="#ff0000" y="132" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="108" usefillcolor="1" showattributes="1" xmi.id="103" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="90" showattsigs="601" usesdiagramusefillcolour="0" x="256" linecolour="#ff0000" y="15" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="37" usefillcolor="1" showattributes="1" xmi.id="3" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="127" showattsigs="601" usesdiagramusefillcolour="0" x="238" linecolour="#ff0000" y="120" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="5" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="117" showattsigs="601" usesdiagramusefillcolour="0" x="73" linecolour="#ff0000" y="339" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" 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" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="109" showattsigs="601" usesdiagramusefillcolour="0" x="418" linecolour="#ff0000" y="462" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="14" 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="8" linecolour="#ff0000" y="499" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="52" usefillcolor="1" showattributes="1" xmi.id="17" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="144" showattsigs="601" usesdiagramusefillcolour="0" x="453" linecolour="#ff0000" y="90" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="150" usefillcolor="1" showattributes="1" xmi.id="20" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="118" showattsigs="601" usesdiagramusefillcolour="0" x="242" linecolour="#ff0000" y="340" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="52" usefillcolor="1" showattributes="1" xmi.id="61" 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="248" linecolour="#ff0000" y="461" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="76" 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="419" linecolour="#ff0000" y="340" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="52" usefillcolor="1" showattributes="1" xmi.id="85" showoperations="1" showpackage="1" showscope="1" showstereotype="0" font="Helvetica,9,-1,5,48,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="142" showattsigs="601" usesdiagramusefillcolour="0" x="28" linecolour="#ff0000" y="119" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="90" usefillcolor="1" showattributes="1" xmi.id="103" 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="129" linecolour="#ff0000" y="499" showopsigs="600" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="52" 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" />
     </widgets>
     <messages/>
     <associations>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="3" widgetaid="5" documentation="" type="500" >
       <linepath>
-       <startpoint startx="287" starty="133" />
-       <endpoint endx="287" endy="68" />
+       <startpoint startx="301" starty="120" />
+       <endpoint endx="301" endy="52" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="5" widgetaid="7" documentation="" type="500" >
       <linepath>
-       <startpoint startx="132" starty="357" />
-       <endpoint endx="251" endy="241" />
+       <startpoint startx="131" starty="339" />
+       <endpoint endx="269" endy="210" />
       </linepath>
      </UML:AssocWidget>
-     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="7" widgetaid="17" documentation="" type="500" >
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="7" widgetaid="17" documentation="" type="500" >
       <linepath>
-       <startpoint startx="132" starty="514" />
-       <endpoint endx="132" endy="465" />
+       <startpoint startx="61" starty="499" />
+       <endpoint endx="112" endy="429" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="3" widgetaid="20" documentation="" type="500" >
       <linepath>
-       <startpoint startx="432" starty="193" />
-       <endpoint endx="339" endy="45" />
+       <startpoint startx="453" starty="165" />
+       <endpoint endx="346" endy="33" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="5" widgetaid="61" documentation="" type="500" >
       <linepath>
-       <startpoint startx="287" starty="357" />
-       <endpoint endx="287" endy="241" />
+       <startpoint startx="301" starty="340" />
+       <endpoint endx="301" endy="210" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="61" widgetaid="76" documentation="" type="500" >
       <linepath>
-       <startpoint startx="287" starty="471" />
-       <endpoint endx="287" endy="420" />
+       <startpoint startx="301" starty="461" />
+       <endpoint endx="301" endy="392" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="5" widgetaid="85" documentation="" type="500" >
       <linepath>
-       <startpoint startx="442" starty="357" />
-       <endpoint endx="323" endy="241" />
+       <startpoint startx="472" starty="340" />
+       <endpoint endx="333" endy="210" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="85" widgetaid="14" documentation="" type="500" >
       <linepath>
-       <startpoint startx="442" starty="471" />
-       <endpoint endx="442" endy="420" />
+       <startpoint startx="472" starty="462" />
+       <endpoint endx="472" endy="392" />
       </linepath>
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="3" widgetaid="103" documentation="" type="500" >
       <linepath>
-       <startpoint startx="87" starty="132" />
-       <endpoint endx="235" endy="45" />
+       <startpoint startx="99" starty="119" />
+       <endpoint endx="256" endy="33" />
+      </linepath>
+     </UML:AssocWidget>
+     <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="7" widgetaid="110" documentation="" type="500" >
+      <linepath>
+       <startpoint startx="182" starty="499" />
+       <endpoint endx="151" endy="429" />
       </linepath>
      </UML:AssocWidget>
     </associations>
    </diagram>
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="41" documentation="" type="403" showops="1" showpackage="0" name="Parse" localid="29998" showstereotype="0" showscope="1" font="Helvetica,12,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
-     <UML:ObjectWidget usesdiagramfillcolour="0" width="71" usesdiagramusefillcolour="0" x="62" linecolour="#ff0000" y="49" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="31" usefillcolor="1" length="250" xmi.id="25" decon="0" localid="29999" multipleinstance="0" drawasactor="0" font="Helvetica,12,-1,5,50,0,0,0,0,0" />
-     <UML:ObjectWidget usesdiagramfillcolour="0" width="74" usesdiagramusefillcolour="0" x="478" linecolour="#ff0000" y="49" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="31" usefillcolor="1" length="250" xmi.id="3" decon="0" localid="29998" multipleinstance="0" drawasactor="0" font="Helvetica,12,-1,5,50,0,0,0,0,0" />
+     <UML:ObjectWidget usesdiagramfillcolour="0" width="71" usesdiagramusefillcolour="0" x="62" linecolour="#ff0000" y="49" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="29" usefillcolor="1" length="250" xmi.id="25" decon="0" localid="29999" multipleinstance="0" drawasactor="0" font="Helvetica,12,-1,5,50,0,0,0,0,0" />
+     <UML:ObjectWidget usesdiagramfillcolour="0" width="74" usesdiagramusefillcolour="0" x="478" linecolour="#ff0000" y="49" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="29" usefillcolor="1" length="250" xmi.id="3" decon="0" localid="29998" multipleinstance="0" drawasactor="0" font="Helvetica,12,-1,5,50,0,0,0,0,0" />
     </widgets>
     <messages>
-     <UML:MessageWidget usesdiagramfillcolour="1" width="416" usesdiagramusefillcolour="1" x="98" linecolour="none" y="119" operation="render(template : &amp;HTML_Template_Sigma) : void" widgetbid="29998" usesdiagramlinecolour="1" fillcolour="none" height="8" usefillcolor="1" seqnum="" widgetaid="29999" textid="42" xmi.id="43" font="helvetica,12,-1,5,50,0,0,0,0,0" />
+     <UML:MessageWidget usesdiagramfillcolour="1" width="416" usesdiagramusefillcolour="1" x="98" linecolour="none" y="119" operation="render(template : &amp;HTML_Template_Sigma) : void" widgetbid="29998" usesdiagramlinecolour="1" fillcolour="none" height="8" usefillcolor="1" seqnum="" widgetaid="29999" textid="42" xmi.id="43" font="Helvetica,12,-1,5,50,0,0,0,0,0" />
     </messages>
     <associations/>
    </diagram>
@@ -296,6 +311,13 @@ Returns an array of associative arrays with this keys:
        <listitem open="0" type="815" id="23" label="render" />
        <listitem open="0" type="815" id="100" label="splitFilename" />
       </listitem>
+      <listitem open="0" type="813" id="103" label="AlbumPhoto" >
+       <listitem open="0" type="815" id="106" label="BIFE_AlbumPhoto" />
+       <listitem open="0" type="815" id="107" label="__construct" />
+       <listitem open="0" type="814" id="105" label="desc" />
+       <listitem open="0" type="814" id="104" label="file" />
+       <listitem open="0" type="815" id="108" label="render" />
+      </listitem>
       <listitem open="0" type="807" id="2" label="Class Diagram" />
       <listitem open="0" type="813" id="5" label="Container" >
        <listitem open="0" type="815" id="48" label="BIFE_Container" />
@@ -322,6 +344,10 @@ Returns an array of associative arrays with this keys:
        <listitem open="0" type="814" id="8" label="attrs" />
        <listitem open="0" type="815" id="12" label="render" />
       </listitem>
+      <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>
       <listitem open="0" type="813" id="14" label="Page" >
        <listitem open="0" type="815" id="15" label="BIFE_Page" />
        <listitem open="0" type="815" id="53" label="__construct" />
@@ -329,13 +355,6 @@ Returns an array of associative arrays with this keys:
        <listitem open="0" type="814" id="89" label="attrs" />
        <listitem open="0" type="815" id="90" label="render" />
       </listitem>
-      <listitem open="1" type="813" id="103" label="AlbumPhoto" >
-       <listitem open="0" type="815" id="106" label="BIFE_AlbumPhoto" />
-       <listitem open="0" type="815" id="107" label="__construct" />
-       <listitem open="0" type="814" id="105" label="desc" />
-       <listitem open="0" type="814" id="104" label="file" />
-       <listitem open="0" type="815" id="108" label="render" />
-      </listitem>
       <listitem open="0" type="813" id="85" label="Root" >
        <listitem open="0" type="815" id="87" label="BIFE_Root" />
        <listitem open="0" type="815" id="88" label="__construct" />
index 4d7651a5f7cc3d450a2fb8b73f58b8fe3a959c6e..dfff49ccea83458338d26c55d87299c2e4361aed 100644 (file)
@@ -35,12 +35,13 @@ require_once 'BIFE/Parser.php';
 require_once 'BIFE/Copy.php';
 require_once 'BIFE/Page.php';
 require_once 'BIFE/Title.php';
+require_once 'BIFE/Link.php';
 #require_once 'BIFE/Album.php';
 #require_once 'BIFE.php';
 
-$file = 'simple.xbf';
+$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf';
 
-$template =& new HTML_Template_Sigma('templates');
+$template =& new HTML_Template_Sigma('templates', 'compiled_templates');
 $template->setErrorHandling(PEAR_ERROR_PRINT);
 
 $parser =& new BIFE_Parser('BIFE_Copy');
similarity index 100%
rename from examples/simple.xbf
rename to examples/index.xbf
index 5d20d8c8bda0a11a8d9ea5295ee7dc86494ed5d5..5523de6f2d26f6e64b25559c73dfe155b5ad4547 100644 (file)
@@ -1,3 +1,4 @@
 <TD class="albumitem">
-    <A class="albumitem" href="photo?BIFE_AlbumPhoto_FILE={PHOTO}" title="{DESC}"><IMG alt="{DESC}" src="{THUMB}" class="albumitem"></A>
+    <A class="albumitem" href="?BIFE_ALBUMPHOTO_FILE={PHOTO}&BIFE=photo.xbf"
+       title="{DESC}"><IMG alt="{DESC}" src="{THUMB}" class="albumitem"></A>
 </TD>
diff --git a/examples/templates/bife_link.html b/examples/templates/bife_link.html
new file mode 100644 (file)
index 0000000..f8e2148
--- /dev/null
@@ -0,0 +1 @@
+<A href="{URL}{QUERY}">{CONTENTS}</A>
index 977949c4b927d1da76a3fdebe5385eccfded804a..1d9fa2bfaf758cd840827943f9f5a5de1a905f35 100644 (file)
@@ -282,4 +282,4 @@ Returns an array of associative arrays with this keys:
 
 } // -X2C Class :Album
 
-?>
+?>
\ No newline at end of file
index 7d7548dece65c25dd707576073b580592755d548..6a348763469186f1e7e8829d143a67c15dde01ad 100644 (file)
@@ -81,7 +81,7 @@ class BIFE_AlbumPhoto extends BIFE_Widget {
      */
     function __construct($attrs) // ~X2C
     {
-        $this->file = @$attrs['FILE'] ? $attrs['FILE'] : @$_REQUEST['BIFE_AlbumPhoto_FILE'];
+        $this->file = @$attrs['FILE'] ? $attrs['FILE'] : @$_REQUEST['BIFE_ALBUMPHOTO_FILE'];
         $this->desc = @$attrs['DESC'] ? $attrs['DESC'] : basename($this->file);
     }
     // -X2C
similarity index 51%
rename from examples/photo.php
rename to src/BIFE/Link.php
index ca803c793c0c3e4fe030193590995e80df3dab96..ab21616bb48095b22bee09814aa47bf67c3a912a 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
 // +--------------------------------------------------------------------+
 // |                       BIFE - Buil It FastEr                        |
 // | along with Hooks; if not, write to the Free Software Foundation,   |
 // | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
 // +--------------------------------------------------------------------+
-// | Created: Wed May 17 18:16:54 ART 2003                              |
+// | Created: Sun Jun 1 20:00:20 2003                                   |
 // | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
 // +--------------------------------------------------------------------+
 //
 // $Id$
 //
 
-$tmp = ini_get('include_path');
-ini_set('include_path', "../src:$tmp");
-unset($tmp);
+// +X2C includes
+require_once 'BIFE/Generic.php';
+// ~X2C
 
-require_once 'HTML/Template/Sigma.php';
-require_once 'BIFE/Parser.php';
-require_once 'BIFE/Copy.php';
-require_once 'BIFE/Page.php';
-require_once 'BIFE/Title.php';
-#require_once 'BIFE/Album.php';
-#require_once 'BIFE.php';
+// +X2C Class 110 :Link
+/**
+ * Link to another page.
+ *
+ * @access public
+ */
+class BIFE_Link extends BIFE_Generic {
+    // ~X2C
 
-$file = 'photo.xbf';
+    // +X2C Operation 111
+    /**
+     * Constructor.
+     *
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function BIFE_Link($attrs) // ~X2C
+    {
+        $this->__construct($attrs);
+    }
+    // -X2C
 
-$template =& new HTML_Template_Sigma('templates');
-$template->setErrorHandling(PEAR_ERROR_PRINT);
+    // +X2C Operation 112
+    /**
+     * Constructor.
+     *
+     * @param  array $attrs Attributes.
+     *
+     * @return void
+     * @access public
+     */
+    function __construct($attrs) // ~X2C
+    {
+        if (isset($attrs['URL'])) {
+            $this->attrs['URL'] = $attrs['URL'];
+            unset($attrs['URL']);
+        } else {
+            $this->attrs['URL'] = '';
+        }
+        if (isset($attrs['BIFE'])) {
+            $this->attrs['BIFE'] = $attrs['BIFE'];
+            $attrs['DATA-BIFE']  = $attrs['BIFE'];
+            unset($attrs['BIFE']);
+        }
+        $query = array();
+        foreach($attrs as $name => $value) {
+            if (substr($name, 0, 5) === 'DATA-') {
+                if ($name = substr($name, 5)) {
+                    $query[] = urlencode($name) . '=' . urlencode($value);
+                }
+            }
+        }
+        if ($query) {
+            $this->attrs['QUERY'] = '?' . join('&', $query);
+        } else {
+            $this->attrs['QUERY'] = '';
+        }
+    }
+    // -X2C
 
-$parser =& new BIFE_Parser('BIFE_Copy');
-$page =& $parser->parseFile($file);
-$parser->__destruct();
-echo $page->render($template);
+} // -X2C Class :Link
 
 ?>