Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by NecroSocial (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-18-2001 Last Update: Never Installs: 0
 
No support by the author.

My forum uses avatars sized 60px wide by 100px tall and allows users to upload their own custom avatars. However I can't seem to find a way to set the board so that it allows/forces the users to upload 60x100 avatars of their own. I can set it at 60x60 and 100x100 but there appears to be no way to set up the board to accept asymetricaly-sized avatars. This is a big issue on my forum since there are many graphic artists who frequent the boards and who would like to customize their avatars. Any help you guys can offer?

-Necro

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-18-2001, 07:29 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're right, there's no way to do this with the standard vB. You'll need a hack - probably just a simple change to avatar.php. I'll move this to the Hacks request forum.
Reply With Quote
  #3  
Old 10-18-2001, 07:34 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm, nice idea.
Reply With Quote
  #4  
Old 10-18-2001, 07:36 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually come to think of it, this would require a change to admin/index.php as well.
Reply With Quote
  #5  
Old 10-18-2001, 07:39 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not really, just to member.php.
(and run two queries)
Reply With Quote
  #6  
Old 10-18-2001, 07:44 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But don't you have the change the 'Change options' setting in the Admin CP so you can set both height and width?
Reply With Quote
  #7  
Old 10-18-2001, 07:49 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh no my friend, that is done automatically.

(hack comes in a couple of minutes)
Reply With Quote
  #8  
Old 10-18-2001, 07:52 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, first of all in member.php replace this:
Code:
          if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
with this:
Code:
          if ($imginfo[0]>$avatarmaxwidth or $imginfo[1]>$avatarmaxheight) {
Now run these queries:
Code:
INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorder) VALUES (NULL,26,'Maximum width','avatarmaxwidth',64,'Maximum width (in pixels) that the custom avatar image can be','',9);
INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorder) VALUES (NULL,26,'Maximum Height','avatarmaxheight',64,'Maximum height (in pixels) that the custom avatar image can be','',10);
DELETE FROM setting WHERE varname='avatarmaxdimension';
(make sure you only run once!)

And that's it!
Reply With Quote
  #9  
Old 10-18-2001, 08:52 PM
NecroSocial
Guest
 
Posts: n/a
Default

Thanks for the info guys!
I'll give this code a run through and see what happens. Hopefully I'll never have to see a square avatar on my forum again.

-Necro
Reply With Quote
  #10  
Old 10-22-2001, 03:22 PM
NecroSocial
Guest
 
Posts: n/a
Default

Okay so the hack works just fine however I now have a problem with the member.php page where it doesn't show the avatar sizes that I've implemented.

An example would be that, instead of showing:

Note: the maximum size of your custom image is 60 by 100 pixels or 10024 bytes (whichever is smaller).

it'll show:

Note: the maximum size of your custom image is by pixels or 10024 bytes (whichever is smaller).

How do I fix this?

-Necro
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:50 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.04224 seconds
  • Memory Usage 2,283KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (7)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete