Post by Trip on Nov 22, 2014 8:53:12 GMT -5
Hey everybody!! I'm really proud to announce and post my Administrative Polls hack. When I overheard someone saying something about making the poll only available to staff, I decided to get right on it. Believe me or not, but this hack too me a long time to figure out fully. I was about to give up on it until I gave it my final attempt...that final attempt was succesful!! =D
Goes in desired Board Footers:
^: Heehee, and there you have it. What took me the longest was making this code Multi-Board compatible.
Short Explanation of my Code:
This will allow ONLY Administrators and Global Moderators to vote or even view the poll. I've also created some pretty good security just incase a member really wants to make a poll against your will. XD
Also know that this code assumes that you are using the GIF. =)
Also, read the comment in the code that explains what to do if you are using the GIF.
^: Note that the two "Admin.gif" images that I posted have 2 different URLs.
Those are just the most popular ones that I see on Proboards.
Just be sure to read the comments on the code for that, or just ask me. =)
If you're not using either of those GIFs, then that problem can be easily fixed by simple editing; just ask. =)
I've tested it many times and it works.
Heh, I think I'm getting better at loops.
Someone said that it "couldn't be done", so I just decided to challenge it. =)
Thank you! ^^
Goes in desired Board Footers:
<script language="JavaScript">
<!--
//Administrative Voting
//Created by Naoki
//Change charAt(49) to charAt(42) if 'admin' GIF image is "http://4d5.net/boardimages/menu/admin.gif"
verify = document.getElementsByTagName('img');
for(i=0;i<verify.length;i++){
bash = document.body.getElementsByTagName('img')[5].outerHTML.charAt(49);
if(verify[i].src.indexOf("/newpoll.gif")!=-1 && bash !="a"){
verify[i].outerHTML = "";
}}
bID = document.getElementsByTagName('option');
for(d=0;d<bID.length;d++){
if(bID[d].value.indexOf("index.cgi?board=")!=-1){
vID = bID[d].value.replace("index.cgi?board=","");
}}
if(location.href.indexOf("/index.cgi?board="+vID+"&action=createpoll")!=-1){
check = document.getElementsByTagName('img')[5].outerHTML.charAt(49);
if(check!="a"){
//No escape, b****! =)
document.getElementsByTagName('input')[0].outerHTML="";
location.href = "/index.cgi?"
}}
//-->
</script>
^: Heehee, and there you have it. What took me the longest was making this code Multi-Board compatible.
Short Explanation of my Code:
This will allow ONLY Administrators and Global Moderators to vote or even view the poll. I've also created some pretty good security just incase a member really wants to make a poll against your will. XD
Also know that this code assumes that you are using the GIF. =)
Also, read the comment in the code that explains what to do if you are using the GIF.
^: Note that the two "Admin.gif" images that I posted have 2 different URLs.
Those are just the most popular ones that I see on Proboards.
Just be sure to read the comments on the code for that, or just ask me. =)
If you're not using either of those GIFs, then that problem can be easily fixed by simple editing; just ask. =)
I've tested it many times and it works.
Heh, I think I'm getting better at loops.
Someone said that it "couldn't be done", so I just decided to challenge it. =)
Thank you! ^^