custom css classes
authorx99bachelart <x99bachelart>
Tue, 9 Sep 2003 15:22:23 +0000 (15:22 +0000)
committerx99bachelart <x99bachelart>
Tue, 9 Sep 2003 15:22:23 +0000 (15:22 +0000)
include/spool.inc.php
index.php

index 522ab47..7fee8b6 100644 (file)
@@ -256,6 +256,7 @@ class spool {
 
   function disp_desc($_id,$_index="",$_first=0,$_last=0,$_ref="",
   $_pfx_node="", $_pfx_end="",$_head=true) {
+    global $css;
     $debug = false;
     $spfx_f = '<img src="img/k1.gif" height="21" width="9" alt="o" />'; 
     $spfx_n = '<img src="img/k2.gif" height="21" width="9" alt="*" />'; 
@@ -269,18 +270,18 @@ class spool {
     
     if (!sizeof($this->overview[$_id]->children) && ($_index<=$_last)
     && ($_index>=$_first)) {
-      echo '<tr class="'.($_index%2?"pair":"impair")."\">\n";
-      echo "<td class=\"date\">"
+      echo '<tr class="'.($_index%2?$css["pair"]:$css["impair"])."\">\n";
+      echo "<td class=\"{$css['date']}\">"
         .formatSpoolHeader("date",$this->overview[$_id]->date,$_id,
         $this->group,($_index==$_ref),$this->overview[$_id]->isread)
         ." </td>\n";
-      echo "<td class=\"subject\"><div class=\"tree\">"
+      echo "<td class=\"{$css['subject']}\"><div class=\"{$css['tree']}\">"
         .$_pfx_node.($_head?$spfx_f:$spfx_s)."</div>"
         .formatSpoolHeader("subject",$this->overview[$_id]->subject,$_id,
         $this->group,($_index==$_ref),$this->overview[$_id]->isread)
         .($debug?" $_id $_index ".
         $this->overview[$_id]->desc." ".$this->overview[$_id]->descunread." ":"")." </td>\n";
-      echo "<td class=\"author\">"
+      echo "<td class=\"{$css['author']}\">"
         .formatSpoolHeader("from",$this->overview[$_id]->from,$_id,
         $this->group,($_index==$_ref),$this->overview[$_id]->isread)
         ." </td>\n</tr>";
@@ -288,18 +289,18 @@ class spool {
     } 
     $children = $this->overview[$_id]->children;
     if (($_index<=$_last) && ($_index>=$_first)) {
-      echo '<tr class="'.($_index%2?"pair":"impair")."\">\n";
-      echo "<td class=\"date\">"
+      echo '<tr class="'.($_index%2?$css["pair"]:$css["impair"])."\">\n";
+      echo "<td class=\"{$css['date']}\">"
          .formatSpoolHeader("date",$this->overview[$_id]->date,$_id,
          $this->group,($_index==$_ref),$this->overview[$_id]->isread)
          ." </td>\n";
-      echo "<td class=\"subject\"><div class=\"tree\">"
+      echo "<td class=\"{$css['subject']}\"><div class=\"{$css['tree']}\">"
         .$_pfx_node.$spfx_n."</div>"
         .formatSpoolHeader("subject",$this->overview[$_id]->subject,$_id,
         $this->group,($_index==$_ref),$this->overview[$_id]->isread)
         .($debug?" $_id $_index ".
         $this->overview[$_id]->desc." ".$this->overview[$_id]->descunread." ":"")." </td>\n";
-      echo "<td class=\"author\">"
+      echo "<td class=\"{$css['author']}\">"
         .formatSpoolHeader("from",$this->overview[$_id]->from,$_id,
         $this->group,($_index==$_ref),$this->overview[$_id]->isread)
         ." </td>\n</tr>";
@@ -327,6 +328,7 @@ class spool {
    */
 
   function disp($_first=0,$_last=0,$_ref="") {
+    global $css;
     $index=1;
     if (sizeof($this->overview)) {
       foreach ($this->overview as $id=>$msg) {
@@ -336,7 +338,7 @@ class spool {
         }
       }
     } else {
-     echo "<tr class=\"pair\">\n";
+     echo "<tr class=\"{$css['pair']}\">\n";
      echo "\t<td colspan=\"3\">\n";
      echo "\t\tNo post in this newsgroup\n";
      echo "\t</td>\n";
index 0ea5aca..ea3a699 100644 (file)
--- a/index.php
+++ b/index.php
@@ -34,13 +34,13 @@ $groups = new groups($nntp);
 
 ?>
 
-<div class="title">
+<div class="<?php echo $css["title"];?>">
   <?php echo $locale['index']['title'];?>
 </div>
 
 <?php
 if (!sizeof($groups->overview)) {
-  echo '<p class="normal">';
+  echo "<p class=\"{$css['normal']}\">";
   echo "\n".$locale['error']['nogroup']."\n";
   echo "</p>\n";
   require("include/footer.inc.php");
@@ -50,7 +50,7 @@ if (!sizeof($groups->overview)) {
 displayshortcuts();
 ?>
 
-<table class="bicol" cellspacing="0" cellpadding="2" 
+<table class="<?php echo $css["bicol"];?>" cellspacing="0" cellpadding="2" 
   summary="<?php echo $locale['index']['summary'];?>">
   <tr>
     <th>
@@ -73,17 +73,17 @@ foreach ($groups->overview as $g => $d) {
   $groupinfo = $nntp->group($g);
   $newarts = $nntp->newnews($profile['lastnews'],$g);
 ?>
-  <tr class="<?php echo ($pair?"pair":"impair");?>" >
-    <td class="total">
+  <tr class="<?php echo ($pair?$css["pair"]:$css["impair"]);?>" >
+    <td class="<?php echo $css["total"]; ?>">
       <?php echo $groupinfo[0]; ?>
     </td>
-    <td class="unread">
+    <td class="<?php echo $css["unread"]; ?>">
       <?php echo sizeof($newarts); ?>
     </td>
-    <td class="group">
+    <td class="<?php echo $css["group"]; ?>">
       <?php echo "<a href=\"thread.php?group=$g\">$g</a>";?>
     </td>
-    <td class="description">
+    <td class="<?php echo $css["description"]; ?>">
       <?php echo $d[0];?>
     </td>
   </tr>