modifs pour supporter les ss répertoires dans les url
authorx2000habouzit <x2000habouzit>
Mon, 26 Jan 2004 22:59:05 +0000 (22:59 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 26 Jan 2004 22:59:05 +0000 (22:59 +0000)
include/auto.prepend.inc.php
plugins/insert.mkStats.php
templates/skin/default.tpl

index 4f06703..6592bcc 100644 (file)
@@ -3,7 +3,7 @@ ini_set('include_path', ".:..:./include:../include/:/home/x2000habouzit/dev/diog
 require("xorg.common.inc.php");
 
 function _new_page($type, $tpl_name, $tpl_head, $min_auth, $admin=false) {
-    global $page;
+    global $page,$globals;
     require("xorg.page.inc.php");
     if(!empty($admin)) {
         $page = new XorgAdmin($tpl_name, $type);
@@ -18,6 +18,11 @@ function _new_page($type, $tpl_name, $tpl_head, $min_auth, $admin=false) {
             $page = new XorgAuth($tpl_name, $type);
     }
 
+    $page->template_dir = $globals->spoolroot . "/templates/";
+    $page->compile_dir  = $globals->spoolroot . "/templates_c/";
+    $page->plugin_dir   = $globals->spoolroot . "/plugins/";
+    $page->cache_dir    = $globals->spoolroot . "/cache/";
+
     $page->assign('xorg_head', $tpl_head);
     $page->assign('xorg_tpl', $tpl_name);
 
index 1251127..8202c49 100644 (file)
@@ -25,22 +25,22 @@ function smarty_insert_mkStats($params, &$smarty)
 
     $nbtrk = array(nb_trk(5,2), nb_trk(4,2), nb_trk(5,1), nb_trk(4,1));
     return <<<EOF
-        <table class="bicol" width="100%"
-          style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em;">
+        <table class="bicol"
+          style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0;">
         <tr>
           <th width="33%">Valid</th>
           <th width="33%">Bugs</th>
           <th width="33%">Todo</th>
         </tr>
         <tr class="impair">
-          <td><a href="####admin/valider.php###">$stats_req</a></td>
+          <td><a href="admin/valider.php">$stats_req</a></td>
           <td>
-            <a href="####trackers/tracker_show.php?tr_id=2###">
+            <a href="trackers/tracker_show.php?tr_id=2">
             <strong>{$nbtrk[0]}</strong> / {$nbtrk[1]}
             </a>
           </td>
           <td>
-            <a href="####trackers/tracker_show.php?tr_id=1">
+            <a href="trackers/tracker_show.php?tr_id=1">
             <strong>{$nbtrk[2]}</strong> / {$nbtrk[3]}
             </a>
           </td>
index a4336e3..f68aa6b 100644 (file)
@@ -1,10 +1,10 @@
-{* $Id: default.tpl,v 1.3 2004-01-26 12:36:32 x2000habouzit Exp $ *}
+{* $Id: default.tpl,v 1.4 2004-01-26 22:59:05 x2000habouzit Exp $ *}
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
 {include file=skin/common.header.tpl}
-    <link rel="stylesheet" type="text/css" href="css/default.css" media="screen" />
+  <link rel="stylesheet" type="text/css" href="{"css/default.css"|url}" media="screen" />
 {if $xorg_head}
 {include file=$xorg_head}
 {/if}
@@ -25,7 +25,7 @@
     <table id="body" cellpadding="0" cellspacing="0">
     <tr>
       <td id="body-left" rowspan="2">
-        <img src="images/sk_default_headlogo.jpg" alt="[ LOGO ]" />
+        <img src="{"images/sk_default_headlogo.jpg"|url}" alt="[ LOGO ]" />
         <div id="menu">
 {include_php file=menu.inc.php}
 {foreach key=menu_title item=menu_list from=$menu}
@@ -39,7 +39,7 @@
 {perms level=admin}{insert name="mkStats"}{/perms}
       </td>
       <td id="body-top">
-        <img src="images/sk_default_ban.jpg" alt="[ Polytechnique.org ]" />
+        <img src="{"images/sk_default_ban.jpg"|url}" alt="[ Polytechnique.org ]" />
         <table>
         <tr>
           <td class="date-heure">
@@ -52,7 +52,7 @@
           <td class="inscrits">{insert name="getNbIns"} polytechniciens sur le web</td>
         </tr>
         </table>
-        <img src="images/sk_default_lesX.gif" alt="[LES X SUR LE WEB]" />
+        <img src="{"images/sk_default_lesX.gif"|url}" alt="[LES X SUR LE WEB]" />
       </td>
     </tr>
     <tr>