| Author |
Message |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 726
|
Posted:
Fri Dec 07, 2007 6:02 am |
|
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)
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):
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:
And that is all. Good Luck! |
|
|
|
 |
Leo
Newbie


Joined: Oct 18, 2007
Posts: 12
|
Posted:
Sat Dec 08, 2007 2:39 am |
|
not work for me.. can i drop off my themes.php and u help me out ? |
|
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 726
|
Posted:
Sat Dec 08, 2007 3:57 pm |
|
I can't make any promises, but if you post it I'll try to help you out. |
|
|
|
 |
nextgen
Newbie


Joined: Feb 09, 2007
Posts: 17
Location: Maryland
|
Posted:
Sun Jun 15, 2008 2:42 am |
|
What if your body tag is in theheader.html and not in the theme.php ? |
|
|
|
 |
Guardian
Mr. Awesome

Joined: Dec 09, 2006
Posts: 238
|
Posted:
Sun Jun 15, 2008 3:36 am |
|
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 |
|
|
 |
nextgen
Newbie


Joined: Feb 09, 2007
Posts: 17
Location: Maryland
|
Posted:
Sun Jun 15, 2008 6:46 am |
|
I wonder if i could toss it into the css. I have pulld java from the css before. |
|
|
|
 |
|
|