Create A Forum - Support Forums

Support => Create a Forum Codes and Support => Topic started by: Agent Moose on November 27, 2014, 04:21:53 am

Title: [Code] Name Across Board
Post by: Agent Moose on November 27, 2014, 04:21:53 am
It's been a long time since I've made a code :P  I decided to look up and see how this board is going and noticed people wanted a code that would add a crown to their username.  Solution is here!

Place in Footers:
Code: [Select]
<script type="text/javascript">
function NAB(real, owned){
//Created by Agent Moose
for(i in document.links){
if(document.links[i].innerHTML === real){
document.links[i].innerHTML = owned;
};};};
NAB("Agent Moose", "<font color='#00aabb'><b>Agent Caboose</b></font>");
NAB("OLD NAME", "NEW NAME");
</script>

So as I said above, this code will change all the links that have whatever username you say, to whatever new username you will want it to be.

Code: [Select]
NAB("OLD NAME", "NEW NAME");OLD NAME = Current Username (THIS IS CASE SENSITIVE)
NEW NAME = What you want your users to see. (You can use the same OLD NAME as the NEW NAME if you just want to add an image in front or bold ect)

As in the example above, you can use any HTML you would like.  You can use the font tag, bold, add an image before and after the name, whatever.

Here's an example if you want an image before the name:
Code: [Select]
NAB("Agent Moose", "<img src='IMAGE URL HERE' />Agent Moose");
Also, you can add as many of these lines as you wish:
Code: [Select]
NAB("OLD NAME", "NEW NAME");
Enjoy! :)
Title: Re: [Code] Name Across Board
Post by: CyanProductions on December 02, 2014, 12:01:26 pm
Thanks :)
Title: Re: [Code] Name Across Board
Post by: CyanProductions on December 02, 2014, 12:44:53 pm
Is it possible to make it so it displays the users avatar. So something like:
NAB("UserName", "<img src='http://{forumname}.createaforum.com/cavatars/{forumname}/' & UserName /><font color='#ff33cc'><b>UserName</b></font>");


In a way so that it updates for everyone automatically.
Title: Re: [Code] Name Across Board
Post by: Agent Moose on December 06, 2014, 03:19:02 am
There is not a way for me to do that, sadly.

I mean, is the whole "cavatars" thing a board or what?  I've never seen anything with that url on any forum.
Title: Re: [Code] Name Across Board
Post by: CyanProductions on December 20, 2014, 05:48:57 pm
This: http://cyanproductions.createaforum.com/cavatars/cyanproductions/avatar_1_1412542497.png
Title: Re: [Code] Name Across Board
Post by: aIURbliS on December 23, 2014, 03:41:12 am
The link is only available if you upload your avatar directly to the site, which not everyone does. The filename is also unpredictable
Title: Re: [Code] Name Across Board
Post by: CyanProductions on January 02, 2015, 11:39:38 pm
The link is only available if you upload your avatar directly to the site, which not everyone does. The filename is also unpredictable
I've seen a website do it before, it's not createaforum but it's an SMF
Title: Re: [Code] Name Across Board
Post by: aIURbliS on January 03, 2015, 04:32:27 am
The link is only available if you upload your avatar directly to the site, which not everyone does. The filename is also unpredictable
I've seen a website do it before, it's not createaforum but it's an SMF
Most likely, that website was using a mod which users can't install here at CreateAForum.
Title: Re: [Code] Name Across Board
Post by: CyanProductions on January 03, 2015, 03:45:11 pm
The link is only available if you upload your avatar directly to the site, which not everyone does. The filename is also unpredictable
I've seen a website do it before, it's not createaforum but it's an SMF
Most likely, that website was using a mod which users can't install here at CreateAForum.
kk, wish it was added to createaforum.