|
Author | Topic: [CB] Add A Register Note (Read 3,025 times) |
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | [CB] Add A Register Note « Thread Started on Dec 18, 2006, 12:05pm » | |
This code adds a title bar and a cell before the normal register table on the register page. Here you can tell users who are registering about member deletions/rules or something of the kind. This is not in any way against the PB ToS.
Main Footer :
<script type="text/javascript"><!-- /* Add A Register Note by Th£ ÎñFïNîTE™ May not be re-posted, ripped or claimed as your own.  This copyright must stay in place at all times! */
var regtitletext = "Title Text That You Can Add"; // Text in the title bar var reginfotext = "Whatever information you want to display."; // Text in the cell
/* Do not edit below here! */ if(location.href.match(/action=register/i)){ var fintd = document.getElementsByTagName("td"); for(i=0; i<fintd.length; i++){ if(fintd.item(i).className == "titlebg" && fintd.item(i).width == "100%" && fintd.item(i).innerHTML.match(/Register/i)){ var tbody = fintd.item(i).parentNode.parentNode; var new_row_two = tbody.insertRow(0); var new_row_one = tbody.insertRow(0); var titlecell = document.createElement("td"); titlecell.className = "titlebg"; titlecell.style.width = "100%"; var infocell = document.createElement("td"); infocell.className = "windowbg"; infocell.style.width = "100%"; infocell.style.fontSize = "12px"; new_row_one.appendChild(titlecell); new_row_two.appendChild(infocell); new_row_one.cells.item(0).appendChild(document.createTextNode(regtitletext)); new_row_two.cells.item(0).appendChild(document.createTextNode(reginfotext)); break; } } } // --></script>
Edit the parts in red. When you do so, make sure you add a backslash \ before any backslash that you use.
This should work fine in both IE and FF. This is my first code using DOM. Yaaay!
Preview - >Click<
| |
|
[ $©Ø®Þ!@Ω™ ]
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) April's Member of the Month member is offline
![[avatar] [avatar]](http://uploads.roddyinnovations.com/users/Scorpian8867/sasocal.png)
I AM BRACKET MAN!!!!
![[aim] [aim]](http://www.sz-ex.com/socal/neon/images/icons/aim.gif)
![[homepage] [homepage]](http://www.sz-ex.com/socal/neon/images/icons/www_sm.gif) Joined: Jan 2006 Gender: Male  Posts: 1,722 Location: Spring, Texas
|  | Re: [CB] Add A Register Note « Reply #1 on Dec 18, 2006, 1:26pm » | |
Not bad not bad. I see some real use from this code.
|
(>^^)> Bustin' makes me feel good! |
|
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | Re: [CB] Add A Register Note « Reply #2 on Dec 19, 2006, 1:46am » | |
Thanks. Was my first code using DOM.
| |
|
Richie
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) Welcoming Committee - SVP of Name Shortning member is offline
![[avatar] [avatar]](http://i17.photobucket.com/albums/b67/Son_of_Exodia/Proboards/avy.jpg)
^ Yes, That's My Fugly Face!
![[aim] [aim]](http://www.sz-ex.com/socal/neon/images/icons/aim.gif)
![[homepage] [homepage]](http://www.sz-ex.com/socal/neon/images/icons/www_sm.gif) Joined: Jun 2005 Gender: Male  Posts: 1,684 Location: In The Pit of The Shadow Realm
|  | Re: [CB] Add A Register Note « Reply #3 on Dec 19, 2006, 8:44pm » | |
i've tried it & i'm only disappointed that i can't use HTML for the info. i want to display. anyway around that?
|
|
|
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | Re: [CB] Add A Register Note « Reply #4 on Dec 20, 2006, 3:43am » | |
I don't think HTML would be allowed by the ToS. Only text was okay, as far as I gathered from that PBS thread I started.
If you're trying to use some font styles or link to something, it wouldn't work (as you've already found out).
| |
|
matt84au
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/new_member.gif) member is offline
Joined: Jan 2007 Posts: 3
|  | Re: [CB] Add A Register Note « Reply #5 on Jan 1, 2007, 3:46am » | |
Wow Thank-you soo much I have been looking for a code like this for sometime for our forum again thank-you
all the best Matt:) your friendBoard URL: http://Board URL: http://
| |
|
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | Re: [CB] Add A Register Note « Reply #6 on Jan 1, 2007, 5:21am » | |
You're welcome.
| |
|
TK!
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/junior_member.gif) member is offline
![[avatar] [avatar]](http://img.photobucket.com/albums/v702/trollkiller/early51iconcap.jpg)
"time flies when yer Drunk as Hell"
![[homepage] [homepage]](http://www.sz-ex.com/socal/neon/images/icons/www_sm.gif) Joined: Sept 2006 Gender: Male  Posts: 61 Location: DREAM LAND
|  | Re: [CB] Add A Register Note « Reply #7 on Jan 1, 2007, 8:11am » | |
very useful and works great,thanks!
|
|
|
pokedude94
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/new_member.gif) member is offline
![[avatar] [avatar]](http://s2.images.proboards.com/avatars/smiley.gif)
Joined: Jun 2006 Posts: 24
| |
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | Re: [CB] Add A Register Note « Reply #9 on Jan 13, 2007, 3:02am » | |
Dude, your main page takes forever to load ... the splash (I only know it's there because I'm looking at the coding) image doesn't seem to want to load.  Also, you have the "Extra Smileys" code by california in your footers twice. 
You haven't added the code, how d'you expect it to work? 
A word of advice, you have WAY too many codes in your headers and footers, remove all but the absolutely necessary ones, the codes you're using almost quadruple the loading time.
| |
|
pokedude94
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/new_member.gif) member is offline
![[avatar] [avatar]](http://s2.images.proboards.com/avatars/smiley.gif)
Joined: Jun 2006 Posts: 24
|  | Re: [CB] Add A Register Note « Reply #10 on Jan 14, 2007, 1:11am » | |
I took off the code because it didn't work. And the second smiley code is there be we have different links. But I'll put the code back on anyway to show you it doesn't work.
| |
|
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | Re: [CB] Add A Register Note « Reply #11 on Jan 14, 2007, 1:40am » | |
I still don't see the code in your footers.
| |
|
pokedude94
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/new_member.gif) member is offline
![[avatar] [avatar]](http://s2.images.proboards.com/avatars/smiley.gif)
Joined: Jun 2006 Posts: 24
|  | Re: [CB] Add A Register Note « Reply #12 on Jan 14, 2007, 12:14pm » | |
Sorry, I'll add it now.
EDIT: It works, but not when I want to add a lot of things.
| |
|
Chris
![[image] [image]](http://iycatacombs.com/socal/neon/images/ranks/coding_mod.gif) member is offline
![[avatar] [avatar]](http://iycatacombs.com/offsite/cd_dorkycutie.gif)
![[homepage] [homepage]](http://www.sz-ex.com/socal/neon/images/icons/www_sm.gif) Joined: Jul 2005 Gender: Male  Posts: 6,367 Location: Nebraska
|  | Re: [CB] Add A Register Note « Reply #13 on Jan 14, 2007, 12:43pm » | |
Quote:Sorry, I'll add it now.
EDIT: It works, but not when I want to add a lot of things. |
|
That's most likely because you're hitting the Enter key. You can't do that. You need to use "<br />" instead for a line break to appear.
|
|
|
Th£ ÎñFïNîTE™
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
Joined: Feb 2006 Gender: Male  Posts: 1,214 Location: India
|  | Re: [CB] Add A Register Note « Reply #14 on Jan 15, 2007, 3:37am » | |
Quote: Quote:Sorry, I'll add it now.
EDIT: It works, but not when I want to add a lot of things. |
|
That's most likely because you're hitting the Enter key. You can't do that. You need to use "<br />" instead for a line break to appear. |
|
That won't work either.  It creates a text node, so HTML doesn't work. That's what SoE said a few posts above.
| |
|
|