SoCal
« [CB] Add A Register Note »

Welcome Guest. Please Login or Register.
Sept 2, 2010, 4:53pm




SoCal :: SoCal Codes :: ProBoards Codes :: [CB] Add A Register Note
Page 1 of 2 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: [CB] Add A Register Note (Read 3,025 times)
Th£ ÎñFïNîTE™
[image]
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. :P
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<
« Last Edit: Dec 20, 2006, 3:52am by Th£ ÎñFïNîTE™ »Link to Post - Back to Top  IP: Logged
[ $©Ø®Þ!@Ω™ ]
[image]
April's Member
of the Month

member is offline

[avatar]

I AM BRACKET MAN!!!!

[msn] [aim]
[homepage]

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. ;)
Link to Post - Back to Top  IP: Logged

(>^^)> Bustin' makes me feel good!
Th£ ÎñFïNîTE™
[image]
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. ;D
Link to Post - Back to Top  IP: Logged
Richie
[image]
Welcoming Committee - SVP of Name Shortning
member is offline

[avatar]

^ Yes, That's My Fugly Face!

[yim] [msn] [aim]
[homepage]

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?
Link to Post - Back to Top  IP: Logged

Th£ ÎñFïNîTE™
[image]
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).
« Last Edit: Dec 20, 2006, 3:55am by Th£ ÎñFïNîTE™ »Link to Post - Back to Top  IP: Logged
matt84au
[image]
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://
Link to Post - Back to Top  IP: Logged
Th£ ÎñFïNîTE™
[image]
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. :)
Link to Post - Back to Top  IP: Logged
TK!
[image]
member is offline

[avatar]

"time flies when yer Drunk as Hell"


[homepage]

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! :)
Link to Post - Back to Top  IP: Logged

[image]
pokedude94
[image]
member is offline

[avatar]



Joined: Jun 2006
Posts: 24
 Re: [CB] Add A Register Note
« Reply #8 on Jan 13, 2007, 1:39am »

Board URL: http://www.pikapika7.proboards67.com

It doesn't show for some reason.
Link to Post - Back to Top  IP: Logged
Th£ ÎñFïNîTE™
[image]
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. :P
Also, you have the "Extra Smileys" code by california in your footers twice. :P

You haven't added the code, how d'you expect it to work? :P


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.
Link to Post - Back to Top  IP: Logged
pokedude94
[image]
member is offline

[avatar]



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.
« Last Edit: Jan 14, 2007, 1:12am by pokedude94 »Link to Post - Back to Top  IP: Logged
Th£ ÎñFïNîTE™
[image]
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. :P
Link to Post - Back to Top  IP: Logged
pokedude94
[image]
member is offline

[avatar]



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.
« Last Edit: Jan 14, 2007, 12:16pm by pokedude94 »Link to Post - Back to Top  IP: Logged
Chris
[image]
member is offline

[avatar]


[homepage]

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.
Link to Post - Back to Top  IP: Logged

[image]
Th£ ÎñFïNîTE™
[image]
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. :P
It creates a text node, so HTML doesn't work. That's what SoE said a few posts above. ;)
Link to Post - Back to Top  IP: Logged
Page 1 of 2 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Report Abuse | Mobile