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:
Add Reply
  • Pages:
  • 1
Group Icons per member
Topic Started: Oct 21 2009, 11:48 PM (3,421 Views)
Holysavior-ZNR
Member Avatar
Member
[ *  *  *  *  * ]
Here is a member Icon code! want to give only acouple members a special icon? here you can!

Code:
 
<script type="text/javascript">
/* Created by HolySavior of ZNR */
mygroup = new Array();
// myusers[X]=["USER ID", "IMAGE URL"];
mygroup[0]=["177895", "URL HERE"];
mygroup[1]=["187000", "URL HERE"];

$(".usertitle").each( function() {

theid = $(this).parent("td.c_user").parent().prev().children(".c_username ").children().attr("href");
userid = theid.split("/");

for(x=0;x<mygroup.length;x++){
if(userid[4] == mygroup[x][0]) {
var ximage = mygroup[x][1];
$(this).append("<img src='"+ximage+"'>");
}
}
});
</script>
Edited by Reid, Jan 30 2010, 02:10 PM.
Offline Profile Quote Post Goto Top
 
GhostMasterz
Member Avatar
Member
[ *  *  * ]
How can we use this any tutorials on how to edit this?
Offline Profile Quote Post Goto Top
 
seekee-ZNR
Member
[ * ]
Yes, a guide on what we need to change and not to change would be helpful. Do we just add in the member number and the image, or do we change anything else? Where does it go in the template? I've tried playing with it, but I'm a novice and have had no luck. This would be an extremely useful code.
Offline Profile Quote Post Goto Top
 
Fiona
Member Avatar
true in mind body spirit
[ *  *  *  *  *  *  *  * ]
Code:
 
// myusers[X]=["USER ID", "IMAGE URL"];
mygroup[0]=["177895", "URL HERE"];
mygroup[1]=["187000", "URL HERE"];


It looks like this is where you edit, guys.
Offline Profile Quote Post Goto Top
 
seekee-ZNR
Member
[ * ]
I've tried adding the member number and the image, I've tried adding the usergroup of the member being edited, I've tried replacing mygroup with the usergroup, I've tried urgh.

I get the idea, but either the code doesn't work, or maybe I'm putting it in the wrong area? I've tried to edit it, but nothing happens. Hence, either I'm doing the wrong thing, or it doesn't work. As I said, this'd be a useful code. I get the idea of what I need to edit, but my ideas aren't working. HolySaviour is extremely active, so why can't he just go 'LOL NOOBS this is the bit to edit.' I already said I'm not an expert with codes, but I can follow directions. >:
Offline Profile Quote Post Goto Top
 
Reid
Member Avatar
È una trappola!

Try changing
Code:
 
userid[4]
to
Code:
 
userid[5]
and see how that works. If that doesn't work, post your setup and a link to the board. :)
Offline Profile Quote Post Goto Top
 
seekee-ZNR
Member
[ * ]
With userid[4] changed to 5:

Code:
 
<script type="text/javascript">
/* Created by HolySavior of ZNR */
mygroup = new Array();
// myusers[X]=["USER ID", "IMAGE URL"];
mygroup[0]=["20641", "http://img.photobucket.com/albums/v618/Sheemaraa/Tiritheas/stone%20pips/military.gif"];

$(".usertitle").each( function() {;

theid = $(this).parent("td.c_user").parent().prev().children(".c_username ").children().attr("href");
userid = theid.split("/");

for(x=0;x<mygroup.length;x++){
if(userid[5] == mygroup[x][0]) {
var ximage = mygroup[x][1];
$(this).append("<img src='"+ximage+"'>");
}
}
});
</script>


Is Above the Board.

It doesn't work, but thank you for the offer of help. I have tried to change my own account [Tiritheas], by adding a red pip before the name. The black bird pip is a part of the group I am in, not this code.

http://s1.zetaboards.com/Tiritheas/
Offline Profile Quote Post Goto Top
 
seekee-ZNR
Member
[ * ]
Can I bump for support? :r
Offline Profile Quote Post Goto Top
 
Reid
Member Avatar
È una trappola!

I updated and fixed the code in the first post. Past that, what you want, seekee, is not the same thing as what this code does.

What you want done is something similar to the following:
Code:
 
<script type='text/javascript'>
var u_pips = [
[ '12331', 'image url'],
[ '123413', 'another image url' ]
];
$('a.member').each(function () {
var l = u_pips.length, num = this.href.split('profile/')[1].split('/')[0];
while (l--) {
if (u_pips[l][0] === num) {
$(this).prepend("<img src='" + u_pips[l][1] + "' alt='' /> ");
break;
}
}
});
</script>
Offline Profile Quote Post Goto Top
 
Kaadu554
Member Avatar
Runescapaholic
[ *  * ]
coud somone tell me how to use this code?
Offline Profile Quote Post Goto Top
 
buzzsaw100
Member
[ * ]
Yeah, can we get some more detailed instructions and an example of it
Offline Profile Quote Post Goto Top
 
seekee-ZNR
Member
[ * ]
I don't know what I misinterpreted, and I know this is fairly old support, but thank you, Reid; it works perfectly now.
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
I'm sorry for another huge bump, but I had to. I tried both Holysavior's and Reid's codes to no avail.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Your board URL and the code you tried to use would be helpful.
Online Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
My mistake.

http://s10.zetaboards.com/Vocamania_Project/index/

I put both codes just for the heck of it. Tried them on every field of board template. Still nothing.

Code:
 
<script type='text/javascript'>
var u_pips = [
[ '163057', http://z6.ifrm.com/8161/171/0/e5017145/brs.gif'],
];
$('a.member').each(function () {
var l = u_pips.length, num = this.href.split('profile/')[1].split('/')[0];
while (l--) {
if (u_pips[l][0] === num) {
$(this).prepend("<img src='" + u_pips[l][1] + "' alt='' /> ");
break;
}
}
});
</script>

<script type="text/javascript">
/* Created by HolySavior of ZNR */
mygroup = new Array();
// myusers[X]=["USER ID", "IMAGE URL"];
mygroup[0]=["'163057", " http://z6.ifrm.com/8161/171/0/e5017145/brs.gif"];

$(".usertitle").each( function() {

theid = $(this).parent("td.c_user").parent().prev().children(".c_username ").children().attr("href");
userid = theid.split("/");

for(x=0;x<mygroup.length;x++){
if(userid[4] == mygroup[x][0]) {
var ximage = mygroup[x][1];
$(this).append("<img src='"+ximage+"'>");
}
}
});
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1