NIXIE
New Member
Posts: 39
inherit
182468
0
Jan 3, 2015 17:04:54 GMT -8
NIXIE
39
August 2012
nixiepoo
|
Post by NIXIE on Apr 4, 2013 6:18:22 GMT -8
Forum URL: oasis.boards.net
Hi! So, I'd really like to disable avatars like the 300x300px Tiny Fey avatar in the image below from stretching my board, by limiting the space available for an avatar in the sidebar to 100x100px.
I'm using the "Avatar Anywhere" by SubDevo code:
<script type="text/javascript"> /* Avatar Anywhere by SubDevo */ /* Global Footer - Please leave this header intact. Do not repost. */ /* [url]http://interoceandesigns.com[/url] or [url]http://lsdp.proboards.com[/url] */
var defAv="http://i1062./t483/nixiepoo/oasisrpg/Defaultv2.png"; // Default Avatar URL
var k=location.href,n=document.images,x=-1,isG=(pb_username=="Guest")?1:0; if(/action=viewprofile$/.test(k)||(/profile&user=(.+?)$/.test(k)&& RegExp.$1==pb_username)){ while(n[++x]){ if(n[x].alt=="[avatar]"){ document.cookie=pb_username+"_avatar="+n[x].src+"@; expires=Sat, 17 Jan 2050 12:12:12 UTC; path=/"; break; }}} n=document.getElementById("my_avatar"); k=(new RegExp(pb_username+"_avatar=(.+?)@","i").test(document.cookie)&& !isG)?RegExp.$1:defAv; if(n&&k.indexOf("http:")==0){ k="<img border='0' src='"+k+"'/>"; n.innerHTML=(isG)?k:"<a href='index.cgi?action=viewprofile'>"+k+"</a>"; } </script>
The code thing to use to get the avatar to show up is:
<span id="my_avatar"></span>
Only thing I've tried is changing it to:
<span id="my_avatar" width="100px" height="100px"></span>
...But that didn't work! I'm just not familiar enough with coding (especially span) to get it to work.
Additionally, considering the avatar is a moving GIF image... If there's any way to prevent the image from moving when it's there in the sidebar, that'd be seriously amazing!
Thanks in advance for your help.
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Apr 4, 2013 16:22:47 GMT -8
|
|
NIXIE
New Member
Posts: 39
inherit
182468
0
Jan 3, 2015 17:04:54 GMT -8
NIXIE
39
August 2012
nixiepoo
|
Post by NIXIE on Apr 5, 2013 7:18:26 GMT -8
Unfortunately that's just ensured that the avatar is its full 300x300px size everywhere (it was 100x100px on profile view before), despite me setting the code to format 100x100px. ):
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Apr 5, 2013 20:18:34 GMT -8
O.K. Nevermind that code then. Try this: Add this to one of your style sheets you have in your header: #my_avatar img{width: 100px; height: 100px; }
And then the span part just remove the size stuff:
<span id="my_avatar"></span>
Tested on Chrome and IE so it should work with other browsers.
|
|