The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
make a message popup verifying avatar size
When someone uploads an avatar I would like a message to pop up asking them to verify that they have uploaded an avatar that is the correct size. I have members who repeatedly do not upload the correct sized avatars. I have it set that if the wrong avatar is uploaded then it will stretch to fit, but it tends to look distorted.
|
#2
|
|||
|
|||
Maybe something like this: edit the modifyavatar template, find this (near the end)
Code:
<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" /> <input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" /> and replace with this: Code:
<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" onclick="return show_reminder(this.form.avatarid)"/> <script type="text/javascript"> function show_reminder(avataridObj) { if (!($permissions[avatarmaxwidth] || $permissions[avatarmaxheight])) return true; var value = -1; for (var i=0; i<avataridObj.length; i++) { if (avataridObj[i].checked) { value = avataridObj[i].value; break ; } } if (value == 0) { return confirm("Are you sure the image is within the size limits ($permissions[avatarmaxwidth] x $permissions[avatarmaxheight])?"); } return true; } </script> <input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" /> (You could put the js function in the script tag that's already at the top of the template, but this way I only had to describe one replacement). |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|