Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 24, 2010 9:10:10 GMT -8
Hello! I saw your post in this board about last post information being located in a placeable <div> and was wondering if I could use it as well? I was actually a small bit coder for that girl at one point (I am Revvie, or "ReverseRevival") and I made a request for that code on Proboards Support for both her site and mine. When no one replied...she came here. Could I use it?
Also, would there be a way for you to also create a code that would allow me to place the number of topics and posts for a board in placable divs? you know, looking something like this:
topics: xx posts: xx
|
|
|
Post by Wormopolis on Jun 24, 2010 19:44:46 GMT -8
any code that I put n a public post can be used by anyone really. there is always a risk of it not working however if someone requests something SPECIFICALLY for their site and you notice that there is a lot of posts about getting it to work. in that instance, it is because they have some other code running that is causing the code to be modded. if you get the code from a thread that has very few posts, then the chances of it working as is increase dramatically. The code you are referring to should work on ANY site as long as the necessary elements are in place. you have to read the thread to understand those instructions.
Anything in my submissions area or my database should work on any site (unless there is a code conflict). If you try a code and it doesnt work, go ahead and post in that code's thread itself so I can refer back easier. I dont have the same "make your own thread" rule that PBS does.
As for the topics/posts question, that cab absolutely be done and could even be incorporated into the last post code. I would just need a little bit of time to add it in.
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 25, 2010 9:13:05 GMT -8
With the codes you crank out, I'd wait a year for it. I have maybe four codes in my headers and footers right now, and two of them are yours XD </kissass> But yes, lol, if you could do that for me, it would be awesome
|
|
|
Post by Wormopolis on Jun 25, 2010 11:14:32 GMT -8
Yeah.. I dont crank them out ad fast as SubDevo does. Im a slow typer.
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 25, 2010 13:48:57 GMT -8
your codes are wicked though. SubDevo has helped me out in some tight spots, but I've never really been a fan of his premade codes. Just not the style that appeals to me really.
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 25, 2010 16:28:38 GMT -8
|
|
|
Post by Wormopolis on Jun 25, 2010 21:39:08 GMT -8
I will admit I laughed at "BOARD DESCRIPTION GOES HERE SARAH"
this is what I am going to do, rather then write a new code, or even a duplicate code of the last post code, Im going to add in to the last post code something that lets you ALSO grab the numbers for threads/posts. the divs will need to have IDs like: <div tpreloc_boardid></div> where board id is the id of the donor board. so like <div tpreloc_general></div>
there will be 2 new variables at the top of the code. 1 will turn on the last post relocation system, and the second the thread/posts reloaction system.
working on this now.
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 25, 2010 23:15:33 GMT -8
(that was really just something to catch my eye as I speed scrolled through my headers ^^ But yes, that would work perfectly!
|
|
|
Post by Wormopolis on Jun 26, 2010 1:22:47 GMT -8
alright... make sure you notice all the stuff about how to id the elements or it wont be able to find things.
<script type="text/javascript"> <!-- // Last Post/Topics/Posts Relocate v1.1 // By Wormopolis - www.wormocodes.com // 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=true; // 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=true; // 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>
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 26, 2010 10:44:37 GMT -8
I can't get either of the divs to appear. I've placed the code both in my main header and footer, both above and below my javascript coding. Any idea on what's preventing the appearance of the div contents?
(I'm using the divs in my main headers, in that crazy block)
|
|
|
Post by Wormopolis on Jun 26, 2010 12:07:46 GMT -8
lemme look...
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 27, 2010 5:43:22 GMT -8
<script type="text/javascript"> <!-- if (pb_action=="home") { // ========C=A=T=E=G=O=R=Y======O=N=E================!=!=!=!=!=!=!=!=!=! // ================================================HEADER&&BOARD ONE document.write("<table width=\"100%\"><tr><td><div class=\"category\"><font class=\"highlight1\">» <b>We</b></font>lcome to <font class=\"highlight1\"><b>Ba</b></font>cklash<font class=\"highlight2\"><i>!</i></font></div><div class=\"base_1\"></div><div class=\"base_2\"></div><div class=\"board_wrap\"><img src=\"http://i48.tinypic.com/nd1wzt.png\" align=\"left\" height=\"47\" width=\"47\" border=\"0\"><div class=\"board_title\"><a href=\"/index.cgi?board=introforum\">An Introduction To Backlash<i>!</i></a></div><div class=\"divider\"></div><div class=\"board_desc\"><b>A NOTE TO EI USERS:</b> This site was not made to be viewed in your browser. Please make the switch to one of the four great browsers listed below. The site works wonderfully in all of those. You will not only be able to browse faster, but you can also see this site in all its glory! <i>(All links are for the Windows OS)</i><hr><b>Browsers:</b> <a href=\"http://www.opera.com/download/\" target=\"_blank\">Opera</a>, <a href=\"http://www.mozilla.com/en-US/firefox/personal.html\" target=\"_blank\">Firefox</a>, <a href=\"http://tiny.cc/4uom3\" target=\"_blank\">Google Chrome</a>, <a href=\"http://www.apple.com/safari/download/\" target=\"_blank\">Safari</a><div id=\"lpreloc_introforum\"></div></div></div>") } </script>
|
|
|
Post by Wormopolis on Jun 27, 2010 19:30:19 GMT -8
reloc code should be in main FOOTER
|
|
Troxy!
Not New Member
[Sj1:0]
Posts: 24
Troxy! said 0 great things
|
Post by Troxy! on Jun 29, 2010 17:26:47 GMT -8
No, that's where I had it to begin with. It still didn't work. I've tried it in the main footer, global footer, and in the global and main headers, both above and below the actual bits of code where I use the divs. I've even moved the code with the divs in the footer itself. It's still all a no go D:
|
|
|
Post by Wormopolis on Jun 29, 2010 17:51:16 GMT -8
Well the script DEFINATELY needs to go in footer, preferably main since it doesnt really need to run on any other boards. Im looking at this site: backlash-rpg.proboards.com/index.cgi?can you tell me where the divs are with tpreloc_ in them?
|
|