|
Post by tunescool on Jul 5, 2010 14:02:17 GMT -8
wormo i tried <span id="lastpostspot"></span> and <div id="lastpostspot"></div> in between the cbox and avatar. you werent that clear in the instruction. id just like the last post and i did all i know. im really not sure if id like to use it to begin with but i wanna try it out tunescool2.proboards.com/index.cgi
|
|
|
Post by Wormopolis on Jul 5, 2010 22:39:51 GMT -8
lastpostsspot
I was going to be more clear in the submission post for it, but I havent moved it yet.
count the number of "s".
|
|
|
Post by tunescool on Jul 5, 2010 23:09:29 GMT -8
i copied it rite from the code lastpostspot
neither worked in a div or span, lastpostspot or lastpostsspot, i dont know how else to put the element. do i have all the setting rite
// 2: move only ones that have specific divs setup // 3: both
// modes 1 and 3 require an element with id="lastpostspot"
lp_newmode=false; // lp_newmode: // true: seperate out the last posts that register as "new" when in lp_mode 1 or 3. specific divs in 3 stay normal // false: group all together in order they are found
<script type="text/javascript"> <!-- // Last Post/Topics/Posts Relocate v1.1 // By Wormopolis - [url]www.wormocodes.com[/url] // do not repost - keep header intact // request by cainey-face
lp_relocate=true; //turn on code to relocate last posts
lp_mode=1; // lp_modes: // 1: move all discovered last posts into destination // 2: move only ones that have specific divs setup // 3: both
// modes 1 and 3 require an element with id="lastpostspot"
lp_newmode=false; // lp_newmode: // true: seperate out the last posts that register as "new" when in lp_mode 1 or 3. specific divs in 3 stay normal // false: group all together in order they are found
// if using lp_mode 2 (or 3), specific divs must have id="lpreloc_"+boardid // example board id general would look for div id="lpreloc_general"
nwpstsDivide='<hr width="75%">NEW POSTS<hr width="75%">'; //HTML for divider, can be image if desired oldpstsDivide='<hr width="75%">OLD POSTS<hr width="75%">'; //HTML for divider, can be image if desired
tp_relocate=false; // turn on code to relocate topics/posts numbers
// requires elements with id="tpreloc_"+boardid // example board id general would look for div id="tpreloc_general"
tp_seperator="/";
tp_mode=2; // tp_modes: // 1: move just numbers seperated by whatever is in seperator variable ... 4 / 12 (example) // 2: move numbers with labels seperated by whatever is in seperator variable ... 4 threads / 12 posts
// NO NEED TO EDIT BELOW - unless you know what you are doing
if (pb_action=='home') { lstpstCont='<br>'; nwlstpstCont='<br>'; for (tds=document.getElementsByTagName('td'), s=0; s<tds.length; s++) { if (tds[s].width=='66%' && tds[s].vAlign=='top' && tds[s].className.match(/windowbg/)) { brdlnk=tds[s].getElementsByTagName('a')[0]; brdid=brdlnk.href.split('board=')[1]; lstpstcl=tds[s].nextSibling.nextSibling.nextSibling; tpcscl=tds[s].nextSibling; pstscl=tds[s].nextSibling.nextSibling; nwpstcl=tds[s].previousSibling; nwpstchk=(nwpstcl.firstChild.alt && nwpstcl.firstChild.alt=='[/li][li]'); lstpstStuff=lstpstcl.firstChild.innerHTML.split(/<br>/i); tpcsStuff=tpcscl.firstChild.innerHTML; pstsStuff=pstscl.firstChild.innerHTML; lstpstEntry=(lstpstStuff[2] ? lstpstStuff[2].replace(/in /,'')+' '+lstpstStuff[1]+' '+lstpstStuff[0] : ''); if ((lp_mode==2 || lp_mode==3) && document.getElementById('lpreloc_'+brdid) && lp_relocate) { document.getElementById('lpreloc_'+brdid).innerHTML=lstpstEntry; } else { if (lp_mode!=2) { if (lp_newmode && nwpstchk && pb_username!='Guest') nwlstpstCont+=lstpstEntry+'<br>'; else lstpstCont+=lstpstEntry+'<br>'; } } if (document.getElementById('tpreloc_'+brdid) && tp_relocate) { tpStuff=tpcsStuff + (tp_mode==2 ? ' Topic'+(tpcsStuff!='1'?'s ':' ') : ' ') + tp_seperator + ' ' + pstsStuff + (tp_mode==2 ? ' Post'+(pstsStuff!='1'?'s ':' ') : ' '); document.getElementById('tpreloc_'+brdid).innerHTML=tpStuff; } } } if (lp_mode != 2 && document.getElementById('lastpostspot') && lp_relocate) { lstpstCont+='<br>'; nwlstpstCont+='<br>'; if (lp_newmode && pb_username!='Guest' ) { document.getElementById('lastpostspot').innerHTML=(lstpstCont!='<br><br>' && nwlstpstCont!='<br><br>' ? oldpstsDivide : '') + lstpstCont + (nwlstpstCont!='<br><br>' ? nwpstsDivide : '') + nwlstpstCont; } else { document.getElementById('lastpostspot').innerHTML=lstpstCont; } }
} // --> </script>
|
|
|
Post by Wormopolis on Jul 7, 2010 16:46:25 GMT -8
I was apparently tired when I wrote that. you were right before, should be "lastpostspot".
checking your site now.
you sure you have that div in there? I dont see it in your source:
<TABLE class="bordercolor" cellSpacing="0" cellPadding="5" width="800" align="center"> <TBODY> <TR> <TD class="midtable" vAlign="top" width="50%"> <FONT size="2"> <!-- BEGIN CBOX - www.cbox.ws - v001 --> <DIV id="cboxdiv" style="LINE-HEIGHT: 0; TEXT-ALIGN: center"> <DIV> <IFRAME id="cboxmain" style="BORDER-RIGHT: #9c8700 1px solid; BORDER-TOP: #9c8700 1px solid; BORDER-LEFT: #9c8700 1px solid; BORDER-BOTTOM: #9c8700 1px solid" name="cboxmain" marginWidth="2" marginHeight="2" src="http://www7.cbox.ws/box/?boxid=264525&boxtag=n5cwh5&sec=main" frameBorder="0" width="400" height="150" allowTransparency></IFRAME> </DIV> <DIV> <IFRAME id="cboxform" style="BORDER-RIGHT: #9c8700 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #9c8700 1px solid; BORDER-BOTTOM: #9c8700 1px solid" name="cboxform" marginWidth="2" marginHeight="2" src="http://www7.cbox.ws/box/?boxid=264525&boxtag=n5cwh5&sec=form" frameBorder="0" width="400" scrolling="no" height="75" allowTransparency></IFRAME> </DIV> </DIV> <!-- END CBOX --> </FONT> </TD> <TD class="midtable" vAlign="top" width="32%"> <FONT size="2"> <B> <CENTER> </CENTER> </B> </FONT> </TD> </FONT> <//FONT> <TD class="midtable" vAlign="top" width="18%"> <FONT size="2"> <B> <I> <CENTER>Welcome<BR /> <SPAN id="my_name">Guest</SPAN> <SPAN id="my_avatar"> <IMG alt="View Profile" src="http://i709.photobucket.com/albums/ww95/tunescool/nook/defaultava-1.png" border="2" /> </SPAN> </CENTER> </I> </B> </FONT> </TD> </TR> </TBODY> </TABLE>
|
|
|
Post by tunescool on Jul 7, 2010 22:12:35 GMT -8
i copied my headers to all my test sites again. i put the div in and made another post but it doesnt show
|
|
|
Post by Wormopolis on Jul 7, 2010 23:00:37 GMT -8
ah.. yep its there now.
now put the code part at the top of the main footer.
|
|
|
Post by tunescool on Jul 7, 2010 23:57:57 GMT -8
id need to change the font size and either get rid of the cbox or resize it. i tried <bottom> </bottom> to just have it appear at the bottom of the cell it didnt work, how could i do that? yours never seems to be in any order, by date or whatever, is that something youre still working on?
|
|
|
Post by Wormopolis on Jul 8, 2010 0:44:38 GMT -8
its in the order of the boards. from top down. if seperated by new/old, they are still in order, just regrouped.
<bottom> isnt a valid tag. add to the div they are in style="valign:bottom"
|
|
|
Post by tunescool on Jul 8, 2010 3:04:40 GMT -8
im taking the cbox out. i want more room for text and i dont want to make that area any bigger so i wont need the bottom thing. i really want this feature but it does every board my list looks ridiculous. theres no way to limit the code to ten recent posts no matter what boards they came from? probably not hey, ive seen the question asked a billion times
or make it so the code only looks for certain boards
|
|
|
Post by Wormopolis on Jul 8, 2010 6:43:01 GMT -8
the code can do that. that would be mode 2. but you need divs for each board you want to have relocated.
|
|
|
Post by tunescool on Jul 8, 2010 7:24:04 GMT -8
its not really gonna work for me because noones gonna know who the actress is in the thread title anyway. itd be pretty stupid to have people hitting links to celebs theyre not interested in. great code thanks for helping
|
|