There are many more features you can discover reading the comments within the class file, including the possibility to use the priority list, a multi-layered buffer or the Infopanels as independant objects.
Now this page is pretty complete, so here is as a last word the file to generate it:
<?php
require_once 'CSE_display/CSE_display.php';
$myHTML = new CSE_display;
// The headers and footers
$myHTML->setTitle("CSE Display - Wrapping Up");
$myHTML->setCopyright("Made with CSE_display, © <a href=http://www.cavin.name>CSE</a>, 2008");
$myHTML->setBodyTitle("A complete design");
$myHTML->setBodyFooter("Return to the <a href=index9.php>Previous Page</a>. Or to the <a href=index.php>index</a> to download...");
// The buttons
$myHTML->appendRegion("BUTTON","<a onClick=\"myFunc('Nothing');\" class='button'>Nothing</a>",1);
$myHTML->appendRegion("BUTTON","<a onClick=\"myFunc('Else');\" class='button'>Else</a>",8);
// The body
$myHTML->setBody("<p>There are many more features you can discover reading the comments within the class file, including the possibility to use the priority list, a multi-layered buffer or the Infopanels as independant objects.</p>");
$myHTML->appendBody("<p>Now this page is pretty complete, so here is as a last word the file to generate it:</p>");
$myHTML->appendBody("<p>Enjoy using CSE_Display!</p>",1); // (hidden feature, this second parameter :-)
// THe Javascript
$myHTML->registerJSfunction("myFunc(myVar)", "alert('Javascript with value:'+myVar);");
$myHTML->registerJSonLoad("myFunc(\"OnLoad\");"); // OnLoad is pretty disturbing, no?
// The Information Panels
require_once 'infopanels.php';
writePanels($myHTML, basename(__FILE__));
// wrap up the body with file source:
$myHTML->appendBody(highlight_file(basename(__FILE__), true)); // just to display the file itself ;-)
$myHTML->appendBody("<p>And to be complete the infopanels.php:</p>");
$myHTML->appendBody(highlight_file("infopanels.php", true));
// Dump
$myHTML->dump();
?>
And to be complete the infopanels.php:
<?php
function writePanels(&$myHTML, $url) {
$id = $myHTML->addPanel("test1"); // this name is important and must be unique. If you change the name, you loose the preferences...
$myHTML->IP_setTitle($id,"Test 1");
$myHTML->IP_appendBody($id, "Blah, blah<br>blah blah<br>blah...");
$id = $myHTML->addPanel("test2");
$myHTML->IP_setTitle($id,"Test 2");
$myHTML->IP_appendBody($id, "Blah, blah<br>blah blah<br>blah...");
$id = $myHTML->addPanel("content");
$myHTML->IP_setTitle($id,"Content");
$myHTML->IP_appendBody($id, nl2br("<a href=index.php>The Content</a>
<a href=index1.php>The Basics</a>
<a href=index2.php>The Template</a>
<a href=index3.php>Flexibility Puur</a>
<a href=index4.php>A Taste of Style</a>
<a href=index5.php>Information That Moves</a>
<a href=index6.php>Giving you the Script</a>
<a href=index7.php>Of Color and Tastes</a>
<a href=index8.php>Blogmania</a>
<a href=index8b.php>Gallery</a> <b>new!</b>
<a href=index9.php>AJAX It!™</a>
<a href=indexA.php>Wrapping Up</a>"));
$id = $myHTML->addPanel("test3", "large", "RIGHT", 0, 1, 0);
// This one is "advanced", but for the demo:
$myHTML->infopanels[$id]->setPriority(-5, 0);
$myHTML->IP_setTitle($id,"Test 3 - Fix");
$myHTML->IP_appendBody($id, "Blah, blah<br>blah...");
$id = $myHTML->addPanel("test4", "large", "RIGHT", 1, 1, 9);
// This one is "advanced", but for the demo:
$myHTML->infopanels[$id]->setPriority(-4, 0);
$myHTML->IP_setTitle($id,"Test 4");
$myHTML->IP_appendBody($id, "Cannot move up and down,<br>no small mode,<br>but can minimize or change side.");
$myHTML->IP_setMainPage($url);
}
?>
Enjoy using CSE_Display!