Location: PHPKode > projects > Simple Way to Usenet > config/pagegen.opt.php
<?php
/* Pagegen Configuration
 * Each page should got those info 
 * title	=> used as browsing path for modrewrite (no fancy name there)
 * type		=> Which method used to generate the content 
 	'a' : 	PHP, a basic include that know how pagegen works;
	'b' : 	PHP object, pg_$conf object;
	'c' : 	PHP, a basic include, output is buffered, and maybe tidy corrected.
	'd' : 	HTML, read html and output it to client
	'e' : 	PHP, internal redirection to an other pageid (pagegen feature)
	'f' : 	HTTP, send header to redirect user to url set in conf
 * hidden 	=> To know if we display that page on the page tree
 * args		=> list of args taken by that page, also used to compute active page when modrewrite is enabled 
 * realm	=> If auth is enabled, tell which real is used to authenticate client @see auth.opt.php
 * chal		=> If auth is enabled, optional, force a specific challenge for that page, see @auth.opt.php 
 */
$o['homepid'] = 1;				//what's our home page ? (no pid or on / )
$o['pagevar'] = 'pid';			//which GET var tell us the pid when modrewrite is disabled ?

//how do we acces pages list ?
//for xml
//$o['engine'] = 'xml';
//$o['pagexml'] = PATH_OPTS.'/pages.xml';
//for db
//$o['engine'] = 'db';
//$o['cnf'] = 'pages';
//for conf
$o['engine'] = 'conf';
$k='pages';
$i=6; //6
$o[$k][$i]['title'] 	= 'browse';				
$o[$k][$i]['parent']	= 0;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'rpcbrw';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= 'rpc'; //rpcID
$o[$k][$i]['hidden']	= FALSE;
$i=7; //7
$o[$k][$i]['title'] 	= 'update';				
$o[$k][$i]['parent']	= 6;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'brwupdate';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= 'rpc'; //rpcID
$o[$k][$i]['hidden']	= TRUE;
$i=1;
$o[$k][$i]['title'] 	= 'rpc';					//with conf engine, also used to get title from dico pgtitle_$title
$o[$k][$i]['parent']	= 0;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'rpc';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= 'rpc';
$o[$k][$i]['hidden']	= FALSE;
$i=2;//2
$o[$k][$i]['title'] 	= 'search';				
$o[$k][$i]['parent']	= 0;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'search';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= "engine;type;cat;filter";
$o[$k][$i]['hidden']	= FALSE;
$i=3;//3
$o[$k][$i]['title'] 	= 'advsearch';				
$o[$k][$i]['parent']	= 0;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'advsearch';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= 'savedadv';
$o[$k][$i]['hidden']	= FALSE;
$i=4;//4
$o[$k][$i]['title'] 	= 'profile';				
$o[$k][$i]['parent']	= 0;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'profile';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= 'realm=swun'; //realm
$o[$k][$i]['hidden']	= FALSE;
$i=5;//5
$o[$k][$i]['title'] 	= 'login';				
$o[$k][$i]['parent']	= 0;
$o[$k][$i]['type']		= 'b';
$o[$k][$i]['conf']		= 'login';
$o[$k][$i]['realm']		= 'swun';
$o[$k][$i]['args']		= 'realm=swun;chal=html'; //realm
$o[$k][$i]['hidden']	= TRUE;

/*
 * For XML something like that, should do it, read/parse once into mem like for in conf,
<pages id="1" title="news" hidden="FALSE">
	<conf>
		<type></type>
		<conf></conf>
		<args></args>
		<realm></realm>
	</conf>
	<childs>
		<pages id="2" title="archive" hidden="FALSE">
			<conf>
				<type></type>
				<conf></conf>
				<args></args>
				<realm></realm>
			</conf>
			<childs></childs>
		</pages>
	</childs>
</pages>
*/

return $o;
Return current item: Simple Way to Usenet