Log in

View Full Version : Profile modification (avatar/userpic) issue


hymoo
05-27-2009, 08:37 PM
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

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.