The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#152
|
||||
|
||||
I have a problem. I am at the point of making the changes to my function.php file, but I don't have the code you specified to search for, but I do have this code:
Code:
function getavatarurl($userid) { global $DB_site,$session; if ($avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline FROM user LEFT JOIN avatar ON avatar.avatarid=user.avatarid LEFT JOIN customavatar ON customavatar.userid=user.userid WHERE user.userid='$userid'")) { if ($avatarinfo[avatarpath]!="") { return $avatarinfo[avatarpath]; } else if ($avatarinfo['hascustom']) { return "avatar.php?userid=$userid&dateline=$avatarinfo[dateline]"; } else { return ''; } } } I would really like to install this hack, but since I have no idea what I am doing I need help. What part of the code do I replace, and what part of the code do I need to leave? Any help will be greatly appreicated. Thanks! |
#153
|
|||
|
|||
Hi,
i can't find the following code in the member.php : Code:
$filenum=@fopen($filename,"r"); $filestuff=@fread($filenum,$filesize); @fclose($filenum); @unlink($filename); if ($avexists=$DB_site->query_first("SELECT userid FROM customavatar WHERE userid=$bbuserinfo[userid]")) { $DB_site->query("UPDATE customavatar SET avatardata='".addslashes($filestuff)."' WHERE userid=$bbuserinfo[userid]"); } else { $DB_site->query("INSERT INTO customavatar (userid,avatardata) VALUES ($bbuserinfo[userid],'".addslashes($filestuff)."')"); } } } else { $avatarid=verifyid("avatar",$avatarid); $avatarinfo=$DB_site->query_first("SELECT minimumposts FROM avatar WHERE avatarid=$avatarid"); if ($avatarinfo[minimumposts]>$bbuserinfo[posts]) { eval("standarderror(\"".gettemplate("error_avatarmoreposts")."\");"); // not enough posts error exit; } $DB_site->query("DELETE FROM customavatar WHERE userid=$bbuserinfo[userid]"); } } else { $avatarid=0; $DB_site->query("DELETE FROM customavatar WHERE userid=$bbuserinfo[userid]"); } |
#154
|
|||||
|
|||||
MaSTaKiLLaH, I had the same problem in 2.2.1
What I did (and seems to be working so far lol) is first off, look for $filenum=@fopen($filename,"rb"); But what I did on this file and admin/user.php, is just compare the find & replace codes in the directions, and see what had changed. Then I only made those changes (so if there were other differences that were supposed to be there, I didn't mess them up.) There are three changes to each file: For member.php, (1) you just need to add this at the top, before $filenum=@fopen($filename,"rb"): Quote:
"exit; }" and after (3): "$avatarid=0;" add: Quote:
For admin/user.php, (1) you just need to add this at the top, before $filenum=@fopen($filename,"rb"): Quote:
"//exit; //}" and after (3): "$avatarid=0;" add: Quote:
She has: Quote:
I hope this is helpful - sorry if it's confusing |
#155
|
|||
|
|||
Can someone please provide a link or post a reply here with a COMPLETE and CORRECT guide to the appropriate code replacements for this hack to support 2.2.1? I browsed through the pages of this thread and found all sorts of different posts referencing independent code replacements for individual files, many of which are STILL not correct.
Since this hack has the "v2.2.1" in the thread title, I think an updated installation guide would be appropriate. This is incredibly confusing and per the instructions and "reinstructions" provided I have yet to find all the correct code to replace. |
#156
|
||||
|
||||
bira's instructions work fine, actually
just look for "rb" instead of "r" and take out that extra {if you get a parse error |
#157
|
|||
|
|||
Quote:
|
#158
|
||||
|
||||
I just wanted to say that this is a great hack. I have very limited space in my MySQL database, and for the longest time I had to take avatar submissions and manually ad them to the list with a name so they'd be reserved under the 'honor system'. Now, I can just let people pick their own avatars, and still get a chance to moderate them. Thanks.
|
#159
|
|||
|
|||
Quote:
Even, lookin' at Bira's homepage, I found the 2.0 hack only.... I agree the [2.2.1] prefix on the post means the hack itself is upgraded to work on that version.... THE HACK, not a dozen of answers from everybody to the original author.. Thank you |
#160
|
|||
|
|||
Ok..I'll plead a little bit!
Bira, PLEASE put the correct changes into a new zip for download for all the 2.2.1 users. I know I could eventually figure it out but want to minimize the downtime risk and do it right the first time as we have 100-300 simulataneous users and they get unruly when your down for long! Out of curiousity...is there a way to set this up so the avatars can be uploaded and served off of a dedicated image server instead of the server vbulletin is running on? I am looking to run webserver on dedicated server 1, database on server 2 and images on server 3. THANKS! |
#161
|
|||
|
|||
^ bump
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|