vForums Support :: Programming & Coding :: Code Requests & Support :: Avatar size limits. - View Topic
| |
| ashkir Full Member
Posts: 1,159 Status: Offline Gender: Male Location: Cali! Age: 35 Joined:
pmskypemsnyahoo | Avatar size limits. (3rd Apr 11 at 5:21am UTC) | | I am using this:
Code: - <script>
- /*Remove Avatar Max Size
- Created By Wrighty*/
-
- for(i=0;i<get('img','tag').length;i++){
- if(get('img','tag')[i].alt == '[Avatar]'){
- get('img','tag')[i].removeAttribute('style');
- }
- }
- </script>
But... I know we'll eventually get a member triyng to use one that is too big. I want a way to just limit it to 120 by 250px please since we cannot set max height/width by vForums yet.
I know there is a {avatar_width} and height, and url in templates. But, it still limits itself to 100x100 | |
| Ross Administrator
Posts: 3,709 Status: Offline Gender: Male Age: 8 1⁄1 Joined:
Additional Groups: Support Team
pmwwwgtalkvForum | Re: Avatar size limits. (3rd Apr 11 at 11:49am UTC) | | Code: - <script type="text/javascript">
- <!--
- /*Remove Avatar Max Size
- Created By Wrighty*/
-
- for(i=0;i<get('img','tag').length;i++){
- if(get('img','tag')[i].alt == '[Avatar]'){
- get('img','tag')[i].removeAttribute('style');
- get('img','tag')[i].style.maxWidth = '120px';
- get('img','tag')[i].style.maxHeight = '250px';
- }
- }
- //-->
- </script>
You can give that a go. Just don't quite remember which versions of Internet Explorer support Max Width/Height properties. | |
|
| ashkir Full Member
Posts: 1,159 Status: Offline Gender: Male Location: Cali! Age: 35 Joined:
pmskypemsnyahoo | Re: Avatar size limits. (3rd Apr 11 at 11:58pm UTC) | | Awesome! Works and it keeps proportions! | |
| |
| |
|