Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   My Layout x3 (http://www.mysidiaadoptables.com/forum/showthread.php?t=2111)

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$dategrabanysetting("browsertitle")." ".$titlegrabanysetting("sitename"), grabanysetting("slogan"), getadmlinks(), getsidebar(), "");
    }
    else {
        
$replacements = array($title$content$dategrabanysetting("browsertitle")." ".$titlegrabanysetting("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$dategrabanysetting("browsertitle")." ".$titlegrabanysetting("sitename"), grabanysetting("slogan"), getadmlinks(), getsidebar(), "");
    }
    else {
        
$replacements = array($title$content$dategrabanysetting("browsertitle")." ".$titlegrabanysetting("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

fadillzzz 04-21-2011 01:42 PM

@Nyxi
Hey, I guess this will definitely works! :usedusedused:
Not a really good solution though if we want to make use of the theme switching feature. :eye:

Tequila 04-21-2011 01:46 PM

Quote:

Originally Posted by fadillzzz (Post 16334)
@Nyxi
Hey, I guess this will definitely works! :usedusedused:
Not a really good solution though if we want to make use of the theme switching feature. :eye:

Where there is a cheat there is a way. ;3

I don't want switchable styles so it doesn't bother me. :3

Rozel 04-21-2011 02:04 PM

Well, now the layout is just black and white, as if none of the images/colors are connecting >w<
~
But yeah, I don't want people switching the layout anyways. :3 I was going to hide that page or something xD

Tequila 04-21-2011 02:09 PM

Did you change the locations of the image urls and css url?

should be "templates/templatename/..." to pull it up. :3

Tequila 04-21-2011 02:13 PM

Try this instead for template.html:
PHP Code:

<!DOCTYPE html>
<
html>

<
head>
<
title>:BROWSERTITLE:</title>
<!-- 
Edit the stylesheet with the correct location to your theme -->
<
link rel="stylesheet" href="templates/blue/style.css" type="text/css" />


</
head>

<
body>
<
div id="wrapper">
<
table cellpadding="0" cellspacing="0">
<
tr><td colspan="2" id="header">
<
center>This is a placeholder for your header imageYou can use the image as a background in the CSS file to make it easier to pull up on your siteThe header is set for 800 pixels widebut you can make it as tall as you'd like.</center>
<center>Any questions, let me know and I'
ll help you out with them. :3</center>

</
td></tr>
<
tr><td colspan="2" id="menu">

<
ul>
   :
LINKSBAR:
</
ul>


</
td></tr>
<
tr><td id="content" valign="top" rowspan="2">
<
div id="main">


<
h1>:ARTICLETITLE:</h1>
           
<
p>:ARTICLECONTENT:</p>

</
div>
</
td><td id="sidebar" valign="top">

<
ul>
   :
SIDEFEED:
</
ul>


</
td></tr>
<
tr><td id="side" valign="bottom" rowspan="2">



</
td></tr>
<
tr><td id="footer">
<!-- 
Edit site name and your information here -->
<
p>Site Nameadoptable imagessite artwork, and concept are &copy;Copyright 2011 Your Name.</p>

<!-- 
leave these credits intact pleasethey're to let others know about the script & my services -->
<p><a href="http://tequilacorbly.me"><img src="templates/blue/images/sds.png" border="0" alt="Stardusk Studios" title="Stardusk Studios" /></a> <a href="http://mysidiaadoptables.com/"><img src="templates/blue/images/mysidia.png" alt="Mysidia Adoptables" title="Mysidia Adoptables" /></a></p>

</td></tr>
</table>

</div>

</body>
</html> 

Let me know if it works. :3

Rozel 04-21-2011 02:31 PM

To your first post, I did change it to where mine was :3
-
To your second post, it's fixed now! Thank you so much ^_^

Tequila 04-21-2011 02:35 PM

*pokes link to check*

Yay it works! Now you just need to get your image in and change the footer information.

I'm not sure what's up with the who's online table, you may have to take a look or set the td width to auto in the stylesheet.

Since it works I'm locking this thread. :3


All times are GMT -5. The time now is 03:45 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.