vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Profile modification (avatar/userpic) issue (https://vborg.vbsupport.ru/showthread.php?t=214692)

hymoo 05-27-2009 08:37 PM

Profile modification (avatar/userpic) issue
 
Hey everyone, bit hard to explain in one line (topic title).

We figured, it would be twice as easy to combine the Avatar upload and the profile picture upload under 1 single page (Avatar and Profile picture upload ;))

We managed to do this quite simply, and I could add 90% of the code to the avatarupload hook. But I still had to manually edit 2 lines on profile.php, namely. an if-statement.

The inbuild upload system was never build for the following case:
"What if I do not change my avatar at all". so I had to add something like the following

Code:

if (!empty($vbulletin->GPC['upload']['tmp_name']) OR $vbulletin->GPC['avatarurl'] != 'http://www.') {
 //insert normal code here
}

What's the best way to come around this problem. cause this would mean that at every vbulletin upgrade we do we have to manually add 2 lines in a 5000+lines file.

I guess it could be done with 2 custom plugins, but 2 plugins for 2 lines. I'm sure some of you guys had this problem before. How did/do you solve it?

Thanks in forward.


All times are GMT. The time now is 09:07 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.00880 seconds
  • Memory Usage 1,706KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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