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 24global $loonr, $prefix, $dbi, $kokku; 25 26$bgcolor1 = "#FFFFFF"; 27$bgcolor2 = "#00BBCC"; 28$bgcolor3 = "#ffffff"; 29$bgcolor4 = "#ffffff"; 30$textcolor1 = "#000000"; 31$textcolor2 = "#000000"; 32 33if ($loonr == "") { 34 $loonr = "0"; 35} 36 37include("themes/Odyssey/tables.php"); 38 39/************************************************************/ 40/* Function themeheader() */ 41/* */ 42/* Control the header for your site. You need to define the */ 43/* BODY tag and in some part of the code call the blocks */ 44/* function for left side with: blocks(left); */ 45/************************************************************/ 46 47function themeheader() { 48 global $sitename, $slogan; 49 $username = $GLOBALS['phpgw_info']['user']['account_lid']; 50 echo "<body bgcolor=\"#004080\" text=\"#000000\" link=\"#004080\" vlink=\"#004080\" alink=\"#004080\">"; 51 if ($banners) { 52 include("banners.php"); 53 } 54 if (!is_user()) 55 { 56 $theuser = " <a href=\"{?phpgw:/registration/}\">Create an account</a>"; 57 } 58 else 59 { 60 $theuser = " Welcome $username!"; 61 } 62 $tmpl_file = "themes/Odyssey/header.html"; 63 $thefile = implode("", file($tmpl_file)); 64 $thefile = addslashes($thefile); 65 $thefile = "\$r_file=\"".$thefile."\";"; 66 $thefile = parse_theme_vars($thefile); 67 eval($thefile); 68 print $r_file; 69 blocks(left); 70 $tmpl_file = "themes/Odyssey/left_center.html"; 71 $thefile = implode("", file($tmpl_file)); 72 $thefile = addslashes($thefile); 73 $thefile = "\$r_file=\"".$thefile."\";"; 74 $thefile = parse_theme_vars($thefile); 75 eval($thefile); 76 print $r_file; 77} 78 79/************************************************************/ 80/* Function themefooter() */ 81/* */ 82/* Control the footer for your site. You don't need to */ 83/* close BODY and HTML tags at the end. In some part call */ 84/* the function for right blocks with: blocks(right); */ 85/* Also, $index variable need to be global and is used to */ 86/* determine if the page your're viewing is the Homepage or */ 87/* and internal one. */ 88/************************************************************/ 89 90function themefooter() { 91 global $index, $foot1, $foot2, $foot3, $foot4; 92 if ($index == 1) { 93 $tmpl_file = "themes/Odyssey/center_right.html"; 94 $thefile = implode("", file($tmpl_file)); 95 $thefile = addslashes($thefile); 96 $thefile = "\$r_file=\"".$thefile."\";"; 97 $thefile = parse_theme_vars($thefile); 98 eval($thefile); 99 print $r_file; 100 blocks(right); 101 } 102 $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4"; 103 $tmpl_file = "themes/Odyssey/footer.html"; 104 $thefile = implode("", file($tmpl_file)); 105 $thefile = addslashes($thefile); 106 $thefile = "\$r_file=\"".$thefile."\";"; 107 $thefile = parse_theme_vars($thefile); 108 eval($thefile); 109 print $r_file; 110} 111 112/************************************************************/ 113/* Function themeindex() */ 114/* */ 115/* This function format the stories on the Homepage */ 116/************************************************************/ 117 118function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) { 119 global $anonymous, $tipath, $cookie, $loonr, $vasak, $parem, $kokku, $storyhome, $storynum; 120 $loonr = ($loonr+1); 121 if (isset($cookie[3])) { 122 $storynum = $cookie[3]; 123 } else { 124 $storynum = $storyhome; 125 } 126 $ridaaa1 = round($loonr/2); 127 if ($notes != "") { 128 $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n"; 129 } else { 130 $notes = ""; 131 } 132 if ("$aid" == "$informant") { 133 $content = "$thetext$notes\n"; 134 } else { 135 if($informant != "") { 136 $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> "; 137 } else { 138 $content = "$anonymous "; 139 } 140 $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n"; 141 } 142 $posted = ""._POSTEDBY." "; 143 $posted .= get_author($aid); 144 $posted .= " "._ON." $time $timezone ($counter "._READS.")"; 145 if (($ridaaa1*2) != $loonr) { 146 $tmpl_file = "themes/Odyssey/story_home.html"; 147 $thefile = implode("", file($tmpl_file)); 148 $thefile = addslashes($thefile); 149 $thefile = "\$r_file=\"".$thefile."\";"; 150 $thefile = parse_theme_vars($thefile); 151 eval($thefile); 152 $vasak .= "$r_file"; 153 } else { 154 $tmpl_file = "themes/Odyssey/story_home.html"; 155 $thefile = implode("", file($tmpl_file)); 156 $thefile = addslashes($thefile); 157 $thefile = "\$r_file=\"".$thefile."\";"; 158 $thefile = parse_theme_vars($thefile); 159 eval($thefile); 160 $parem .= "$r_file"; 161 } 162 if ($loonr == $storynum OR $loonr == $kokku) { 163 echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; 164 echo "<tr>"; 165 echo "<td width=\"49%\" valign=\"top\">"; 166 print $vasak; 167 echo "</td>"; 168 echo "<td width=\"5\" cellpadding=\"0\" cellspacing=\"0\" valign=\"top\"></td>"; 169 echo "<td width=\"49%\" valign=\"top\">"; 170 print $parem; 171 echo "</td>"; 172 echo "</tr>"; 173 echo "</table>"; 174 } 175} 176 177/************************************************************/ 178/* Function themeindex() */ 179/* */ 180/* This function format the stories on the story page, when */ 181/* you click on that "Read More..." link in the home */ 182/************************************************************/ 183 184function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) { 185 global $admin, $sid; 186 $posted = ""._POSTEDON." $datetime "._BY." "; 187 $posted .= get_author($aid); 188 if ($notes != "") { 189 $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n"; 190 } else { 191 $notes = ""; 192 } 193 if ("$aid" == "$informant") { 194 $content = "$thetext$notes\n"; 195 } else { 196 if($informant != "") { 197 $content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> "; 198 } else { 199 $content = "$anonymous "; 200 } 201 $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n"; 202 } 203 $tmpl_file = "themes/Odyssey/story_page.html"; 204 $thefile = implode("", file($tmpl_file)); 205 $thefile = addslashes($thefile); 206 $thefile = "\$r_file=\"".$thefile."\";"; 207 $thefile = parse_theme_vars($thefile); 208 eval($thefile); 209 print $r_file; 210} 211 212/************************************************************/ 213/* Function themesidebox() */ 214/* */ 215/* Control look of your blocks. Just simple. */ 216/************************************************************/ 217 218function themesidebox($title, $content) { 219 $tmpl_file = "themes/Odyssey/blocks.html"; 220 $thefile = implode("", file($tmpl_file)); 221 $thefile = addslashes($thefile); 222 $thefile = "\$r_file=\"".$thefile."\";"; 223 $thefile = parse_theme_vars($thefile); 224 eval($thefile); 225 print $r_file; 226} 227 228?> 229