vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Re-Define Avatar Size Limits - View Topic
Topic Rating: *****
Printable View
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
[F] Re-Define Avatar Size Limits (27th Feb 08 at 12:56pm UTC)
I was wondering if it is possible to get an code so i can set the avatar size more than 100x100px please.

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Re-Define Avatar Size Limits (27th Feb 08 at 10:52pm UTC)
Do you want to impose a new limit? Or just default it to the current avatar size?

Try this:

Code:
 
  1. <script>
  2. /*Remove Avatar Max Size
  3. Created By Wrighty*/
  4.  
  5. for(i=0;i<get('img','tag').length;i++){
  6.     if(get('img','tag')[i].alt == '[Avatar]'){
  7.         get('img','tag')[i].removeAttribute('style');
  8.     }
  9. }
  10. </script>
 
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Re-Define Avatar Size Limits (27th Feb 08 at 11:30pm UTC)
I want to impose a new limit please.

Say i wanted to have an avatar 140x140 , i would like to have all avatars at that size . {Smile}

Ok wait this code will allow me to change my avatar size ??

And it goes in Global Footer?

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Re-Define Avatar Size Limits (27th Feb 08 at 11:37pm UTC)
ooo ok...

try this:

Code:
 
  1. <script>
  2. /*New Max Av Size
  3. Created By Wrighty*/
  4.  
  5. for(i=0;i<get('img','tag').length;i++){
  6.     if(get('img','tag')[i].alt == '[Avatar]'){
  7.         get('img','tag')[i].removeAttribute('style');
  8.         get('img','tag')[i].height = (get('img','tag')[i].height > 140)? '140' : get('img','tag')[i].height;
  9.         get('img','tag')[i].width = (get('img','tag')[i].width > 140)? '140' : get('img','tag')[i].width;
  10.     }
  11. }
  12. </script>
 





Global FooteR! {Smile}
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Re-Define Avatar Size Limits (27th Feb 08 at 11:42pm UTC)
Its in my Global Footer and i'm sorry Wrighty but it doesn't work bro.
http://tropolis.virtualforums.co.uk/

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Re-Define Avatar Size Limits (27th Feb 08 at 11:46pm UTC)
I have tested it on my forum and it works.

Code:
 
  1. <script>
  2. /*Remove Avatar Max Size
  3. Created By Wrighty*/
  4.  
  5. for(i=0;i<get('img','tag').length;i++){
  6.     if(get('img','tag')[i].alt == '[Avatar]'){
  7.         get('img','tag')[i].removeAttribute('style');
  8.         get('img','tag')[i].height = (get('img','tag')[i].height > 140)? '140' : get('img','tag')[i].height;
  9.         get('img','tag')[i].width = (get('img','tag')[i].width > 140)? '140' : get('img','tag')[i].width;
  10.     }
  11. }
  12.  
  13. </script>
 



That?
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Re-Define Avatar Size Limits (27th Feb 08 at 11:57pm UTC)
It doesn't seems to change anything Wrighty , i even tried the first code you gave and that wouldn't work {Cry} .

I'm i putting it in the right place?

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Re-Define Avatar Size Limits (27th Feb 08 at 11:58pm UTC)
Hold on, I might have mis understood you. Do you want the av to be 140 x 140 irrespective of anything? Try this:

Code:
 
  1. <script>
  2. /*Remove Avatar Max Size
  3. Created By Wrighty*/
  4.  
  5. for(i=0;i<get('img','tag').length;i++){
  6.     if(get('img','tag')[i].alt == '[Avatar]'){
  7.         get('img','tag')[i].removeAttribute('style');
  8.         get('img','tag')[i].height = '140';
  9.         get('img','tag')[i].width = '140';
  10.     }
  11. }
  12.  
  13. </script>
 
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Re-Define Avatar Size Limits (28th Feb 08 at 12:01am UTC)
That's it Wrighty its perfect my friend thank you {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Re-Define Avatar Size Limits (28th Feb 08 at 12:03am UTC)
{Grin}
 Printable View

All times are GMT+0 :: The current time is 10:41am
Page generated in 0.3513 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums