Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Creating Pages

shadow7412 edited this page Sep 14, 2010 · 4 revisions

Do this:

<?php
include “../include/page.php”;
$p = new Page(1,2); //1 = Name of the page (string), 2 = access required to view.
echo “Content”; // And then make it do what you want.. it.. to… do…
?>
Yep... that's it. Nearly. Unless your page needs to run some javascript once it has loaded. Then you will need to use addJs.
<?php
$p→addJs(“document.write(\”Like this.\“);”);
?>
Note that the comma's are escaped to actually go into the function.

There. The page is done, but you also need to add your page into the database for the site to notice it.

INSERT INTO pages (name, url, access, visible) VALUES (1 , 2, 3, 4);
//1 – Name of page, 2- php file), 3 -access needed to view, 4 – whether it should be on the toolbar.

Copy the .php file you just made to (or create it in) pages/ and you are done.

Clone this wiki locally