SoCal
« Add a Copyright to every Post »

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




SoCal :: SoCal Codes :: ProBoards Codes :: Add a Copyright to every Post
Page 1 of 5 » Jump to page   Go    [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: Add a Copyright to every Post (Read 11,058 times)
california
[image]
I'm not here...
member is offline

[avatar]



Joined: Nov 2004
Gender: Male
Posts: 6,425
 Add a Copyright to every Post
« Thread Started on May 21, 2005, 1:58am »

This code will add a copyright message including the poster's name after each post, right above the signature area. It works for guests too.

<script type="text/javascript">
<!--
/* add a copyright to every user's post by california */

var copyright="©2005, <i>#username#</i>, All Rights Reserved.";

var td=document.getElementsByTagName("td");
if(location.href.match(/action=(display|search2)/)){
    for(i=0;i<td.length;i++){
        var tda=td[i].getElementsByTagName("a");
        if(td[i].width=="20%" && td[i].className.match(/windowbg/)){
            if(tda.length>2){
                if(tda[1].name) dname = tda[2].innerHTML;
                else dname = tda[1].innerHTML;
            }else{
                var dname = (td[i].innerHTML.match(/<\/a>\s?(\w+)\s?</i)) ? RegExp.$1 : 'guest';
            }
        }
        if(td[i].colSpan=="3" && td[i].vAlign=="bottom"){
            td[i].innerHTML=copyright.replace(/#username#/gi,dname)+td[i].innerHTML;
        }
    }
}
// -->
</script>


Board Footers, global okay

Edit the message in cyan. The red will be replaced with the user's display name, so make sure it appears somewhere in the message as #username#, and do not change it.
« Last Edit: Mar 30, 2008, 1:58pm by Chris »Link to Post - Back to Top  IP: Logged

[image]
Sharon
[image]
member is offline

[avatar]

ooo feel the power of the sad eyes


[homepage]

Joined: Apr 2005
Gender: Female
Posts: 39
Location: texas
 Re: Add a Copyright to every Post
« Reply #1 on Jul 20, 2005, 7:35pm »

what happens when 2006 rolls around?
Link to Post - Back to Top  IP: Logged

Soumak
[image]
member is offline

[avatar]

Dreams are Ment to be Lived



Joined: Feb 2005
Gender: Male
Posts: 2,082
Location: Austin, Texas
 Re: Add a Copyright to every Post
« Reply #2 on Jul 20, 2005, 7:58pm »

lol change it to 2006 :)
Link to Post - Back to Top  IP: Logged

[image]
-----------------------------------------------------------------------------------------------------------
[image]
california
[image]
I'm not here...
member is offline

[avatar]



Joined: Nov 2004
Gender: Male
Posts: 6,425
 Re: Add a Copyright to every Post
« Reply #3 on Jul 21, 2005, 12:44am »


Quote:
what happens when 2006 rolls around?


That's why I made the copyright message edittable...
Link to Post - Back to Top  IP: Logged

[image]
pharmerphil
[image]
member is offline





Joined: Nov 2004
Posts: 16
 Re: Add a Copyright to every Post
« Reply #4 on Jul 23, 2005, 3:30am »

can this be edited to just add a copyright to admin posts? :)
Link to Post - Back to Top  IP: Logged
california
[image]
I'm not here...
member is offline

[avatar]



Joined: Nov 2004
Gender: Male
Posts: 6,425
 Re: Add a Copyright to every Post
« Reply #5 on Jul 24, 2005, 12:33am »

