vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Set avatar max width AND height (https://vborg.vbsupport.ru/showthread.php?t=35933)

Gamingforce 03-09-2002 10:00 PM

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

Edgar 03-10-2002 11:34 AM

Nice hack Bobo;)
It's nice to see you're making your own hacks now,great work.

Lesane 03-10-2002 11:38 AM

Great hack 'Gamingforce'. I was busy with something like that aswell, now it spares me some time :up:. Thanks

Gutspiller 03-30-2002 02:01 AM

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:

Neo 04-04-2002 12:02 AM

its called upgrade man ;)

Gutspiller 04-04-2002 01:52 AM

Quote:

Originally posted by neo
its called upgrade man ;)
It's called there is no F***ing way I am reinstalling 50+ hacks just to have the latest version. :P

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:

Bad Bunny 04-20-2002 08:44 AM

I am too dumb to know how to add things in phpmyadmin.
But I do need this, as my avatar size is 400x65

-=dm=- 04-20-2002 10:58 AM

Quote:

Originally posted by Bad Bunny
I am too dumb to know how to add things in phpmyadmin.
But I do need this, as my avatar size is 400x65

damn your avatar size is 400x65?? :D

Thanx Gamingforce

going to ad this one:)

Chris M 04-20-2002 01:23 PM

Nice Hack...

Satan

Bad Bunny 04-20-2002 04:33 PM

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.

Bad Bunny 04-21-2002 05:35 AM

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.

TECK 04-21-2002 06:26 AM

Quote:

Originally posted by Gutspiller
It's called there is no F***ing way I am reinstalling 50+ hacks just to have the latest version. :P
thanks for letting me hack really easy into your board and take over, delete all your accounts, ban you and other admins, delete all members and posts, etc. that's what you make me think when you when you say, is to hard for you to upgrade.

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.

Meta 04-24-2002 03:20 PM

Nice hack. Thank you, Gamingforce!

Smoothie 04-27-2002 09:33 AM

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?

Bad Bunny 05-05-2002 08:03 AM

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. :->

Smoothie 05-05-2002 03:53 PM

Thanks!

parasic 07-10-2002 02:05 AM

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

kikosho 07-14-2002 12:35 PM

is there a script yet that is compatible with vB 2.6??

Gamingforce 07-15-2002 03:02 AM

This works with the latest.

DeadMan384AD 08-26-2002 02:57 AM

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!

isman 09-16-2002 12:46 AM

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?

isman 09-17-2002 12:39 AM

Quote:

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?
Disregard this message. I must be getting old, I turned a simple hack into a three day nightmare.

Take me out back and shoot me.

Great hack by the way.

andyrose 02-16-2003 03:41 AM

This hack is excellent, just what I was looking for. Thanks for putting in the work to code it. :)

kikosho 03-05-2003 07:04 PM

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. :)

Logtenberg 06-19-2003 07:19 PM

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.

S.Shady 06-19-2003 08:58 PM

Quote:

03-05-03 at 05:04 PM kikosho said this in Post #24
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. :)


change the settings in the avata section ion the vB Options page :)

Quote:

Today at 04:19 PM Logtenberg said this in Post #25
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.


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

S.Shady 06-19-2003 09:10 PM

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
Replace with:
Code:

$avatarmaxwidth by $avatarmaxheight
This will display the correct allowed setting next to the upload section :)


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
  • Page Generation 0.01175 seconds
  • Memory Usage 1,792KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete