From: x2000habouzit Date: Thu, 13 Jul 2006 22:00:39 +0000 (+0000) Subject: begin to work on xnet a bit. X-Git-Tag: xorg/0.9.11~430 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=bd4be95d998237aa41abcf544aaabf82b73fdce0;p=platal.git begin to work on xnet a bit. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@470 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/htdocs.net/.htaccess b/htdocs.net/.htaccess new file mode 100644 index 0000000..73d78b6 --- /dev/null +++ b/htdocs.net/.htaccess @@ -0,0 +1,13 @@ +Options +FollowSymLinks +RewriteEngine on + +RewriteBase /~x2000habouzit + +# wiki + +RewriteRule ^([A-Z].*) wiki.php?n=$1 [L,QSA] + +# Rewrite URLs of the form 'index.php?q=x': +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php?p=$1 [L,QSA] diff --git a/htdocs.net/index.php b/htdocs.net/index.php index c8eb659..83f93a2 100644 --- a/htdocs.net/index.php +++ b/htdocs.net/index.php @@ -1,6 +1,30 @@ run(); - new_page('xnet/index.tpl', AUTH_PUBLIC); - $page->run(); ?> diff --git a/include/xnet.inc.php b/include/xnet.inc.php index b31c15e..93724d8 100644 --- a/include/xnet.inc.php +++ b/include/xnet.inc.php @@ -43,6 +43,11 @@ function new_page($tpl_name, $min_auth) $page->assign('xorg_tpl', $tpl_name); } +function new_skinned_page($tpl_name, $min_auth) +{ + return new_page($tpl_name, $min_auth); +} + // }}} function new_identification_page() { diff --git a/modules/xnet.php b/modules/xnet.php new file mode 100644 index 0000000..5314c59 --- /dev/null +++ b/modules/xnet.php @@ -0,0 +1,38 @@ + $this->make_hook('index', AUTH_PUBLIC), + ); + } + + function handler_index(&$page) + { + $page->changeTpl('xnet/index.tpl'); + return PL_OK; + } +} + +?>