Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Jul 9, 2005 19:25:58 GMT
Global FooterThis code ads an extra page before proceeding to the register page. This is great for putting the Forum rules, to make sure new members see them. Edit the red with your forum rules or whatever you want to put. <div id="register" style="display: none;"> Forum Rules etc. Go Here </div>
<script type="text/javascript"> <!-- /* extra register page by ross 101support.proboards43.com */
if(pb_username == 'Guest') { var td = document.getElementsByTagName('td'); var a = document.getElementsByTagName('a'); for(r=0; r<a.length; r++) { if(a.item(r).href.match(/ion=register/)) { a.item(r).href="/index.cgi?action=preregister"; } } for(e=0;e<td.length;e++) { if(document.location.href.match(/action=preregister/)){ var forumName=document.title.split("- ")[0]; document.title=forumName+" - Register"; document.getElementsByTagName("font")[1].innerHTML="« Register »"; if(td[e].width=="100%" && td[e].vAlign=="top"){ var itab=td[e].innerHTML.split(/<br>(\s|\n)/i)[0]; var tab=td[e].innerHTML.split(itab)[1]; td[e].innerHTML="<a href='/index.cgi'>"+forumName+"</a> :: Register"+tab; } if(td[e].innerHTML.match(/An Error Has Occurred/) && td[e].className=="titlebg") { td[e].firstChild.innerHTML='Forum Rules'; td[e+1].firstChild.innerHTML = document.getElementById('register').innerHTML; var newCell=td[e].parentNode.parentNode.insertRow(2).insertCell(0); newCell.className="windowbg2"; newCell.innerHTML='<form action="/index.cgi?action=register" method="post" onSubmit="disable(this)"><font size="-1">By Clicking Continue, you confirm that you have read and agree to the rules laid out above.</font> <input type="submit" value="Continue"></form>'; } } } } //--> </script>
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Nov 20, 2005 21:21:32 GMT
this doesn't exactly work. i mean it doesn't replace the register link & what not.
for anybody who wants to use this, I'd suggest using this in you GLOBAL FOOTER too
<script type="text/javascript"> <!-- /* switch-it */ var font=document.getElementsByTagName("font"); function switchit(t1,t2){ for(i=0;i<font.length;i++){ var f=font[i].innerHTML; if(f.match(t1) && !location.href.match(/(headers|modify)/)){ font[i].innerHTML=f.replace(t1,t2); } } }
switchit('action=register','action=preregister');
// --> </script>
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Feb 6, 2006 19:24:16 GMT
btw, i didn't see this in the code index
|
|
Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Feb 7, 2006 17:17:53 GMT
When I tested it it worked fine. Forum URL? Oh, and it is now added to the database
|
|
|
Post by George® on Feb 7, 2006 18:12:16 GMT
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Feb 7, 2006 18:26:55 GMT
thanks George! When I tested it it worked fine. Forum URL? Oh, and it is now added to the database my 1st post was written before you edited the code. & i tried the newer one on my test board but it takes me to the login area? ( preview) Edit: i only see it when logged in, but not as a guest! also it's not a big deal to me as i can just use the switch-it code to get the register button to link to it.
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Apr 26, 2006 17:42:06 GMT
Forum URL: insaneygo.proboards.comok now it doesn't wanna work at all at 1st it said " This form is inoperational!" just above the " By Clicking Continue, you confirm that you have read and agree to the rules laid out above" text. now i recopied the code (added a fresh copy) & now it's not working at all (it didn't in my JS FILE & doesn't work out of my JS file). it's currently not in my JS file & in my global footers insaneygo.proboards.com/?action=registerHELP PLEASE!!!! Edit: if need be i can add back the version that had the error i stated above
|
|
ME!
Moderator
~Remanifesting-Eternal.~
Posts: 778
|
Post by ME! on Apr 26, 2006 17:49:52 GMT
okay, add the code in and lets see.
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Apr 26, 2006 17:57:14 GMT
|
|
ME!
Moderator
~Remanifesting-Eternal.~
Posts: 778
|
Post by ME! on Apr 26, 2006 18:01:10 GMT
dont put it in the JS file, put it on the forum itself, and on top of all the othercodes in the global footer.
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Apr 26, 2006 18:03:21 GMT
still didn't work
|
|
ME!
Moderator
~Remanifesting-Eternal.~
Posts: 778
|
Post by ME! on Apr 26, 2006 18:05:59 GMT
looks working to me.. delete your tempfile and cookies and then try oh and move this above the code <div id="register" style="display: none;"> <b>Welcome to The Insane Yugioh Board Pre-Registration Page!! Here Is where We'll Place Important Info & Answers to <u>Frequently Asked Questions</u> that you may wish to know about before deciding to register here!!</b><br/><br/><b>What Are Your Forum Rules??</b><br><a href="http://insaneygo.proboards20.com/index.cgi?board=announcements&action=display&thread=1123967423" target="_blank"><u>Click here to read our Forum Policy!</u></a><br><br><b><u>FAQ (Frequest Asked Questions)</u></b><br><a href="http://help.proboards.com/memberguide/index.html" target="_blank"><u>Click Here For the Proboards Help Guide to help explain how to work the features you can use as a member</u></a><br><br><b><u>Why Should I Register?</u></b><br>You should register here at IYB so you can take part in fun activities such as: <br>1) On-Line Dueling Tournaments (<a href="http://insaneygo.proboards20.com/index.cgi?action=display&board=dueling&thread=1113109233" target="_blank"><u>Click here to learn how to duel on-line</u></a>)<br>2) Get Your Deck Rated/Fixed In Our Deck Discussion Board<br>3) Trade Your Cards Online with other users<br>4) Chat with other members & make new friends<br>5) Also you will be able to post at places that you couldnt post as a guest!<br/><br/><b><u>Does Registration Cost Any Money?</u></b><br/>IYB is a <b><i>COMPLETELY FREE FORUM</i></b> so there are no fines or fees to register on our forum. Although you can <a href="http://www.proboards.com/adfree-signup.cgi?insaneygo.proboards20.com" target="_blank"><u>donate to make this forum ad free</u></a>, it is not required that you pay any money. <a href="http://insaneygo.proboards20.com/index.cgi?action=aboutadfree" target="_blank"><u>Click here to learn more about "adfree"</u></a>.<br><br><b><u>I still have some unanswered questions, how can i find out more?</u></b><br>If you still have questions, you may <a href="http://insaneygo.proboards20.com/index.cgi?board=guest&action=display&thread=1119470646" target="_blank"><u>Reply to This Thread</u></a> <b><i>OR</i></b> contact the owner directly by:<br> <b>Email:</b> <A href="mailto:Exodiawin@yahoo.com"><u>Exodiawin@yahoo.com</u></A><br>OR<br><b>AIM:</b> Son of Exodia<br/><br/>If you are still interested in registering for IYB, click the continue button below </div>
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Apr 26, 2006 18:16:53 GMT
did all that & still nothingSlight Correction, I only see it as a guest , not as admin . anyway to fix that
|
|
ME!
Moderator
~Remanifesting-Eternal.~
Posts: 778
|
Post by ME! on Apr 26, 2006 18:21:58 GMT
well it wouldnt work because the reg page is only for guests. besdies , why would the admin want to reg again ? try this find this line if(pb_username == 'Guest') { make it if(pb_username == 'Guest','admin') {
|
|
Richie
Veteran
^ Yes, That's me V_V
Posts: 624
|
Post by Richie on Apr 26, 2006 18:24:59 GMT
well it wouldnt work because the reg page is only for guests. besdies , why would the admin want to reg again ? maybe i just want to see it while logged in in case i wanna change the table portion or edit the wording etc....
|
|