Author |
Message |
derek765
Regular
Joined: Sep 27, 2012
Posts: 99
Location: Okinawa, Japan
|
Posted:
Sat Dec 01, 2012 11:49 pm |
|
I did a recent Markup Validation of my site and it seems the
THEME/theme.php is loading that echo script above my DOCTYPE of my website, here is the viewed source code of my website
Code:<script type="text/javascript" src="themes/MorpheusX/forums/fading.js"></script><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
MY THEME/theme.php
Code:<?php
if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');
$bgcolor1 = "#F8F8F8";
$bgcolor2 = "#F8F8F8";
$bgcolor3 = "#EAEAEA";
$bgcolor4 = "#F8F8F8";
$textcolor1 = "#000000";
$textcolor2 = "#48A044";
echo "<script type=\"text/javascript\" src=\"themes/MorpheusX/forums/fading.js\"></script>";
/************************************************************/
/* OpenTable Functions */
/************************************************************/
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table class=\"forumline\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr>";
echo "<td>";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "</td></tr></table>";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table class=\"forumline\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr>";
echo "<td>";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "</td></tr></table>";
}
/************************************************************/
/* Format Stories */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> $notes\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\">$thetext$notes</font>\n";
} else {
if($informant != "") {
$boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= ""._WRITES.": $thetext $notes\n";
echo "<font class=\"content\">$boxstuff</font>\n";
}
}
/************************************************************/
/* Function themeheader() */
/************************************************************/
function themeheader() {
global $sitename, $admin, $index, $user, $cookie, $user_prefix, $userinfo, $prefix, $db, $banners, $name, $Version_Num, $currentlang;
if ($Version_Num > "7.7") {
$showbanners = ads(0);
} else {
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
if ($numrows>1) {
$numrows = $numrows-1;
mt_srand((double)microtime()*1000000);
$bannum = mt_rand(0, $numrows);
} else {
$bannum = 0;
}
$sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$bid = $row[bid];
$imageurl = $row[imageurl];
$clickurl = $row[clickurl];
$alttext = $row[alttext];
if (!is_admin($admin)) {
$db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
}
if($numrows>0) {
$sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
$result2 = $db->sql_query($sql2);
$row2 = $db->sql_fetchrow($result2);
$cid = $row2[cid];
$imptotal = $row2[imptotal];
$impmade = $row2[impmade];
$clicks = $row2[clicks];
$date = $row2[date];
if (($imptotal <= $impmade) AND ($imptotal != 0)) {
$db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
$sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$c_name = $row3[name];
$c_contact = $row3[contact];
$c_email = $row3[email];
if ($c_email != "") {
$from = "$sitename <$adminmail>";
$to = "$c_contact <$c_email>";
$message = ""._HELLO." $c_contact:\n\n";
$message .= ""._THISISAUTOMATED."\n\n";
$message .= ""._THERESULTS."\n\n";
$message .= ""._TOTALIMPRESSIONS." $imptotal\n";
$message .= ""._CLICKSRECEIVED." $clicks\n";
$message .= ""._IMAGEURL." $imageurl\n";
$message .= ""._CLICKURL." $clickurl\n";
$message .= ""._ALTERNATETEXT." $alttext\n\n";
$message .= ""._HOPEYOULIKED."\n\n";
$message .= ""._THANKSUPPORT."\n\n";
$message .= "- $sitename "._TEAM."\n";
$message .= "$nukeurl";
$subject = "$sitename: "._BANNERSFINNISHED."";
mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
}
$showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" alt='$alttext' title='$alttext'></a> ";
}
}
}
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
if ($currentlang == "thai") {
define("_HOME","˹éÒáá");
define("_FORUMS","¡Ãдҹ¢èÒÇ");
define("_DOWNLOADS","´ÒǹìâËÅ´");
define("_YA","ÊÓËÃѺÊÁÒªÔ¡");
define("_OR","ËÃ×Í");
$thaiyear = 543;
} else {
define("_HOME","Home");
define("_FORUMS","Forums");
define("_DOWNLOADS","Downloads");
define("_YA","Your Account");
define("_OR","or");
$thaiyear = 0;
}
$aaa = 543;
if ($username == "Anonymous") {
$theuser = "<a href=\"account.html\">"._LOGIN."</a> "._OR." <a href=\"account-new_user.html\">"._BREG."</a>";
} else {
$theuser = "<font color=\"#53AC4F\"><b>"._BWEL."</b></font> $username!";
}
$datetime = "<script type=\"text/javascript\">\n\n";
$datetime .= "<!-- // Array ofmonth Names\n";
$datetime .= "var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\""._SEPTEMBER."\",\""._OCTOBER."\",\""._NOVEMBER."\",\""._DECEMBER."\");\n";
$datetime .= "var now = new Date();\n";
$datetime .= "var thisYear = now.getYear();\n";
$datetime .= "if(thisYear < 1900) {thisYear += 1900;} // corrections if Y2K display problem\n";
$datetime .= "document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n";
$datetime .= "// -->\n\n";
$datetime .= "</script>";
$public_msg = public_message();
echo "<table id=\"forum\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
echo "<tr>";
echo "<td class=\"forum-header\" align=\"center\" valign=\"top\">";
echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
echo "<tr>";
echo "<td width=\"60%\" height=\"80\"><a href=\"index.php\"><img src=\"images/undergroundkinglogo.png\" title=\"$sitename\"></a></td>";
echo "<td width=\"40%\" style=\"PADDING-right: 2px\" height=\"80\">$showbanners</td>";
echo "</tr></table>";
echo "<table height=\"20\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td align=\"center\" class=\"forum-buttons\" width=\"160\" nowrap> $theuser</td>";
echo "<td align=\"center\" class=\"forum-buttons\">";
//URL Links
echo "• <a href=\"index.php\">"._HOME."</a> • ";
echo "<a href=\"forums.html\">"._FORUMS."</a> • ";
echo "<a href=\"downloads.html\">"._DOWNLOADS."</a> • ";
echo "<a href=\"account.html\">"._YA."</a> • ";
//End URL Links
echo "</td>";
echo "<td align=\"right\" class=\"forum-buttons\" width=\"125\" nowrap>$datetime";
echo " </td></tr></table>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">";
echo "<tr valign=\"top\">";
echo "<td>$public_msg</td>";
echo "</tr></table>";
echo "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\">";
echo "<tr>";
echo "<td valign=\"top\">";
if ($name=='Forums') {
/* Don't display it. */
}
else
if ($name=='Members_List') {
/* Don't display it. */
}
else
if ($name=='Private_Messages') {
/* Don't display it. */
}
else {
blocks(left);
}
echo"</td><td valign=\"top\" width=\"100%\">";
}
/************************************************************/
/* Function themefooter() */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $total_time, $start_time, $footer_message;
if (defined('INDEX_FILE') || ($index == 1)) {
echo"</td><td valign=\"top\" width=\"170\">";
blocks(right);
}
$footer_message = "$foot1<br>$foot2<br>$foot3<br>";
echo "</td></tr></table>\n";
echo "<table cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" border=\"0\">";
echo "<tr><td id=\"copyright\" align=\"center\">$footer_message";
echo "</td></tr></table>";
}
/************************************************************/
/* Function themeindex() */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath, $sitename;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
echo "<table class=\"forumline\" border=\"0\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\"><tr>";
echo "<td class=\"row-header\"><span>$title</span></td>";
echo "<tr>";
echo "<td><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr><td>";
echo "<a href=\"article-topic-.html$topic\"><img onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this) src=\"$t_image\" alt=\"$topictext\" hspace=\"10\" vspace=\"10\" align=\"left\"></a>";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td></tr></table></td></tr></table>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td id=\"news-footer\">";
echo ""._POSTEDBY.": <a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\"><b>$informant</b></a> ";
echo ""._ON." $time $timezone";
echo "</td>";
echo "<td id=\"news-footer\" align=\"right\" >$morelink</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* Function themearticle() */
/************************************************************/
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";
}
echo "<table class=\"forumline\" border=\"0\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\"><tr>";
echo "<td class=\"row-header\"><span>$title</span></td>";
echo "<tr>";
echo "<td><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr><td>";
echo "<a href=\"article-topic-.html$topic\"><img onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this) src=\"$t_image\" alt=\"$topictext\" hspace=\"10\" vspace=\"10\" align=\"left\"></a>";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td></tr></table></td></tr></table>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td height=\"22\" id=\"news-footer\">"._POSTEDBY.": <b>";
formatAidHeader($aid);
echo "</b> "._ON." $datetime</td>";
echo "<td id=\"news-footer\" align=\"right\" >$morelink</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* Function themesidebox() */
/************************************************************/
function themesidebox($title, $content) {
echo "<table border=\"0\" class=\"forumline\" cellspacing=\"0\" width=\"170\" cellpadding=\"3\"><tr>";
echo "<td class=\"row-block\" width=\"100%\">";
echo "<span>$title</span>";
echo "</td></tr>";
echo "<tr><td class=\"row1\" width=\"170\">$content";
echo "</td></tr></table>";
}
?>
|
|
|
|
|
|
nuken
RavenNuke(tm) Development Team
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Sun Dec 02, 2012 5:58 am |
|
What does fading,js do? Is it just used in the forums or is used theme wide? |
_________________ Tricked Out News |
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 6:03 am |
|
Try this.
Code:<?php
if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');
$bgcolor1 = "#F8F8F8";
$bgcolor2 = "#F8F8F8";
$bgcolor3 = "#EAEAEA";
$bgcolor4 = "#F8F8F8";
$textcolor1 = "#000000";
$textcolor2 = "#48A044";
//echo "<script type=\"text/javascript\" src=\"themes/MorpheusX/forums/fading.js\"></script>";
/************************************************************/
/* OpenTable Functions */
/************************************************************/
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table class=\"forumline\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr>";
echo "<td>";
}
function CloseTable() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "</td></tr></table>";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table class=\"forumline\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr>";
echo "<td>";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table></td></tr></table></td></tr></table>";
echo "</td></tr></table>";
}
/************************************************************/
/* Format Stories */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> $notes\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\">$thetext$notes</font>\n";
} else {
if($informant != "") {
$boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= ""._WRITES.": $thetext $notes\n";
echo "<font class=\"content\">$boxstuff</font>\n";
}
}
/************************************************************/
/* Function themeheader() */
/************************************************************/
function themeheader() {
global $sitename, $admin, $index, $user, $cookie, $user_prefix, $userinfo, $prefix, $db, $banners, $name, $Version_Num, $currentlang;
addJSToHead('themes/MorpheusX/forums/fading.js','file');
if ($Version_Num > "7.7") {
$showbanners = ads(0);
} else {
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
if ($numrows>1) {
$numrows = $numrows-1;
mt_srand((double)microtime()*1000000);
$bannum = mt_rand(0, $numrows);
} else {
$bannum = 0;
}
$sql = "SELECT bid, imageurl, clickurl, alttext FROM ".$prefix."_banner WHERE type='0' AND active='1' LIMIT $bannum,1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$bid = $row[bid];
$imageurl = $row[imageurl];
$clickurl = $row[clickurl];
$alttext = $row[alttext];
if (!is_admin($admin)) {
$db->sql_query("UPDATE ".$prefix."_banner SET impmade=impmade+1 WHERE bid='$bid'");
}
if($numrows>0) {
$sql2 = "SELECT cid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE bid='$bid'";
$result2 = $db->sql_query($sql2);
$row2 = $db->sql_fetchrow($result2);
$cid = $row2[cid];
$imptotal = $row2[imptotal];
$impmade = $row2[impmade];
$clicks = $row2[clicks];
$date = $row2[date];
if (($imptotal <= $impmade) AND ($imptotal != 0)) {
$db->sql_query("UPDATE ".$prefix."_banner SET active='0' WHERE bid='$bid'");
$sql3 = "SELECT name, contact, email FROM ".$prefix."_bannerclient WHERE cid='$cid'";
$result3 = $db->sql_query($sql3);
$row3 = $db->sql_fetchrow($result3);
$c_name = $row3[name];
$c_contact = $row3[contact];
$c_email = $row3[email];
if ($c_email != "") {
$from = "$sitename <$adminmail>";
$to = "$c_contact <$c_email>";
$message = ""._HELLO." $c_contact:\n\n";
$message .= ""._THISISAUTOMATED."\n\n";
$message .= ""._THERESULTS."\n\n";
$message .= ""._TOTALIMPRESSIONS." $imptotal\n";
$message .= ""._CLICKSRECEIVED." $clicks\n";
$message .= ""._IMAGEURL." $imageurl\n";
$message .= ""._CLICKURL." $clickurl\n";
$message .= ""._ALTERNATETEXT." $alttext\n\n";
$message .= ""._HOPEYOULIKED."\n\n";
$message .= ""._THANKSUPPORT."\n\n";
$message .= "- $sitename "._TEAM."\n";
$message .= "$nukeurl";
$subject = "$sitename: "._BANNERSFINNISHED."";
mail($to, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
}
$showbanners = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" alt='$alttext' title='$alttext'></a> ";
}
}
}
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
if ($currentlang == "thai") {
define("_HOME","˹éÒáá");
define("_FORUMS","¡Ãдҹ¢èÒÇ");
define("_DOWNLOADS","´ÒǹìâËÅ´");
define("_YA","ÊÓËÃѺÊÁÒªÔ¡");
define("_OR","ËÃ×Í");
$thaiyear = 543;
} else {
define("_HOME","Home");
define("_FORUMS","Forums");
define("_DOWNLOADS","Downloads");
define("_YA","Your Account");
define("_OR","or");
$thaiyear = 0;
}
$aaa = 543;
if ($username == "Anonymous") {
$theuser = "<a href=\"account.html\">"._LOGIN."</a> "._OR." <a href=\"account-new_user.html\">"._BREG."</a>";
} else {
$theuser = "<font color=\"#53AC4F\"><b>"._BWEL."</b></font> $username!";
}
$datetime = "<script type=\"text/javascript\">\n\n";
$datetime .= "<!-- // Array ofmonth Names\n";
$datetime .= "var monthNames = new Array( \""._JANUARY."\",\""._FEBRUARY."\",\""._MARCH."\",\""._APRIL."\",\""._MAY."\",\""._JUNE."\",\""._JULY."\",\""._AUGUST."\",\""._SEPTEMBER."\",\""._OCTOBER."\",\""._NOVEMBER."\",\""._DECEMBER."\");\n";
$datetime .= "var now = new Date();\n";
$datetime .= "var thisYear = now.getYear();\n";
$datetime .= "if(thisYear < 1900) {thisYear += 1900;} // corrections if Y2K display problem\n";
$datetime .= "document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n";
$datetime .= "// -->\n\n";
$datetime .= "</script>";
$public_msg = public_message();
echo "<table id=\"forum\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
echo "<tr>";
echo "<td class=\"forum-header\" align=\"center\" valign=\"top\">";
echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
echo "<tr>";
echo "<td width=\"60%\" height=\"80\"><a href=\"index.php\"><img src=\"images/undergroundkinglogo.png\" title=\"$sitename\"></a></td>";
echo "<td width=\"40%\" style=\"PADDING-right: 2px\" height=\"80\">$showbanners</td>";
echo "</tr></table>";
echo "<table height=\"20\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr>";
echo "<td align=\"center\" class=\"forum-buttons\" width=\"160\" nowrap> $theuser</td>";
echo "<td align=\"center\" class=\"forum-buttons\">";
//URL Links
echo "• <a href=\"index.php\">"._HOME."</a> • ";
echo "<a href=\"forums.html\">"._FORUMS."</a> • ";
echo "<a href=\"downloads.html\">"._DOWNLOADS."</a> • ";
echo "<a href=\"account.html\">"._YA."</a> • ";
//End URL Links
echo "</td>";
echo "<td align=\"right\" class=\"forum-buttons\" width=\"125\" nowrap>$datetime";
echo " </td></tr></table>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">";
echo "<tr valign=\"top\">";
echo "<td>$public_msg</td>";
echo "</tr></table>";
echo "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\" align=\"center\">";
echo "<tr>";
echo "<td valign=\"top\">";
if ($name=='Forums') {
/* Don't display it. */
}
else
if ($name=='Members_List') {
/* Don't display it. */
}
else
if ($name=='Private_Messages') {
/* Don't display it. */
}
else {
blocks(left);
}
echo"</td><td valign=\"top\" width=\"100%\">";
}
/************************************************************/
/* Function themefooter() */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $total_time, $start_time, $footer_message;
if (defined('INDEX_FILE') || ($index == 1)) {
echo"</td><td valign=\"top\" width=\"170\">";
blocks(right);
}
$footer_message = "$foot1<br>$foot2<br>$foot3<br>";
echo "</td></tr></table>\n";
echo "<table cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" border=\"0\">";
echo "<tr><td id=\"copyright\" align=\"center\">$footer_message";
echo "</td></tr></table>";
}
/************************************************************/
/* Function themeindex() */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath, $sitename;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
echo "<table class=\"forumline\" border=\"0\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\"><tr>";
echo "<td class=\"row-header\"><span>$title</span></td>";
echo "<tr>";
echo "<td><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr><td>";
echo "<a href=\"article-topic-.html$topic\"><img onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this) src=\"$t_image\" alt=\"$topictext\" hspace=\"10\" vspace=\"10\" align=\"left\"></a>";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td></tr></table></td></tr></table>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td id=\"news-footer\">";
echo ""._POSTEDBY.": <a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\"><b>$informant</b></a> ";
echo ""._ON." $time $timezone";
echo "</td>";
echo "<td id=\"news-footer\" align=\"right\" >$morelink</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* Function themearticle() */
/************************************************************/
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";
}
echo "<table class=\"forumline\" border=\"0\" cellspacing=\"0\" width=\"100%\" cellpadding=\"3\"><tr>";
echo "<td class=\"row-header\"><span>$title</span></td>";
echo "<tr>";
echo "<td><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">";
echo "<tr><td>";
echo "<a href=\"article-topic-.html$topic\"><img onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this) src=\"$t_image\" alt=\"$topictext\" hspace=\"10\" vspace=\"10\" align=\"left\"></a>";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td></tr></table></td></tr></table>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
echo "<td height=\"22\" id=\"news-footer\">"._POSTEDBY.": <b>";
formatAidHeader($aid);
echo "</b> "._ON." $datetime</td>";
echo "<td id=\"news-footer\" align=\"right\" >$morelink</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* Function themesidebox() */
/************************************************************/
function themesidebox($title, $content) {
echo "<table border=\"0\" class=\"forumline\" cellspacing=\"0\" width=\"170\" cellpadding=\"3\"><tr>";
echo "<td class=\"row-block\" width=\"100%\">";
echo "<span>$title</span>";
echo "</td></tr>";
echo "<tr><td class=\"row1\" width=\"170\">$content";
echo "</td></tr></table>";
}
?>
|
|
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 6:26 am |
|
Just commented out the fading.js, seems to me it is being used for the forums keeping the forum categories aligned to the left, cause once commented out it moves the categories to the right and centered.
I've tried moving that javascript to /forums/overall_header.tpl but didn't keep the forum cateogries aligned to the left like I did in themes.php
/themes/MorpheusX/forums/fading.js
Code:<!--
//Gradual-Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
//-->
|
|
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 6:49 am |
|
Did you try the other change I made in the header of the theme.php too? |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 6:51 am |
|
Yes I did, noticed that after I read over the code after posting my above message, and that made the forums go to error page. |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 6:59 am |
|
Zip your entire theme up and post a link. I will look at it on a test site. |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 7:22 am |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 7:31 am |
|
The forums here was rewriting the links. That's why you were getting the error page on forums.
Go ahead and comment out the fading.js at the top of your theme.php and add this in the header section
Code:
if ($name=='Forums') {
addJSToHead('themes/MorpheusX/forums/fading.js','file');
}
|
so the header will look like this after you add it
Code:
function themeheader() {
global $sitename, $admin, $index, $user, $cookie, $user_prefix, $userinfo, $prefix, $db, $banners, $name, $Version_Num, $currentlang;
if ($name=='Forums') {
addJSToHead('themes/MorpheusX/forums/fading.js','file');
}
|
|
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 7:39 am |
|
Did that, but the aligning of the forum categories is still shifted to the center, when it should be aligned left. |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 7:50 am |
|
It isn't loading called in the header. Sorry, I should have checked it out better. Remove the changes to the header and make the top of your theme.php look like this
Code:
<?php
global $name;
if ($name=='Forums') {
addJSToHead('themes/MorpheusX/forums/fading.js','file');
}
if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');
$bgcolor1 = "#F8F8F8";
$bgcolor2 = "#F8F8F8";
$bgcolor3 = "#EAEAEA";
$bgcolor4 = "#F8F8F8";
$textcolor1 = "#000000";
$textcolor2 = "#48A044";
//echo "<script type=\"text/javascript\" src=\"themes/MorpheusX/forums/fading.js\"></script>";
|
|
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 7:58 am |
|
That worked, but if you view my pages source code, that javascript is still being loaded before DOC TYPE, which I just noticed, that it it causing that Javascript conflict with other javascript, for example that pop-up issue I had in that other post. |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 7:59 am |
|
Make sure you have the // in front of the echo |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 8:02 am |
|
That was my bad, that fixed the Javascript conflict being loaded before <!DOCTYPE, but for some reason it still isn't fixed the forum categories issue being centered. |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 8:13 am |
|
That is weird. The only solution I can think of is to load it like it was but only in the forums like so:
Code:
<?php
global $name;
if ($name=='Forums') {
echo "<script type=\"text/javascript\" src=\"themes/MorpheusX/forums/fading.js\"></script>";
}
if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');
$bgcolor1 = "#F8F8F8";
$bgcolor2 = "#F8F8F8";
$bgcolor3 = "#EAEAEA";
$bgcolor4 = "#F8F8F8";
$textcolor1 = "#000000";
$textcolor2 = "#48A044";
//echo "<script type=\"text/javascript\" src=\"themes/MorpheusX/forums/fading.js\"></script>";
|
It will still be above the doctype but only in the forums. Maybe someone else has an idea as to why loading the js is not working? |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 8:26 am |
|
I think the problem is in the themes style.css.
this line is causing the centering. I'm not sure why the js would change it though.
Code:
#content {
padding: 2px 7px 5px 7px;
text-align: center;
}
|
I haven't checked to see what else it may effect, but removing the text-align: center; makes the forums display correctly. This may effect other parts of the site though. |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 8:35 am |
|
What if that fading.js was loaded in the index.php instead of theme.php? |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 8:42 am |
|
It would still be the same issue. The file that loads it doesn't really matter since it is being loaded into an array. I tried loading it before jquery and after, it does not change the centering issue. Looking at the js file, I don't see anything that should change text position. |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 8:51 am |
|
A mind blower.
All the fading.js is, is a script that makes any image(s) appear dull before the mouse moves over it; as the mouse moves over it, the image gradually changes to its original appearance. |
|
|
|
|
nuken
|
Posted:
Sun Dec 02, 2012 9:08 am |
|
If you load it like this
Code:
<?php
global $name;
if ($name=='Forums') {
addJSToHead('themes/MorpheusX/forums/fading.js','file');
}
if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');
$bgcolor1 = "#F8F8F8";
$bgcolor2 = "#F8F8F8";
$bgcolor3 = "#EAEAEA";
$bgcolor4 = "#F8F8F8";
$textcolor1 = "#000000";
$textcolor2 = "#48A044";
//echo "<script type=\"text/javascript\" src=\"themes/MorpheusX/forums/fading.js\"></script>";
|
and remove that text-align: center; from the style.css #content it aligns correctly, or like it did originally. |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 9:27 am |
|
Seems all good now after doing that, havn't found anything that was using that #content's center align yet.
and no more javascript being loaded above DOCTYPE. |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 9:29 am |
|
Scratch that, found a problem, when viewing my Private Messages now, its all scrambled up. |
|
|
|
|
derek765
|
Posted:
Sun Dec 02, 2012 6:05 pm |
|
Anyone else have any idea? |
|
|
|
|
spasticdonkey
RavenNuke(tm) Development Team
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sun Dec 02, 2012 7:12 pm |
|
The forum templates are kinda old, missing patches (2.0.16 where RN uses 2.0.23), and missing files/edits for pre-installed mods (attachments,subforums).
It might be easier to port one of the included forum templates to your theme, and restyle; rather than updating the older template. |
|
|
|
|
|