|
Post by (¯`•Stormraven•._) on Mar 25, 2009 15:22:56 GMT -5
This code will modify the boards on the main forum homepage. Place it in your global footer. You can see a preview here. <script type='text/javascript'> <!-- /* Main Page Modification - Coded by (¯`•Stormraven•._) [noubbc]www.codershangout.co.uk[/noubbc] - Web Design and Development Forums (c) Must not be re-posted or claimed as your own. */
if(!location.href.match(/action=/)){ var td = document.getElementsByTagName('td'); var font = document.getElementsByTagName('font'); for(i=0; i<td.length; i++){ if(td[i].width == '1%' && td[i+1].width == '1%'){ td[i].style.display = "none"; td[i+1].style.display = "none"; } if(td[i].className == 'windowbg' && td[i].width == '8%'){ var subs = (td[i+1].width == '66%' && td[i+1].innerHTML.match(/(\d+)\ssub-board(s)?/gi))? 'Sub-Boards:
<b>'+RegExp.$1+'</b><br>' :(location.href.match(/board=/))?'':'Sub-Boards: <i>None</i><br> '; var sep= (location.href.match(/board=/))? '<br>': ' :: '; td[i+1].innerHTML = td[i+1].innerHTML.replace(/(\(\d+)\ssub-board(s)?\)/gi ,''); td[i+1].innerHTML = '<table width="98%" align="center" border="0"><tr><td width="47%">'+td[i+1].innerHTML+'</td><td
width="20%"><div align="right" vAlign="center"><font size="1">'+subs+'Topics: '+td[i+2].firstChild.innerHTML+
sep+'Posts: '+td[i+3].firstChild.innerHTML+'</font></div></td></tr></table>'; } } } //--> </script> Enjoy
|
|
|
Post by Masamune on Mar 25, 2009 16:02:22 GMT -5
Very good And welcome (¯`•Stormraven•._)!
|
|
|
Post by (¯`•Stormraven•._) on Mar 25, 2009 16:03:09 GMT -5
Thankyou Masamune Have you tryed the code?
|
|
|
Post by Masamune on Mar 25, 2009 16:07:46 GMT -5
Yes Will show you the link : Click But it doesn't seem to have worked.
|
|
|
Post by (¯`•Stormraven•._) on Mar 25, 2009 16:15:21 GMT -5
Looks like a code conflict mate. It's conflicting with a code thats already in your headers and footers as I have tested it and it works for me. You sure youve got it in the correct place first?
|
|
|
Post by Masamune on Mar 25, 2009 16:22:37 GMT -5
Yeah
|
|
|
Post by Spud on Mar 25, 2009 18:15:21 GMT -5
Cool, cool header btw.
|
|
|
Post by Spud on Mar 25, 2009 18:26:56 GMT -5
|
|
|
Post by Jasek on Mar 26, 2009 3:35:29 GMT -5
check the codes. they may not work with some codes you have.
|
|
|
Post by Spud on Mar 26, 2009 10:17:38 GMT -5
Ok thanks
|
|