Revolution X

Coding Community => Coding Snippets => Topic started by: Agent Moose on November 07, 2008, 06:50:05 pm



Title: Add Text To Copyright
Post by: Agent Moose on November 07, 2008, 06:50:05 pm
Footers:
Code:
<script>
var CopyRight = "TEXT HERE";

//Created by Agent Moose (smcodes.smfforfree3.com)
document.getElementById("footerarea").innerHTML += "<center><span class='smalltext'>" + CopyRight + "</span></center>";
</script>

Just change TEXT HERE to the text you want it to be.

Enjoy :)


Title: Re: Add Text To Copyright
Post by: Spoken on November 10, 2008, 09:59:51 am
Does this work in IE?


Title: Re: Add Text To Copyright
Post by: Vitality on November 10, 2008, 04:32:14 pm
It should. I don't see why it wouldn't. The script isn't simply adding something to the footerarea.


Title: Re: Add Text To Copyright
Post by: Spoken on November 10, 2008, 04:36:23 pm
Here is the code i used

Code:
<script>
var CopyRight = "Testing, testing. 1, 2, 3.";

//Created by Agent Moose (smcodes.smfforfree3.com)
document.getElementById("footerarea").innerHTML += "<center><span class='smalltext'>" + CopyRight + "</span></center>";
</script>


Title: Re: Add Text To Copyright
Post by: deathwilldie on November 10, 2008, 04:48:07 pm
This would work in IE.  Is it not working for you?


Title: Re: Add Text To Copyright
Post by: Spoken on November 10, 2008, 04:59:53 pm
Nope its not working for me.


Title: Re: Add Text To Copyright
Post by: shimmy shabby on November 10, 2008, 05:02:45 pm
Tested it in IE 7 on my test for, (Server 3) didn't work for me either. Trying to make it work though.
But try this one, idk if it will work or not.
Code:
<script>
var CopyRight = "Testing, testing. 1, 2, 3.";

//Created by Agent Moose (smcodes.smfforfree3.com)
$("#footerarea").innerHTML += "<center><span class='smalltext'>" + CopyRight + "</span></center>";
</script>


Title: Re: Add Text To Copyright
Post by: deathwilldie on November 10, 2008, 05:05:08 pm
That's odd.  I'll see what Agent can do about it.


Title: Re: Add Text To Copyright
Post by: Vitality on November 10, 2008, 06:25:50 pm
Tested it in IE 7 on my test for, (Server 3) didn't work for me either. Trying to make it work though.
But try this one, idk if it will work or not.
Code:
<script>
var CopyRight = "Testing, testing. 1, 2, 3.";

//Created by Agent Moose (smcodes.smfforfree3.com)
$("#footerarea").append("<center><span class='smalltext'>" + CopyRight + "</span></center>");
</script>
If you're going to add text or something of the like in jQuery, you should use append(). I altered the snippet in the quote.


Title: Re: Add Text To Copyright
Post by: shimmy shabby on November 10, 2008, 06:29:36 pm
Tested it in IE 7 on my test for, (Server 3) didn't work for me either. Trying to make it work though.
But try this one, idk if it will work or not.
Code:
<script>
var CopyRight = "Testing, testing. 1, 2, 3.";

//Created by Agent Moose (smcodes.smfforfree3.com)
$("#footerarea").append("<center><span class='smalltext'>" + CopyRight + "</span></center>");
</script>
If you're going to add text or something of the like in jQuery, you should use append(). I altered the snippet in the quote.
Yea, i already tried that.
Didn't do make it work so i didn't bother adding it in


Title: Re: Add Text To Copyright
Post by: deathwilldie on November 10, 2008, 06:48:36 pm
Well Agent said that it could be because he changed it into Javascript.  It was in JQuery before.  It doesn't work because of something that IE does with Javascript when adding things into the footer.


Title: Re: Add Text To Copyright
Post by: Spoken on November 10, 2008, 08:11:04 pm
So it wont work in IE?


Title: Re: Add Text To Copyright
Post by: shimmy shabby on November 10, 2008, 08:12:41 pm
I guess right now :( . But i encourage you to download firefox anyways, its a much better browser. And i hope moose can get it to work with IE also though.


Title: Re: Add Text To Copyright
Post by: deathwilldie on November 11, 2008, 09:41:20 pm
Well I beleive he has this code on SMC in jquery.  That one should work on all the browsers.


Title: Re: Add Text To Copyright
Post by: Spoken on November 12, 2008, 08:37:37 am
Forget it I just tok the code out


Title: Re: Add Text To Copyright
Post by: Mojobojo82 on June 14, 2009, 02:29:18 am
So would this code be at the bottom of every page?


Title: Re: Add Text To Copyright
Post by: Mojobojo82 on June 14, 2009, 02:29:59 am
Grr... I can't see it on my forum


Title: Re: Add Text To Copyright
Post by: Agent Moose on June 14, 2009, 12:56:35 pm
Try this one:
Code:
<script>
var CopyRight = "TEXT HERE";

//Created by Agent Moose (smcodes.smfforfree3.com)
$("#bodyarea").append("<br /><center><span class='smalltext'>" + CopyRight + "</span></center>");
</script>


Title: Re: Add Text To Copyright
Post by: Mojobojo82 on June 15, 2009, 07:07:16 am
It works! yay! but theres no copyright sign... Do i have to type like (C) or something in the TEXT HERE part?


Title: Re: Add Text To Copyright
Post by: Agent Moose on June 15, 2009, 10:32:19 am
Correct :)  or you can use this:
Code:
&copy; TEXT HERE


Title: Re: Add Text To Copyright
Post by: Mojobojo82 on June 16, 2009, 02:03:22 am
Yay! It works Thanks Moose! Your the best