![]() |
Set avatar max width AND height
http://www.gamingforce.com/forums/im...ff10/yuna1.jpg
On our message board, we use non square avatars with the size of 105x150 pixels as our official format like the example avatar above. I noticed that vBulletin doesn't allow you to set dimensions for both the width and height not letting you to set max dimensions for rectangular based formats. What this hack does is allow you to set both the width and height on uploaded avatars. Enjoy! Tested on vBulletin 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4 File to modify: member.php Template to modify: error_avatarbaddimension 2 rows to insert into setting table in database |
Nice hack Bobo;)
It's nice to see you're making your own hacks now,great work. |
Great hack 'Gamingforce'. I was busy with something like that aswell, now it spares me some time :up:. Thanks
|
I get this error when I run the query in my admin control panel:
Database error in vBulletin Control Panel: Invalid SQL: INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `value`, `description`, `optioncode`, `displayorder`) VALUES ('', '26', 'Avatar Maximum Width', 'avatarmaxwidth', '105', 'Use this to define the maximum height of an avatar.', '', '0'); INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `value`, `description`, `optioncode`, `displayorder`) VALUES ('', '26', 'Avatar Maximum Height', 'avatarmaxheight', '150', 'Use this to define the maximum width of an avatar.', '', '0'); mysql error: You have an error in your SQL syntax near '; INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `va' at line 1 mysql error number: 1064 Date: Friday 29th of March 2002 08:56:19 PM Script: /forumz/admin/query.php Referer: http://www.theforumz.com/forumz/admin/query.php Can somebody please help me with this error and how to get it working? BTW I am running 2.0.3 if that makes a difference. :ermm: |
its called upgrade man ;)
|
Quote:
If somebody here made something that would allow you to push a button and it takes your current version and upgrades it tot he latest version, but KEEPS ALL YOUR HACKS INTACK, then maybe I would.... then again, something like that would be nearly impossible. :ermm: |
I am too dumb to know how to add things in phpmyadmin.
But I do need this, as my avatar size is 400x65 |
Quote:
Thanx Gamingforce going to ad this one:) |
Nice Hack...
Satan |
Yes. Here is my forum, if you click on a thread you will see the why the avatar size is so unique.
http://community.neeto.org Anyway, I know I can do the rest of the hack, except the mysql part. I don;t understand what it means to "Execute the following MySQL queries", and I don't feel like breaking my database. Thanks. |
Thanks for a great hack.
Had to ask some friends how to run the query thing for phpmyadmin, but it was simple. I am just dumb. Thanks. |
Quote:
good luck. i hope you dont have any enemy out there who loves php. it should take him not longer then 15min to destroy your "hacked" board. and btw, with araxis merge you can do this, upgrade ur board in about 30min. without reinstalling all the hacks. |
Nice hack. Thank you, Gamingforce!
|
question, added this hack, works fine. But when you go to edit options, change avatar in your user cp, it still shows the 80x80 pixel dimensions allowed. Not the 80x100 I have set in the admin cp. Shouldn't it say the correct dimensions which are allowed?
|
The maker of the hack left out one thing. Apply the chages that you applied to the error template to User Option Templates>modifyavatar_custom
namely, replace $avatarmaxdimension by $avatarmaxdimension with $avatarmaxheight pixels or $avatarmaxsize Hope this helps. :-> |
Thanks!
|
Great hack, just installed on my forum and works perfectly. But you did leave out the change needed in the modifyavatar_custom template.
It should be something like: FIND: $avatarmaxdimension by $avatarmaxdimension REPLACE WITH: $avatarmaxwidth by $avatarmaxheight |
is there a script yet that is compatible with vB 2.6??
|
This works with the latest.
|
Yup I just installed it on my board, I noticed the thing in the User CP too.
Interesting story installing it tho... I've never gone into phpMyAdmin before, EVER. I've never even touched mySQL(I still managed to pass the database course tho... :D ) So, You know what happens when you enter in the wrong password? Screaming, yelling, dripping sweat, ICQ messages from 5 people saying "What did you do???" etc.... Luckily the ex-owner/admin was still online and fixed it for me... :D Great hack tho! |
I have the strangest problem on this one. After installing the hack I no longer have the option to upload a custom avatar in the user control panel. No matter what I do it won't show up.
However, in the main control panel if I go to edit the user and change the avatar I have the option to upload. Anyone else seen this or know what the problem is? |
Quote:
Take me out back and shoot me. Great hack by the way. |
This hack is excellent, just what I was looking for. Thanks for putting in the work to code it. :)
|
Is it possible to disable the original paramter for maxheight/maxwidth. We are using 160x100 with the new hack...however in order to make it work - I had to set the maxheight/maxwidth variable to 160. As a result, we have people posting up avatars that are larger than we intended.
any mySQL code which can remove that table? hope I am explaining this clearly. :) |
Will this hack also have a minimum with and height?
I'd like all the avatars uploaded by members to be exactly the same width and height. |
Quote:
change the settings in the avata section ion the vB Options page :) Quote:
this hack will make the maximum set number of pixels not minimum. sorry. ------ [high]* S.Shady clicks install. [/high] Seams to work on 2.3.0 :) good job |
Please ignore my ignorance i didnt see this said before https://vborg.vbsupport.ru/showthrea...131#post271131
Also this sould be included in the install. Open modifyavatar_custom template Find: Code:
$avatarmaxdimension by $avatarmaxdimension Code:
$avatarmaxwidth by $avatarmaxheight |
All times are GMT. The time now is 03:05 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|