[ Index ]
 

Code source de PHP NUKE 7.9

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/themes/Odyssey/ -> theme.php (source)

   1  <?php
   2  
   3  /************************************************************/

   4  /* IMPORTANT NOTE FOR THEMES DEVELOPERS!                    */

   5  /*                                                          */

   6  /* When you start cOdysseyng your theme, if you want to     */

   7  /* distribute it, please double check it to fit the HTML    */

   8  /* 4.01 Transitional Standard. You can use the W3 validator */

   9  /* located at http://validator.w3.org                       */

  10  /* If you don't know where to start with your theme, just   */

  11  /* start mOdysseyfying this theme, it's validate and is cool*/

  12  /************************************************************/

  13  
  14  /************************************************************/

  15  /* Theme Colors Definition                                  */

  16  /*                                                          */

  17  /* Define colors for your web site. $bgcolor2 is generaly   */

  18  /* used for the tables border as you can see on OpenTable() */

  19  /* function, $bgcolor1 is for the table background and the  */

  20  /* other two bgcolor variables follows the same criteria.   */

  21  /* $texcolor1 and 2 are for tables internal texts           */

  22  /************************************************************/

  23  
  24  global $loonr, $prefix, $db, $kokku;
  25  $kokku = $db->sql_numrows($db->sql_query("select * from ".$prefix."_stories LIMIT 0, 30 "));
  26  
  27  $bgcolor1 = "#FFFFFF";
  28  $bgcolor2 = "#00BBCC";
  29  $bgcolor3 = "#ffffff";
  30  $bgcolor4 = "#ffffff";
  31  $textcolor1 = "#000000";
  32  $textcolor2 = "#000000";
  33  
  34  if (empty($loonr)) {
  35      $loonr = "0";
  36  }
  37  
  38  include ("themes/Odyssey/tables.php");
  39  
  40  /************************************************************/

  41  /* Function themeheader()                                   */

  42  /*                                                          */

  43  /* Control the header for your site. You need to define the */

  44  /* BODY tag and in some part of the code call the blocks    */

  45  /* function for left side with: blocks(left);               */

  46  /************************************************************/

  47  
  48  function themeheader() {
  49      global $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $anonymous;
  50      cookiedecode($user);
  51      $username = $cookie[1];
  52      if (empty($username)) {
  53          $username = $anonymous;
  54      }
  55      echo "<body bgcolor=\"#004080\" text=\"#000000\" link=\"#004080\" vlink=\"#004080\" alink=\"#004080\">";
  56      ads(0);
  57      $topics_list = "<select name=\"topic\" onChange='submit()'>\n";
  58      $topics_list .= "<option value=\"\">All Topics</option>\n";
  59      $toplist = $db->sql_query("select topicid, topictext from ".$prefix."_topics order by topictext");
  60      while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
  61      $topicid = intval($topicid);
  62      if ($topicid==$topic) { $sel = "selected "; }
  63      $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
  64      $sel = "";
  65      }
  66      if ($username == $anonymous) {
  67      $theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account\">Create an account";
  68      } else {
  69      $theuser = "&nbsp;&nbsp;Welcome $username!";
  70      }
  71      $public_msg = public_message();
  72      $tmpl_file = "themes/Odyssey/header.html";
  73      $thefile = implode("", file($tmpl_file));
  74      $thefile = addslashes($thefile);
  75      $thefile = "\$r_file=\"".$thefile."\";";
  76      eval($thefile);
  77      print $r_file;
  78      blocks("left");
  79      $tmpl_file = "themes/Odyssey/left_center.html";
  80      $thefile = implode("", file($tmpl_file));
  81      $thefile = addslashes($thefile);
  82      $thefile = "\$r_file=\"".$thefile."\";";
  83      eval($thefile);
  84      print $r_file;
  85  }
  86  
  87  /************************************************************/

  88  /* Function themefooter()                                   */

  89  /*                                                          */

  90  /* Control the footer for your site. You don't need to      */

  91  /* close BODY and HTML tags at the end. In some part call   */

  92  /* the function for right blocks with: blocks(right);       */

  93  /* Also, $index variable need to be global and is used to   */

  94  /* determine if the page your're viewing is the Homepage or */

  95  /* and internal one.                                        */

  96  /************************************************************/

  97  
  98  function themefooter() {
  99      global $foot1, $foot2, $foot3, $foot4;
 100      if (defined('INDEX_FILE')) {
 101      $tmpl_file = "themes/Odyssey/center_right.html";
 102      $thefile = implode("", file($tmpl_file));
 103      $thefile = addslashes($thefile);
 104      $thefile = "\$r_file=\"".$thefile."\";";
 105      eval($thefile);
 106      print $r_file;
 107      blocks("right");
 108      }
 109      $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
 110      $tmpl_file = "themes/Odyssey/footer.html";
 111      $thefile = implode("", file($tmpl_file));
 112      $thefile = addslashes($thefile);
 113      $thefile = "\$r_file=\"".$thefile."\";";
 114      eval($thefile);
 115      print $r_file;
 116  }
 117  
 118  /************************************************************/

 119  /* Function themeindex()                                    */

 120  /*                                                          */

 121  /* This function format the stories on the Homepage         */

 122  /************************************************************/

 123  
 124  function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
 125      global $anonymous, $tipath, $cookie, $loonr, $vasak, $parem, $kokku, $storyhome, $storynum; 
 126      $ThemeSel = get_theme();
 127      if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
 128      $t_image = "themes/$ThemeSel/images/topics/$topicimage";
 129      } else {
 130      $t_image = "$tipath$topicimage";
 131      }
 132      $loonr = ($loonr+1);
 133      if (isset($cookie[3])) {
 134      $storynum = $cookie[3];
 135      } else {
 136      $storynum = $storyhome;
 137      }
 138      $ridaaa1 = round($loonr/2);
 139      if (!empty($notes)) {
 140      $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
 141      } else {
 142      $notes = "";
 143      }
 144      if ("$aid" == "$informant") {
 145      $content = "$thetext$notes\n";
 146      } else {
 147      if(!empty($informant)) {
 148          $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
 149      } else {
 150          $content = "$anonymous ";
 151      }
 152      $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
 153      }
 154      $posted = ""._POSTEDBY." ";
 155      $posted .= get_author($aid);
 156      $posted .= " "._ON." $time $timezone ($counter "._READS.")";
 157      if (($ridaaa1*2) != $loonr) {
 158      $tmpl_file = "themes/Odyssey/story_home.html";
 159      $thefile = implode("", file($tmpl_file));
 160      $thefile = addslashes($thefile);
 161      $thefile = "\$r_file=\"".$thefile."\";";
 162      eval($thefile);
 163      $vasak .= "$r_file";
 164      } else {
 165      $tmpl_file = "themes/Odyssey/story_home.html";
 166      $thefile = implode("", file($tmpl_file));
 167      $thefile = addslashes($thefile);
 168      $thefile = "\$r_file=\"".$thefile."\";";
 169      eval($thefile);
 170      $parem .= "$r_file";
 171      }
 172      if ($loonr == $storynum OR $loonr == $kokku) {
 173      echo "<table width=\"100%\" border=\"0\"  cellpadding=\"0\" cellspacing=\"0\">";
 174      echo "<tr>";
 175      echo "<td width=\"49%\" valign=\"top\">";
 176      print $vasak;
 177      echo "</td>";
 178      echo "<td width=\"5\" cellpadding=\"0\" cellspacing=\"0\" valign=\"top\"></td>";
 179      echo "<td width=\"49%\" valign=\"top\">";
 180      print $parem;
 181      echo "</td>";
 182      echo "</tr>";
 183      echo "</table>";
 184      }
 185  }
 186  
 187  /************************************************************/

 188  /* Function themeindex()                                    */

 189  /*                                                          */

 190  /* This function format the stories on the story page, when */

 191  /* you click on that "Read More..." link in the home        */

 192  /************************************************************/

 193  
 194  function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
 195      global $admin, $sid, $tipath;
 196      $ThemeSel = get_theme();
 197      if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
 198      $t_image = "themes/$ThemeSel/images/topics/$topicimage";
 199      } else {
 200      $t_image = "$tipath$topicimage";
 201      }
 202      $posted = ""._POSTEDON." $datetime "._BY." ";
 203      $posted .= get_author($aid);
 204      if (!empty($notes)) {
 205      $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
 206      } else {
 207      $notes = "";
 208      }
 209      if ("$aid" == "$informant") {
 210      $content = "$thetext$notes\n";
 211      } else {
 212      if(!empty($informant)) {
 213          $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
 214      } else {
 215          $content = "$anonymous ";
 216      }
 217      $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
 218      }
 219      $tmpl_file = "themes/Odyssey/story_page.html";
 220      $thefile = implode("", file($tmpl_file));
 221      $thefile = addslashes($thefile);
 222      $thefile = "\$r_file=\"".$thefile."\";";
 223      eval($thefile);
 224      print $r_file;
 225  }
 226  
 227  /************************************************************/

 228  /* Function themesidebox()                                  */

 229  /*                                                          */

 230  /* Control look of your blocks. Just simple.                */

 231  /************************************************************/

 232  
 233  function themesidebox($title, $content) {
 234      $tmpl_file = "themes/Odyssey/blocks.html";
 235      $thefile = implode("", file($tmpl_file));
 236      $thefile = addslashes($thefile);
 237      $thefile = "\$r_file=\"".$thefile."\";";
 238      eval($thefile);
 239      print $r_file;
 240  }
 241  
 242  ?>


Généré le : Sun Apr 1 11:11:59 2007 par Balluche grâce à PHPXref 0.7