Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Jul 9, 2005 19:31:47 GMT
Global FooterThis code will let you use a different avatar in each category. It was a custom request and thought I'd post it here too <script type="text/javascript"> <!-- /* different avatar in different categories by elindir 101support.proboards43.com */
function av(user, avatar, category){ var td=document.getElementsByTagName('td'); for (e=0;e<td.length;e++) if(td[e].width=="100%" && td[e].vAlign=="top" && td[e].getElementsByTagName("a")[1].href.match(category)){ for (m=0;m<td.length;m++) if (td[m].className.match(/window(bg|bg2)/i) && td[m].width=="20%" && td[m].innerHTML.match("user="+user)){ var img=td[m].getElementsByTagName('img'); for (j=0;j<img.length;j++) if(img[j].alt=="[avatar]"){ img[j].src=avatar; } } } } av("username","New Avatar URL","Category ID") av("username","New Avatar URL","Category ID") av("username","New Avatar URL","Category ID")
//--> </script> Blue: Put the username of the member whose avatar you would like to change. Red: Put the full URL of the new avatar. Orange: This is the one word ID of the Category where this new avatar will be shown. For more members/categories, repeat this line: av(" username"," New Avatar URL"," Category ID")
|
|
|
Post by godswarrior on Nov 8, 2005 4:36:54 GMT
Elindir,
I have a RPG proboards website. And I have several members who have different character's (that is each member has more than 1 character) and I was trying to find a code that would allow the member's to put their character's picture where the avatar is supposed to go.
Is there a code for a drop down box that will allow each member to put their character's pic where the avatar is supposed to go instead of having to add the character's pic inside the post?
|
|
Ross
eCreations Staff
Posts: 1,768
|
Post by Ross on Nov 8, 2005 21:47:09 GMT
Elindir, I have a RPG proboards website. And I have several members who have different character's (that is each member has more than 1 character) and I was trying to find a code that would allow the member's to put their character's picture where the avatar is supposed to go. Is there a code for a drop down box that will allow each member to put their character's pic where the avatar is supposed to go instead of having to add the character's pic inside the post? A different character with each different post? Would each character need to have a different name as well? Start a new thread in Code Requests and I'll see if I can think of a way it can be done or not 101support.proboards43.com/index.cgi?board=coderequest
|
|
|
Post by pbcnx on Jun 20, 2006 9:23:35 GMT
Elindir,
Is this code possible to use Board ID's instead of Category ID's
|
|
ME!
Moderator
~Remanifesting-Eternal.~
Posts: 778
|
Post by ME! on Jun 20, 2006 10:24:58 GMT
GLOBAL FOOTER <script type="text/javascript"> <!-- /* different avatar in different boards by elindir 101support.proboards43.com */
function av(user, avatar, boardID){ var td=document.getElementsByTagName('td'); if(location.href.match('board='+boardID)){ for (m=0;m<td.length;m++) if (td[m].className.match(/window(bg|bg2)/i) && td[m].width=="20%" && td[m].innerHTML.match("user="+user)){ var img=td[m].getElementsByTagName('img'); for (j=0;j<img.length;j++) if(img[j].alt=="[avatar]"){ img[j].src=avatar; } } } } av("username","New Avatar URL","Board ID") av("username","New Avatar URL","Board ID") av("username","New Avatar URL","Board ID")
//--> </script>
|
|
|
Post by pbcnx on Jun 28, 2006 5:25:52 GMT
is it possible also to use the code above in multiple boards with different board ids?
|
|
ME!
Moderator
~Remanifesting-Eternal.~
Posts: 778
|
Post by ME! on Jun 28, 2006 9:04:01 GMT
that was the point of the code to be able to use it for diffenrt boards
|
|