Made my first theme but need some help Posted:
Thu Sep 25, 2008 3:55 pm |
|
|
|
|
|
ok well here is the code.
<?php
/************************************************************/
/* Theme Colors Definition */
/************************************************************/
// you change these colors to match your theme. Most of these colors are not used anymore due to the existence of the CSS file,
// but you should change them just for compatibility issues, especially with deisgns.
$bgcolor1 = "#000000";
$bgcolor2 = "#000000";
$bgcolor3 = "#000000";
$bgcolor4 = "#000000";
$textcolor1 = "#ffffff";
$textcolor2 = "#ffffff";
/************************************************************/
/* OpenTable Functions */
/************************************************************/
function OpenTable() {
?><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46" height="49"><img src="themes/serenity/images/storytopleft.gif" width="46" height="49"></td>
<td valign="top" style="background-image:url(themes/serenity/images/Storytoprepeat.gif)"></td>
<td width="52"><img src="themes/serenity/images/storytopright.gif" width="52" height="49"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" style="background-image:url(themes/serenity/images/storyleft.gif)"><img src="themes/serenity/images/storyleft.gif" width="10" height="1"></td>
<td valign="top" style="background-color:#000000"></p>
<?
}
function CloseTable(){
?><td width="10" style="background-image:url(themes/serenity/images/storyright.gif)"><img src="themes/serenity/images/storyright.gif" width="13" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11"><img src="themes/serenity/images/storybotleft.gif" width="11" height="16"></td>
<td style="background-image:url(themes/serenity/images/storybotrepeat.gif)"><img src="themes/serenity/images/storybotrepeat.gif" width="1" height="15"></td>
<td width="14"><img src="themes/serenity/images/storybotright.gif" width="14" height="15"></td>
</tr>
</table>
<td>
</td>
</table><?
}
//function OpenTable2() {
//echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\"><tr><td class=extra>\n";
// echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" ><tr><td>\n";
//}
//function CloseTable2(){
//echo "</td></tr></table></td></tr></table>\n";
//}
/************************************************************/
/* FormatStory */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>";}
else { $notes = "";}
if ("$aid" == "$informant") { echo "<font class=\"content\" color=\"#505050\">$thetext$notes</font>";}
else {
if($informant != "") {$boxstuff = "News submitted by: <a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a><br><br>";}
else {$boxstuff = "News submitted by: $anonymous<br><br>";}
$boxstuff .= "$thetext$notes";
echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>";
}
}
/************************************************************/
/* Function themeheader() */
/************************************************************/
function themeheader() {
####################### ALL YOUR HEADER HTML CODE IN HERE ##########################
echo"<html>"
. "<head>"
. "<title>Header</title>"
. "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">"
. "<style type=\"text/css\">"
. "<!--"
. "body {"
. "background-color: #000000;"
. ""
. "body,td,th {"
. "color: #FFCC00;"
. ""
. "-->"
. "</style></head>"
. "<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">"
. "<div align=\"center\">"
. " <!-- ImageReady Slices (Untitled-1) -->"
. " <table id=\"Table_01\" width=\"800\" height=\"350\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
. " <tr>"
. " <td colspan=\"8\">"
. " <img src=\"themes/serenity/images/Header_01.gif\" alt=\"\" width=\"800\" height=\"238\" align=\"absmiddle\"></td>"
. " </tr>"
. " <tr>"
. " <td rowspan=\"2\">"
. " <img src=\"themes/serenity/images/Header_02.gif\" width=\"50\" height=\"112\" alt=\"\"></td>"
. " <td>"
. " <a href=\"http://forsig.com/Serenity/index.php\">"
. " <img src=\"themes/serenity/images/Home.gif\" alt=\"\" width=\"107\" height=\"85\" border=\"0\" align=\"middle\"></a></td>"
. " <td>"
. " <a href=\"http://forsig.com/Serenity/modules.php?name=Forums\">"
. " <img src=\"themes/serenity/images/Forum.gif\" alt=\"\" width=\"106\" height=\"85\" border=\"0\" align=\"middle\"></a></td>"
. " <td>"
. " <a href=\"http://www.wardb.com/guild.aspx?id=2236\">"
. " <img src=\"themes/serenity/images/Roster.gif\" alt=\"\" width=\"108\" height=\"85\" border=\"0\" align=\"middle\"></a></td>"
. " <td>"
. " <a href=\"http://forsig.com/Serenity/modules.php?name=coppermine\">"
. " <img src=\"themes/serenity/images/Gallery.gif\" alt=\"\" width=\"111\" height=\"85\" border=\"0\" align=\"middle\"></a></td>"
. " <td>"
. " <a href=\"http://forsig.com/Serenity/modules.php?name=PRO_Forms\">"
. " <img src=\"themes/serenity/images/Apply.gif\" alt=\"\" width=\"111\" height=\"85\" border=\"0\" align=\"middle\"></a></td>"
. " <td>"
. " <a href=\"http://forsig.com/Serenity/modules.php?name=Your_Account\">"
. " <img src=\"themes/serenity/images/Account.gif\" alt=\"\" width=\"109\" height=\"85\" border=\"0\" align=\"middle\"></a></td>"
. " <td rowspan=\"2\">"
. " <img src=\"themes/serenity/images/Header_09.gif\" width=\"98\" height=\"112\" alt=\"\"></td>"
. " </tr>"
. " <tr>"
. " <td colspan=\"2\"><div align=\"center\">Welcome, $theuser</div></td>"
. " <td colspan=\"2\">"
. " <img src=\"themes/serenity/images/blank.gif\" width=\"219\" height=\"27\" alt=\"\"></td>"
. " <td colspan=\"2\">"
. " <div align=\"center\">"
. " <!-- Simple Javascript to show date -->"
. " <script type=\"text/javascript\">"
. "<!-- // Array ofmonth Names"
. "var monthNames = new Array( \"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");"
. "var now = new Date();"
. "thisYear = now.getYear();"
. "if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem"
. "document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);"
. "// -->"
. " </script>"
. " </font> </div></TD>"
. " </TR>"
. " <img src=\"themes/serenity/images/Date-and-time.gif\" width=\"220\" height=\"27\" alt=\"\"></td>"
. " </tr>"
. " </table>"
. " <!-- End ImageReady Slices -->"
. "</div>"
. "</body>"
. "</html>"
."";
#####################################################################################
//this is the block code.
echo "<table width=\"175\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">"
."<tr valign=\"top\"><td width=\"175\" valign=\"top\">".blocks(left)."</td><td width=\"175\">";
}
/************************************************************/
/* Function themefooter() */
/************************************************************/
function themefooter() {
// right blocks code
echo "</td>"
."<td width=\"180\" valign=\"top\">".blocks(right)."</td></tr></table>";
########## INPUT YOUR FOOTER HTML CODE BETWEEN THESE LINES ##############
echo "<html>";
echo "<head>";
echo "<title>foot</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">";
echo "<style type=\"text/css\">";
echo "<!--";
echo "body,td,th {";
echo " color: #FFCC00;";
echo "}";
echo "body {";
echo " background-color: #000000;";
echo "}";
echo "-->";
echo "</style></head>";
echo "<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
echo "<div align=\"center\">";
echo " <!-- ImageReady Slices (foot.psd) -->";
echo " <table width=\"700\" height=\"150\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\" id=\"Table_01\">";
echo " <tr>";
echo " <td>";
echo " <img src=\"themes/serenity/images/footer.gif\" width=\"634\" height=\"100\" alt=\"\">";
echo " <script type=\"text/javascript\">";
echo "$footer_message";
echo " </script></td>";
echo " <td>";
echo " <img src=\"themes/serenity/images/rooter-repeat.gif\" width=\"16\" height=\"100\" alt=\"\"></td>";
echo " <td>";
echo " <img src=\"themes/serenity/images/footer-2.gif\" width=\"50\" height=\"100\" alt=\"\"></td>";
echo " </tr>";
echo " </table>";
echo " <!-- End ImageReady Slices -->";
echo "</div>";
echo "</body>";
echo "</html>";
#########################################################################
}
/************************************************************/
/* Function themeindex() */
/* This function format the stories on the Homepage */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
if ($notes != "") {
$notes = "<br><br><b>Admin's Comment:</b> $notes";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes";
} else {
if($informant != "") {
$content = "News submitted by: <a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a><br><br>";
} else {
$content = "News submitted by: <i>$anonymous</i><br><br>";
}
$content .= "$thetext$notes";
}
//Code Changed - just show posted by
$posted = ""._POSTEDBY." ";
$posted .= get_author($aid);
$posted .= " "._ON." $time $timezone ";
//End Code Change
$tmpl_file = "themes/serenity/story.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themeindex() */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
$posted = ""._POSTEDON." $datetime "._BY." ";
$posted .= get_author($aid);
if ($notes != "") {
$notes = "<br><br><b>Admin's Comment:</b> <i>$notes</i>";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes";
} else {
if($informant != "") {
$content = "News submitted by: <a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a><br><br> ";
} else {
$content = "News submitted by: <i>$anonymous</i><br><br>";
}
$content .= "$thetext$notes";
}
$tmpl_file = "themes/serenity/News.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themesidebox() */
/************************************************************/
function themesidebox($title, $content) {
global $swapleftright, $bgcolor1, $bgcolor2;
$tmpl_file = "themes/serenity/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
?>
|
|
|
|