Tequila |
04-21-2011 01:38 PM |
I'm finally on my PC, so here's what I did:
I found the keyword "theme" in my inc/functions.php (Mys 1.2.1) file and at around line 828 there is this section of code:
PHP Code:
// NEW - a function to show the page function showpage($title, $content, $date) { $theme = $GLOBALS['usersettings']['theme']; if ($theme == '') { $theme = grabanysetting("theme"); } $themeurl = "templates/{themename}/template.html"; $patterns = array("/:ARTICLETITLE:/","/:ARTICLECONTENT:/", "/:ARTICLEDATE:/", "/:BROWSERTITLE:/", "/:SITENAME:/", "/:SLOGAN:/", "/:LINKSBAR:/", "/:SIDEFEED:/", "/:ADS:/"); // if we have said we are in an admin area, don't show ads and show admin links if ($GLOBALS['admin']==true) { $replacements = array($title, $content, $date, grabanysetting("browsertitle")." ".$title, grabanysetting("sitename"), grabanysetting("slogan"), getadmlinks(), getsidebar(), ""); } else { $replacements = array($title, $content, $date, grabanysetting("browsertitle")." ".$title, grabanysetting("sitename"), grabanysetting("slogan"), getlinks(), getsidebar(), getads("any")); } // now that we have our stuff, let's start making it all into a webpage $template = file_get_contents($themeurl); $template = preg_replace($patterns, $replacements, $template); $template .= "<div style='position: fixed; bottom: 0; left: 0; color: white; font-size: 10px; width: 380px; '>A total of {$GLOBALS['numberofqueries']} queries were used in this page. They were: {$GLOBALS['queries']}</div>"; return $template; }
I then changed it to:
PHP Code:
// NEW - a function to show the page function showpage($title, $content, $date) { $theme = $GLOBALS['usersettings']['theme']; if ($theme == '') { $theme = grabanysetting("theme"); } $themeurl = "templates/crystalhollow/template.html"; $patterns = array("/:ARTICLETITLE:/","/:ARTICLECONTENT:/", "/:ARTICLEDATE:/", "/:BROWSERTITLE:/", "/:SITENAME:/", "/:SLOGAN:/", "/:LINKSBAR:/", "/:SIDEFEED:/", "/:ADS:/"); // if we have said we are in an admin area, don't show ads and show admin links if ($GLOBALS['admin']==true) { $replacements = array($title, $content, $date, grabanysetting("browsertitle")." ".$title, grabanysetting("sitename"), grabanysetting("slogan"), getadmlinks(), getsidebar(), ""); } else { $replacements = array($title, $content, $date, grabanysetting("browsertitle")." ".$title, grabanysetting("sitename"), grabanysetting("slogan"), getlinks(), getsidebar(), getads("any")); } // now that we have our stuff, let's start making it all into a webpage $template = file_get_contents($themeurl); $template = preg_replace($patterns, $replacements, $template); $template .= "<div style='position: fixed; bottom: 0; left: 0; color: white; font-size: 10px; width: 380px; '>A total of {$GLOBALS['numberofqueries']} queries were used in this page. They were: {$GLOBALS['queries']}</div>"; return $template; }
Replacing the section that calls the theme from the database to the name of my theme (which is just Crystal Hollow).
I'd try that. :3
|