victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Feb 16, 2010 11:47:10 GMT -8
I saw the coolest thing in a graphic forum were I was looking at free rank buttons, located here: www.theadminzone.com/forums/index.php . It look to be completely open and no registering necessary and I was happy clicking away, reading different threads then suddenly I got redirected to this screen (I think it was after I opened a total of 10 threads in 2 different boards: I was able to click the home page button and back to viewing the entire forum. I open one of the boards and that also went fine. Then I try to open a thread and yes, got redirected to the message again. Can this be reproduced for Proboards? Thanks
|
|
|
Post by Wormopolis on Feb 16, 2010 15:36:47 GMT -8
the only way I could think to make this work would involve storing a cookie on a guests computer. the cookie could keep track of the different thread IDs that were visited (similar to the thread log program I have over there on the left). when the count reaches a predefined number, it could basically hide the forum and write the message.
however, if the guest were to just refresh cookies they could easily bypass this. there will be no way to server side store a guests IP.
still interested?
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Feb 16, 2010 16:29:47 GMT -8
Because you mentioned cookies, I went ahead and cleared all my cookies with CCleaner and sure enough I was able to open threads in their website again. Yes, I'm still interested! Could you make sure it's clicking on actual post and not Home or Board Names that bring the redirect like that site.
|
|
|
Post by Wormopolis on Feb 21, 2010 19:38:00 GMT -8
Working on this tonight.
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 3, 2010 10:44:56 GMT -8
Hi Wormopolis, May I have an update on this? Thanks!
|
|
|
Post by Wormopolis on Mar 3, 2010 20:13:53 GMT -8
sorry about that. I started on it, then got distracted. Im tearing apart the thread view code in order to recycle the code I already wrote and customizing it.
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 4, 2010 0:34:09 GMT -8
sorry about that. I started on it, then got distracted. Im tearing apart the thread view code in order to recycle the code I already wrote and customizing it. Thanks for the update!
|
|
|
Post by Wormopolis on Mar 7, 2010 21:25:58 GMT -8
finishing this up. I have the meat of the code in place.. just workin on the potatoes and bread.
|
|
|
Post by Wormopolis on Mar 7, 2010 23:16:40 GMT -8
give this a shot.. I recommend top of global footer in order to hide things faster.
<script type="text/javascript"> <!-- // Troll monitor v1.1 // by Wormopolis -- concept by victory1 // do not repost - keep header intact
var maxThreadStore = 5; var exceptionThread=249; var msgColor="FFFFFF"; var msgBGColor="000000"; var trollMessage="<br><br><br><center>Looks like you have been exploring a lot of the site! I hope you enjoyed what you saw! Please take the time to register so you can continue to see the rest of the site and contribute! <br><br> Hope to see you around!</center>"; // message can have HTML
var trl_id_array= new Array();
if (true && location.href.match(/action=display/) && pb_username=='Guest') { temp=location.href.match(/board=(.*?)&/); board_id=RegExp.$1; temp=location.href.match(/thread=(\d+)/); thread_id=RegExp.$1; holdme=board_id+":"+thread_id;
// check cookie for thread list and update it chk=new RegExp("trl_idlist=(.*?)(;|$)",''); if (document.cookie.match(chk)) { // list exists, check to see if current thread is already in it temp=RegExp.$1; trl_id_array=temp.split('¦'); for (ii=0; ii<trl_id_array.length; ii++) { if (trl_id_array[ii]==holdme) { hold=trl_id_array.splice(ii,1); break; } } trl_id_array.unshift(holdme); } else { // no list exists... start a new one trl_id_array.unshift(holdme); } expTime=new Date(); expTime.setYear(expTime.getFullYear()+1); document.cookie="trl_idlist="+trl_id_array.join('¦')+";expires="+expTime; chk = new RegExp("trl_idlist=(.*?)(;|$)",''); if (document.cookie.match(chk) ) { temp=RegExp.$1; trl_id_array=temp.split('¦'); if (trl_id_array.length>maxThreadStore && !location.href.match(new RegExp('thread='+exceptionThread+'$',''))) { for (tbl=document.getElementsByTagName('table'), t=0; t<tbl.length; t++) { if (tbl[t].className=='bordercolor' && !tbl[t].innerHTML.match(/welcomebg/)) tbl[t].style.display="none"; } nwdv=tbl[t-1].parentNode.insertBefore(document.createElement('div'), tbl[t-1].nextSibling) nwdv.width=tbl[t-1].width; nwdv.style.height=200; nwdv.id="trollmsg"; nwdv.style.backgroundColor=msgBGColor; nwdv.align='center'; nwdv.appendChild(document.createElement('div')); nwdv.firstChild.vAlign='middle'; nwdv.firstChild.appendChild(document.createElement('font')); nwdv.firstChild.firstChild.size=2; nwdv.firstChild.firstChild.color=msgColor; nwdv.firstChild.firstChild.innerHTML=trollMessage; } }
} if (pb_username!='Guest') { chk = new RegExp("trl_idlist=(.*?)(;|$)",''); if (document.cookie.match(chk)) { expTime=new Date(); expTime.setYear(expTime.getFullYear()-1); document.cookie="trl_idlist=remove;expires="+expTime; }
}
// --> </script>
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 8, 2010 2:01:56 GMT -8
It works exactly how it's suppose to with one small problem, there's no message. They get a black screen. But everything else works. I attached a screen shot. I don't know why the message is not there? Attachments:
|
|
|
Post by Wormopolis on Mar 8, 2010 2:25:07 GMT -8
ahh.. its because your default font color is black, whereas mine is white.
no worries, we can make an adjustment.
find this line:
nwdv.firstChild.firstChild.size=2;
and right after it add:
nwdv.firstChild.firstChild.color="FFFFFF";
do you think it would be better to just give the div a classname so it can be styled with CSS? I figured white text on a black background would get enough attention.
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 8, 2010 2:31:05 GMT -8
That did the trick! So far it's perfect. Since I'm ad free this will really help me! Thanks ;D
|
|
|
Post by Wormopolis on Mar 8, 2010 2:33:58 GMT -8
one more thing...
I noticed that all of the username links on the main page seem to direct guests to some "welcome" thread. Do you want this code to be able to still display THAT thread (in other words, make THAT thread an exception?)
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 8, 2010 2:44:36 GMT -8
one more thing... I noticed that all of the username links on the main page seem to direct guests to some "welcome" thread. Do you want this code to be able to still display THAT thread (in other words, make THAT thread an exception?) Do you mean the thread they get that say they can't search or view profile? That's what the welcome message does. They only get that message when they click on a username or try to search; it's Subdevo's code "Guest cannot view profile or search" with a redirect welcome message asking them to register or login. I forgot all about that so yes please make it an exception.
|
|
|
Post by Wormopolis on Mar 8, 2010 3:14:04 GMT -8
recopy. added color variables at the top for easier editing.
|
|