|
Post by Dragon on Dec 19, 2011 20:15:04 GMT -8
*Fluffs santa hat*
|
|
|
Post by Wormopolis on Dec 19, 2011 23:41:29 GMT -8
<script type="text/javascript"> <!-- // main page remodel
var boardOnOffImages=new Array(); boardOnOffImages['general']=['URL TO ON IMAGE','URL TO OFF IMAGE']; boardOnOffImages['board2']=['URL TO ON IMAGE','URL TO OFF IMAGE']; boardOnOffImages['board3']=['URL TO ON IMAGE','URL TO OFF IMAGE'];
var useDefaultOnOffImage=true; //set false to remove var defaultBoardOnOffImage=['URL TO DEFAULT ON','URL TO DEFAULT OFF'];
var cellWidths=['250px','250px','0px','50px','150px']; // on/off, board/desc, topics, posts, last post
var newPostsMessages=['new posts','no new posts'];
for (td=document.getElementsByTagName('td'), tt=0; tt<td.length; tt++) { if (td[tt].width=='66%' && td[tt].className.match(/windowbg/) && td[tt].vAlign=='top') { td[tt].parentNode.parentNode.firstChild.style.display='none'; var blink=td[tt].getElementsByTagName('a')[0]; var bname=blink.href.split('board=')[1]; tmp = (td[tt].previousSibling.firstChild.alt=='[/li][li]' || pb_username=='Guest' ? 0: 1); td[tt].previousSibling.firstChild.alt = td[tt].previousSibling.firstChild.title = newPostsMessages[tmp]; if (boardOnOffImages[bname]) { td[tt].previousSibling.firstChild.src=boardOnOffImages[bname][tmp]; } else { if (useDefaultOnOffImage) { td[tt].previousSibling.firstChild.src=defaultBoardOnOffImage[tmp]; } else { td[tt].previousSibling.firstChild.style.display='none'; } } var bpar=td[tt].parentNode; for (bb=0; bb<bpar.cells.length; bb++) { if (cellWidths[bb]=='0px') { bpar.cells[bb].style.display='none'; } else { bpar.cells[bb].width=cellWidths[bb]; } } } }
// --> </script>
try that
|
|
|
Post by Dragon on Dec 21, 2011 23:46:17 GMT -8
Sorry for not responding sooner. Thanks for the coding, though I just now saw it and havent tested it. I'm abit confused, this code will replace the code thats changing the onoff icons with images for boards as well as remodeling the px spacings?
Again havent tested it yet but I imagine it will make it as intended at 700px then have 200px blank, possibly black because thats happened before, so to use it appropiately would require the secondary code for the sidetables. *Thinking out loud here*
|
|
|
Post by Wormopolis on Dec 22, 2011 0:06:49 GMT -8
get rid of the remove on/off code you have. this intends to replace the on/off image with what you put into the array. if you dont put a board into the array, it will use the default image. if you dont want it to use a default image, it will make that cell empty.
|
|
|
Post by Dragon on Dec 22, 2011 0:14:19 GMT -8
<script type="text/javascript"> <!-- // main page remodel
var boardOnOffImages=new Array(); boardOnOffImages['cloudianteam']=['http://img52.imageshack.us/img52/5650/cpbbcloudianteam.jpg','http://img52.imageshack.us/img52/5650/cpbbcloudianteam.jpg']; boardOnOffImages['membercentral']=['http://img685.imageshack.us/img685/1415/memberscentral.png','http://img685.imageshack.us/img685/1415/memberscentral.png']; boardOnOffImages['books']=['http://img214.imageshack.us/img214/6030/cpbbbooks.jpg','http://img214.imageshack.us/img214/6030/cpbbbooks.jpg']; boardOnOffImages['comedy']=['http://img225.imageshack.us/img225/253/laughs.jpg','http://img225.imageshack.us/img225/253/laughs.jpg']; boardOnOffImages['musicvideolocations']=['http://img402.imageshack.us/img402/8946/sbnr3.png','http://img402.imageshack.us/img402/8946/sbnr3.png']; boardOnOffImages['tvshows']=['http://img839.imageshack.us/img839/9128/tvshowsu.png','http://img839.imageshack.us/img839/9128/tvshowsu.png']; boardOnOffImages['movielocations']=['http://img33.imageshack.us/img33/7330/cpbbmovies.jpg','http://img33.imageshack.us/img33/7330/cpbbmovies.jpg']; boardOnOffImages['abridgedseries']=['http://img513.imageshack.us/img513/2498/abridgedseries.png','http://img513.imageshack.us/img513/2498/abridgedseries.png']; boardOnOffImages['kingdomheartsdw']=['http://img266.imageshack.us/img266/3917/cpbbkingdomhearts.jpg','http://img266.imageshack.us/img266/3917/cpbbkingdomhearts.jpg']; boardOnOffImages['shamankingcok']=['http://img32.imageshack.us/img32/2307/cpbbshamanking.jpg','http://img32.imageshack.us/img32/2307/cpbbshamanking.jpg']; boardOnOffImages['hitmanrebornfvf']=['http://img405.imageshack.us/img405/48/cpbbhitmanreborn.jpg','http://img405.imageshack.us/img405/48/cpbbhitmanreborn.jpg']; boardOnOffImages['pokemonphantomsky']=['http://img163.imageshack.us/img163/6299/96229.png','http://img163.imageshack.us/img163/6299/96229.png']; boardOnOffImages['digitalworldstory']=['http://img403.imageshack.us/img403/792/dwsv.png','http://img403.imageshack.us/img403/792/dwsv.png']; boardOnOffImages['history']=['http://img600.imageshack.us/img600/1719/cpbbhistory.jpg','http://img600.imageshack.us/img600/1719/cpbbhistory.jpg']; boardOnOffImages['mathc']=['http://img51.imageshack.us/img51/9172/cpbbmath.jpg','http://img51.imageshack.us/img51/9172/cpbbmath.jpg']; boardOnOffImages['personalfitness']=['http://img714.imageshack.us/img714/8537/cpbbpersonalfitness.jpg','http://img714.imageshack.us/img714/8537/cpbbpersonalfitness.jpg']; boardOnOffImages['science']=['http://img171.imageshack.us/img171/8527/cpbbscience.jpg','http://img171.imageshack.us/img171/8527/cpbbscience.jpg'];
var useDefaultOnOffImage=false; //set false to remove
var cellWidths=['250px','250px','0px','50px','150px']; // on/off, board/desc, topics, posts, last post
var newPostsMessages=['new posts','no new posts'];
for (td=document.getElementsByTagName('td'), tt=0; tt<td.length; tt++) { if (td.width=='66%' && td.className.match(/windowbg/) && td.vAlign=='top') { var blink=td.getElementsByTagName('a')[0]; var bname=blink.href.split('board=')[1]; tmp = (td.previousSibling.firstChild.alt=='[/li][li]' ? 0: 1); tds.previousSibling.firstChild.alt = tds.previousSibling.firstChild.alt = newPostsMessages[tmp]; if (boardOnOffImages[bname]) { td.previousSibling.firstChild.src=boardOnOffImages[bname][tmp]; } else { if (useDefaultOnOffImage) { td.previousSibling.firstChild.src=defaultBoardOnOffImage[tmp]; } else { td.previousSibling.firstChild.style.display='none'; } } var bpar=td.parentNode; for (bb=0; bb<bpar.cells.length; bb++) bpar.cells[bb].width=cellWidths[bb]; } }
// --> </script>
Not working. Perhaps I entered something wrong ? I was abit confused on the default var since it would only work on the principle of 1 default image because there was no provision for board names to be changed... ?
I can say that the reason the last post row is being scrunched is from ipokemons code on the replacing icons code.
|
|
|
Post by Dragon on Dec 22, 2011 0:15:37 GMT -8
Gah! your online and responded first.
|
|
|
Post by Wormopolis on Dec 22, 2011 7:45:46 GMT -8
you still have this code in there
/*different on/off icons
|
|
|
Post by Dragon on Dec 22, 2011 10:16:00 GMT -8
Yes, because the remodel code didnt work. I removed the on/ff icon code then put in remodel, no effect. So I removed that code and put in the on/ff icon code for now.
|
|
|
Post by Wormopolis on Dec 22, 2011 18:08:44 GMT -8
I cant see whats wrong without it running. you can disable the other script by chaing type to "text/javascript-disabled"
|
|
|
Post by Dragon on Dec 22, 2011 19:03:36 GMT -8
|
|
|
Post by Wormopolis on Dec 23, 2011 1:09:07 GMT -8
change
tds.previousSibling.firstChild.alt = tds.previousSibling.firstChild.alt = newPostsMessages[tmp];
to
td.previousSibling.firstChild.alt = td.previousSibling.firstChild.title = newPostsMessages[tmp];
|
|
|
Post by Dragon on Dec 23, 2011 10:24:25 GMT -8
|
|
|
Post by Wormopolis on Dec 23, 2011 17:35:46 GMT -8
ctrl-F5 the code is doing something... but its also affecting the header row. did you want to keep that header row or hide it?
also, the topics/posts columns are wrong because it wont shrink the cell width to less then the content width. did you want the posts column hidden as well?
|
|
|
Post by Dragon on Dec 23, 2011 19:28:50 GMT -8
ctrl-F5 the code is doing something... but its also affecting the header row. did you want to keep that header row or hide it? also, the topics/posts columns are wrong because it wont shrink the cell width to less then the content width. did you want the posts column hidden as well? The header row? Not sure what you mean, the tabs ? If its the tabs then yes, and the head base images to be kept. Yeah, so essentially the codes not resizing nor replacing the images... No I want the post column to show.
|
|
|
Post by Wormopolis on Dec 23, 2011 21:14:14 GMT -8
save your array. then recopy from my post above and put your array back in.
|
|