If you are seeing this message, it is possible the page did not load properly. Please hit reload/refresh on your browser.
If you still see this message, you probably do not have a browser that supports web standards, although its content is accessible to any browser or Internet device.

Cool Tips & Tricks Cool Tips & Tricks

Help Communities:
Help Forums Bug Base
<< Prev Topic | Next Topic >>
Cool Tips & Tricks ::: Javascript FAQ ::: Image before usernames in whosonline
New Topic    Add Reply
Topic: Image before usernames in whosonline  (?)  Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend
Nutrocker

ezboard Moderator
ezSupporter
Posts: 15875
Posted: 6/15/05 3:43 pm    
Image before usernames in whosonline
Goes in box 4
  
<script language="Javascript" type="text/javascript">
for(k=0;k<document.links.length;k++) {
if(document.links[k].parentNode.parentNode.parentNode.parentNode.className=="whosonline") {
if(document.links[k].href=="http://p079.ezboard.com/unutrocker.showPublicProfile") {
document.links[k].innerHTML="<img src='computer.gif' width='11' height='11' alt='Nutrocker' border=0> Moderator: Nutrocker"}
if(document.links[k].href=="http://p079.ezboard.com/uatlass.showPublicProfile") {
document.links[k].innerHTML="<img src='star.gif' width='12' height='12' alt='atlas' border=0> Moderator: @tlas"
} } } </script>


The above script gives you the ability as an admin to add a picture infront of a users name in the whosonline section of your ezboard. This could be used as an additional ranking system for users, or to indicate which members are admins and which are mods by using for example different coloured stars.

Additional code needs to be added for each user that you want to add a picture to. For example there are two seperate if statements used in the code above, one for Nutrocker one for Atlas.

The code below needs to be added for each user and shows in bold which parts you need to change:
  
if(document.links[k].href=="http://pXXX.ezboard.com/uUSERNAME.showPublicProfile") {
document.links[k].innerHTML="<img src='http://www.your_website.com/your_image_name.gif' 
width='AA' height='BB' alt='image description' border=0> Text"}


XXX = pub number of your board
USERNAME = username of person you want to change
http://www.your_website.com/your_image_name.gif = location of your hosted image
AA = image width
BB = image height
image description = self explanatory
Text = text to replace users name (could be the same as USERNAME)

Image before all usernames in whosonline

by chrish18

The code goes in your custom footer :)
  
<script type="text/javascript">
var dl = document.links;
for (k = 0; k < dl.length; k++) {
  if (dl[k].parentNode.parentNode.parentNode.parentNode.className=="whosonline") {
    dl[k].innerHTML = "<img src='http://www.server.com/image.gif' width='xx' height='yy' alt='' border='0'>" + dl[k].innerHTML;
  }
}
</script>


Author :: sharkey0903

Edited by: Nutrocker at: 11/15/05 4:27 pm

  reply to this message

Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend

New Topic    Add Reply

jump to:
Topic Control Image::: Topic Commands
<< Prev Topic | Next Topic >>

Icon Legend

reply button:::Reply to Post Button   edit button:::Edit Post Button  delete button:::Delete Post Button (Moderator Only)

subscribe/unsubscribe to thread button:::Subscribe to Thread Button   email to friend button:::Email to Friend Button  



- Cool Tips & Tricks - Javascript FAQ -

Communitiesezboard Help Communities:

Help Forums Help Forums Bug Base Bug Base





Powered By ezboard® Ver. 7.32
Copyright ©1999-2007 ezboard, Inc.