[ Index ]
 

Code source de PHP NUKE 7.9

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

title

Body

[fermer]

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

   1  <?php
   2  
   3  /************************************************************/
   4  /* IMPORTANT NOTE FOR THEMES DEVELOPERS!                    */
   5  /*                                                          */
   6  /* When you start coding 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 modifying 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  $bgcolor1 = "#efefef";
  25  $bgcolor2 = "#cfcfbb";
  26  $bgcolor3 = "#efefef";
  27  $bgcolor4 = "#cfcfbb";
  28  $textcolor1 = "#000000";
  29  $textcolor2 = "#000000";
  30  
  31  include ("themes/NukeNews/tables.php");
  32  
  33  /************************************************************/
  34  /* Function themeheader()                                   */
  35  /*                                                          */
  36  /* Control the header for your site. You need to define the */
  37  /* BODY tag and in some part of the code call the blocks    */
  38  /* function for left side with: blocks(left);               */
  39  /************************************************************/
  40  
  41  function themeheader() {
  42      global $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $anonymous;
  43      cookiedecode($user);
  44      $username = $cookie[1];
  45      if (empty($username)) {
  46          $username = $anonymous;
  47      }
  48      echo "<body bgcolor=\"#505050\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
  49      ads(0);
  50      $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
  51      $topics_list .= "<option value=\"\">All Topics</option>\n";
  52      $toplist = $db->sql_query("select topicid, topictext from ".$prefix."_topics order by topictext");
  53      while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
  54      $topicid = intval($topicid);
  55      if ($topicid==$topic) { $sel = "selected "; }
  56      $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
  57      $sel = "";
  58      }
  59      if ($username == $anonymous) {
  60      $theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
  61      } else {
  62      $theuser = "&nbsp;&nbsp;Welcome $username!";
  63      }
  64      $public_msg = public_message();
  65      $tmpl_file = "themes/NukeNews/header.html";
  66      $thefile = implode("", file($tmpl_file));
  67      $thefile = addslashes($thefile);
  68      $thefile = "\$r_file=\"".$thefile."\";";
  69      eval($thefile);
  70      print $r_file;
  71      blocks("left");
  72      $tmpl_file = "themes/NukeNews/left_center.html";
  73      $thefile = implode("", file($tmpl_file));
  74      $thefile = addslashes($thefile);
  75      $thefile = "\$r_file=\"".$thefile."\";";
  76      eval($thefile);
  77      print $r_file;
  78  }
  79  
  80  /************************************************************/
  81  /* Function themefooter()                                   */
  82  /*                                                          */
  83  /* Control the footer for your site. You don't need to      */
  84  /* close BODY and HTML tags at the end. In some part call   */
  85  /* the function for right blocks with: blocks(right);       */
  86  /* Also, $index variable need to be global and is used to   */
  87  /* determine if the page your're viewing is the Homepage or */
  88  /* and internal one.                                        */
  89  /************************************************************/
  90  
  91  function themefooter() {
  92      global $foot1, $foot2, $foot3, $copyright, $totaltime;
  93      if (defined('INDEX_FILE')) {
  94      $tmpl_file = "themes/NukeNews/center_right.html";
  95      $thefile = implode("", file($tmpl_file));
  96      $thefile = addslashes($thefile);
  97      $thefile = "\$r_file=\"".$thefile."\";";
  98      eval($thefile);
  99      print $r_file;
 100      blocks("right");
 101      }
 102      $footer_message = "$foot1<br>$foot2<br>$foot3<br>$copyright<br>$totaltime";
 103      $tmpl_file = "themes/NukeNews/footer.html";
 104      $thefile = implode("", file($tmpl_file));
 105      $thefile = addslashes($thefile);
 106      $thefile = "\$r_file=\"".$thefile."\";";
 107      eval($thefile);
 108      print $r_file;
 109  }
 110  
 111  /************************************************************/
 112  /* Function themeindex()                                    */
 113  /*                                                          */
 114  /* This function format the stories on the Homepage         */
 115  /************************************************************/
 116  
 117  function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
 118      global $anonymous, $tipath;
 119      $ThemeSel = get_theme();
 120      if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
 121      $t_image = "themes/$ThemeSel/images/topics/$topicimage";
 122      } else {
 123      $t_image = "$tipath$topicimage";
 124      }
 125      if (!empty($notes)) {
 126      $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
 127      } else {
 128      $notes = "";
 129      }
 130      if ("$aid" == "$informant") {
 131      $content = "$thetext$notes\n";
 132      } else {
 133      if(!empty($informant)) {
 134          $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
 135      } else {
 136          $content = "$anonymous ";
 137      }
 138      $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
 139      }
 140      $posted = ""._POSTEDBY." ";
 141      $posted .= get_author($aid);
 142      $posted .= " "._ON." $time $timezone ($counter "._READS.")";
 143      $tmpl_file = "themes/NukeNews/story_home.html";
 144      $thefile = implode("", file($tmpl_file));
 145      $thefile = addslashes($thefile);
 146      $thefile = "\$r_file=\"".$thefile."\";";
 147      eval($thefile);
 148      print $r_file;
 149  }
 150  
 151  /************************************************************/
 152  /* Function themearticle()                                  */
 153  /*                                                          */
 154  /* This function format the stories on the story page, when */
 155  /* you click on that "Read More..." link in the home        */
 156  /************************************************************/
 157  
 158  function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
 159      global $admin, $sid, $tipath;
 160      $ThemeSel = get_theme();
 161      if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
 162      $t_image = "themes/$ThemeSel/images/topics/$topicimage";
 163      } else {
 164      $t_image = "$tipath$topicimage";
 165      }
 166      $posted = ""._POSTEDON." $datetime "._BY." ";
 167      $posted .= get_author($aid);
 168      if (!empty($notes)) {
 169      $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
 170      } else {
 171      $notes = "";
 172      }
 173      if ("$aid" == "$informant") {
 174      $content = "$thetext$notes\n";
 175      } else {
 176      if(!empty($informant)) {
 177          $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
 178      } else {
 179          $content = "$anonymous ";
 180      }
 181      $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
 182      }
 183      $tmpl_file = "themes/NukeNews/story_page.html";
 184      $thefile = implode("", file($tmpl_file));
 185      $thefile = addslashes($thefile);
 186      $thefile = "\$r_file=\"".$thefile."\";";
 187      eval($thefile);
 188      print $r_file;
 189  }
 190  
 191  /************************************************************/
 192  /* Function themesidebox()                                  */
 193  /*                                                          */
 194  /* Control look of your blocks. Just simple.                */
 195  /************************************************************/
 196  
 197  function themesidebox($title, $content) {
 198      $tmpl_file = "themes/NukeNews/blocks.html";
 199      $thefile = implode("", file($tmpl_file));
 200      $thefile = addslashes($thefile);
 201      $thefile = "\$r_file=\"".$thefile."\";";
 202      eval($thefile);
 203      print $r_file;
 204  }
 205  
 206  ?>


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