View next topic
View previous topic
Post new topic   Reply to topic
Author Message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 754

PostPosted: Thu Dec 06, 2007 3:02 pm
Reply with quote

I've had a few people asking how I do this on my site so I will do my best to explain that here.

All of the changes take place in themes/YourTheme/theme.php so open that up with your text editor(but for the love of god, please don't use notepad;) ).

Find the following code(yours may be slightly different)

php:
 function themeheader() {
  global 
$banners$sitename$name


Somewhere below that should be a <body> tag. After that body tag, add the following(remove the space between java & script):

php:
 echo '
<script type="text/java script">
  function hide(id, t){
    x=document.getElementById(id);
    m=document.getElementById(t);
    if (x.style.display == "none"){
      x.style.display = "";
      m.innerHTML = "[ - ]";
    }else{
      x.style.display = "none";
      m.innerHTML = "[ + ]";
    }
  }
  </script>'


Next, you put the +/- links in the template. I can't really tell you exactly where they need to go because themes can differ greatly, but here are the html codes for the +/- links.

Left Blocks:
Code:
<a style="text-decoration: none;" href="#" onclick="hide(\'leftblocks\', \'mt\');return false;" title="Show/Hide Left Blocks"><span id="mt" style="font-size: 14px; font-weight: bold;">'.$start_symbol.'</span></a>


Right Blocks(make sure it doesn't show if the right blocks aren't showing):
Code:
<a style="text-decoration: none;" href="#" onclick="hide(\'rightblocks\', \'nt\');return false;" title="Show/Hide Right Blocks"><span id="nt" style="font-size: 14px; font-weight: bold;">[ - ]</span></a>


Next we have to find the table column (<td>) that holds the left blocks and give it an id. Look for blocks('left'); and you should end up close to the <td>

So find that <td> and add the following
Code:
 id='leftblocks'".$left_style."


So in the end it will look something but not exactly like
Code:
<td valign='top' width='200' id='leftblocks'".$left_style.">


Now for the right blocks, find the table column that holds the right blocks.
Look for blocks('right'); and you should be close. Then add the following to the <td> tag:
Code:
 id="rightblocks"


And that is all. Good Luck!
 
View user's profile Send private message Visit poster's website
Leo




Joined: Oct 18, 2007
Posts: 12

PostPosted: Fri Dec 07, 2007 11:39 am
Reply with quote

not work for me.. can i drop off my themes.php and u help me out ?
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 754

PostPosted: Sat Dec 08, 2007 12:57 am
Reply with quote

I can't make any promises, but if you post it I'll try to help you out.
 
View user's profile Send private message Visit poster's website
nextgen




Joined: Feb 09, 2007
Posts: 18
Location: Maryland

PostPosted: Sat Jun 14, 2008 11:42 am
Reply with quote

What if your body tag is in theheader.html and not in the theme.php ?
 
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Guardian




Joined: Dec 09, 2006
Posts: 248

PostPosted: Sat Jun 14, 2008 12:36 pm
Reply with quote

Then you have a dangerous theme as it use 'eval' to get the data from the html file but that aside it works the same way.
Instead of the code being in theme.php, theme.php just calls up the header.html file so you should be able to put that bit in the html file though I have never tried to pull java script through php's eval function.

_________________
Code Authors Nuke Reviews 
View user's profile Send private message
nextgen




Joined: Feb 09, 2007
Posts: 18
Location: Maryland

PostPosted: Sat Jun 14, 2008 3:46 pm
Reply with quote

I wonder if i could toss it into the css. I have pulld java from the css before.
 
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours