We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Icon in Username
Topic Started: Aug 13 2015, 04:16 PM (420 Views)
FB92
Member Avatar
Member
[ *  * ]
So, firstly I am wanting a code that places an icon before the username. But secondly I want that code to be customized so I can use Font Awesome instead. I have installed FA on my site already.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Are you wanting only administrators to apply the icon, or members may apply it too?
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Admins.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
function addFA(uID, html) {
$('a.member a[href*="/profile/' + uID + '/"]').prepend(html + ' ');
}

addFA('USER_ID', 'HTML');
addFA('USER_ID', 'HTML');
addFA('USER_ID', 'HTML');
//]]>
</script>
Edit the capitalized text as necessary.
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Tried this:
Quote:
 
<script type="text/javascript">
//<![CDATA[
function addFA(uID, html) {
$('a.member a[href*="/profile/' + uID + '/"]').prepend(html + ' ');
}

addFA('3397809', '<i class="fa fa-gamepad"></i>');
//]]>
</script>

and nothing works.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Did you put it above or below the Font Awesome code?
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
I've got <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
in javascripts

<script type="text/javascript">
//<![CDATA[
function addFA(uID, html) {
$('a.member a[href*="/profile/' + uID + '/"]').prepend(html + ' ');
}

addFA('3397809', '<i class="fa fa-gamepad"></i>');
//]]>
</script>
in below the board.

My user is profile/3397809/
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Can I see a link to your board?
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
http://themediavault.net/index/
If you need me to pre-reg you so you can access admin & the board let me know.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I made a very silly mistake, try this instead:
Code:
 
<script type="text/javascript">
//<![CDATA[
function addFA(uID, html) {
$('a.member[href*="/profile/' + uID + '/"]').prepend(html + ' ');
}

addFA('3397809', '<i class="fa fa-gamepad"></i>');
//]]>
</script>
Offline Profile Goto Top
 
FB92
Member Avatar
Member
[ *  * ]
Great! Thanks.
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic