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 ::: Remove size limit for personal pictures/avatars
New Topic    Add Reply
Topic: Remove size limit for personal pictures/avatars  (?)  Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend
chrish18

Registered User
ezSupporter
Posts: 2087
Posted: 7/2/05 8:40 am    
Remove size limit for personal pictures/avatars
If you are the admin of a gold board and you want to allow your users to have avatars larger than the 60x60 limit, then you can use this javascript in box 4

Notes :: This has only been tested on a PC with Firefox, Mozilla and Internet Explorer. It will not work on a Mac but it should not give them an error either. I only tested a few images, but the largest image I used (270x93) displayed to its full size, stretching the board, so be warned users can ruin your layout with overly large avatars!

Box 4
 
<script type="text/javascript">
/* begin remove personal picture limits */
var img = document.getElementsByTagName("img");

for (k = 0; k < img.length; k++)
{
   if (img.item(k).getAttribute("width") == "60" && img.item(k).getAttribute("height") == "60")
   {
      if (img.item(k).parentNode.nodeName.toLowerCase() == "td" && img.item(k).parentNode.innerHTML.indexOf("usertitle") != -1)
      {
         img.item(k).removeAttributeNode(img.item(k).getAttributeNode("width"));
         img.item(k).removeAttributeNode(img.item(k).getAttributeNode("height"));
         if (document.getElementById && document.all)
         {
            img.item(k).clearAttributes();
         }
      }
   }
}
/* end remove personal picture limits */
</script>
Tip :: If you want to display a larger avatar on your profile (avoiding the dreaded red x of Internet Explorer) and you are an ezsupporter you can add the following css to your custom css, changing the value in blue
 
#ppimg {display: none; }

#personalphoto {
   width: width_of_personalphoto;
   height: height_of_personalphoto;
   background-image: url(address_of_personalphoto);
   background-repeat: no-repeat;
   background-position: center center;
}
That is in another faq somewhere, but I thought I'd include it here for completeness :)

Author :: chrish18


  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.