if(td[i].colSpan=="3" && td[i].vAlign=="bottom" && dname.match(/(displayname1|displayname2)/i)){
Link to Post - Back to Top  IP: Logged

[image]
pharmerphil
[image]
member is offline





Joined: Nov 2004
Posts: 16
 Re: Add a Copyright to every Post
« Reply #6 on Jul 27, 2005, 2:25am »

Thanks Cali....but ...SWOOSH, over my head, where do I subtitute for that line? edit the red?
Link to Post - Back to Top  IP: Logged
detectiveunknown
[image]
member is offline





Joined: Dec 2004
Gender: Male
Posts: 326
 Re: Add a Copyright to every Post
« Reply #7 on Jul 27, 2005, 3:22pm »

No..add the red.. from here

if(td[i].colSpan=="3" && td[i].vAlign=="bottom"){

The new code will be..

Code:
<script type="text/javascript">
<!--
/* add a copyright to every user's post by california */

var copyright="©2005, <i>#username#</i>, All Rights Reserved.";

var td=document.getElementsByTagName("td");
if(location.href.match(/action=(display|search2)/)){
&nbsp; &nbsp; for(i=0;i<td.length;i++){
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; var tda=td[i].getElementsByTagName("a");
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; if(td[i].width=="20%" && td[i].className.match(/windowbg/)){
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if(tda.length>1){
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var dname=tda[1].innerHTML;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}else{
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; var dname = (td[i].innerHTML.match(/<\/a>\s?(\w+)\s?</i)) ? RegExp.$1 : 'guest';
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }
if(td[i].colSpan=="3" && td[i].vAlign=="bottom" && dname.match(/(displayname1|displayname2)/i)){
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;td[i].innerHTML=copyright.replace(/#username#/gi,dname)+td[i].innerHTML;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; }
&nbsp; &nbsp; }
}
// -->
</script>
« Last Edit: Jul 27, 2005, 3:24pm by detectiveunknown »Link to Post - Back to Top  IP: Logged
daspokenone
Guest
 Re: Add a Copyright to every Post
« Reply #8 on Sept 2, 2005, 5:04pm »

can this code be modified to put the real names
instead of the user names
Link to Post - Back to Top  IP: Logged
california
[image]
I'm not here...
member is offline

[avatar]



Joined: Nov 2004
Gender: Male
Posts: 6,425
 Re: Add a Copyright to every Post
« Reply #9 on Sept 2, 2005, 9:12pm »


Quote:
can this code be modified to put the real names
instead of the user names


It already uses the display names (as opposed to user names). So for me it would say '© california' and not '© admin' which is what I'd prefer...
« Last Edit: Sept 2, 2005, 9:13pm by california »Link to Post - Back to Top  IP: Logged

[image]
daspokenone
Guest
 Re: Add a Copyright to every Post
« Reply #10 on Sept 6, 2005, 11:51am »

well the folks on my boards are posting poetry and would like to use the real names of the people who wrote it for me it would be copywite jason banks instead of da spoken one
Link to Post - Back to Top  IP: Logged
detectiveunknown
[image]
member is offline





Joined: Dec 2004
Gender: Male
Posts: 326
 Re: Add a Copyright to every Post
« Reply #11 on Sept 6, 2005, 2:13pm »

You will have to manually do that. You don't want every single post on your board to say that someone like jason banks originally wrote it. It's best to tell your members put a copyright with the post
Link to Post - Back to Top  IP: Logged
california
[image]
I'm not here...
member is offline

[avatar]



Joined: Nov 2004
Gender: Male
Posts: 6,425
 Re: Add a Copyright to every Post
« Reply #12 on Sept 6, 2005, 8:38pm »


Quote:
well the folks on my boards are posting poetry and would like to use the real names of the people who wrote it for me it would be copywite jason banks instead of da spoken one


How is the code supposed to know what your real name is?
Link to Post - Back to Top  IP: Logged

[image]
Sharon
[image]
member is offline

[avatar]

ooo feel the power of the sad eyes


[homepage]

Joined: Apr 2005
Gender: Female
Posts: 39
Location: texas
 Re: Add a Copyright to every Post
« Reply #13 on Oct 12, 2005, 10:45pm »

is there a way to have this code work for just particular posts? like.. in my board my members post poetry, stories, and such, and it's cool that it says, "©2005, Sharon, All Rights Reserved." after my poem but.. it also says ©2005, (username), All Rights Reserved. after comments also. is there a way to disable the copyright code for replies?
Link to Post - Back to Top  IP: Logged

california
[image]
I'm not here...
member is offline

[avatar]



Joined: Nov 2004
Gender: Male
Posts: 6,425
 Re: Add a Copyright to every Post
« Reply #14 on Oct 12, 2005, 11:34pm »

Well if you only want it for specific posts then it's best to just put it there manually at the end of your post, honestly. It's hard to distinguish between the first post of the thread and the replies.
Link to Post - Back to Top  IP: Logged

[image]
Page 1 of 5 » 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