Version: , by (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 06-06-2000
Last Update: Never
Installs: 0
No support by the author.
Hi all
OK, at long last, I think this is ready for everyone else to poke at
To make things easier, I've put the instructions up on my site, using a program someone gave me a long time ago that's designed specifically for posting hacks with. At one point I thought about doing a PHP version of it, I guess I have motivation now
This release is still not completely clean. There are a few things not yet coded that I want to get in before it makes it to 1.0. the to-do list is:
Allow Private Avatars
Allow usergroup-wide Avatars (like the custom usertitles)
Clean up the template work for when Avatar images isn't running. Right now, if $avatarshow is off, the templates will display the start of the selector, just with no images. This is mostly because the way the table row formatting gets tweaked adding in the selector, it's easier to just put the blank there.
As always, use at your own risk. It's recommended you back up your vB PHP files before implementing this hack. The database modifications won't affect anything if you back the hack out.
I think you missed one step in the mod for showthread.php
Change
Code:
$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid");
To this ... (add the avimage into the select statement)
Code:
$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts,avimage FROM user WHERE userid=$userid");
Before you add this piece...
Code:
/* Avatar Hack by Moonwolf */
if ($userinfo[avimage] and $showavatars==1 and is_file($userinfo[avimage])) {
clearstatcache();
One of the things I'm looking at for 1.0 is a toggleable user upload of private images. That will have a byte size restriction on it. As for display dimensions, those can be controlled by $aheight and $awidth through the control panel.
Kath
Quote:
Originally posted by Martin Nice hack
I like this idea. I just wish it could upload with restrictions to size and weight, but I think that would require an extra table and profile field.
I think it could be done without that, though, if the icons were referenced from an upload directory and forced to be named username.gif
I've changed the templates a little bit, and the avatardb.php file that inserts the first image also. Now the selector will default to ----- None ----- if there's no image set. Makes it a little cleaner. In each of the three templates that have the selector, delete the <option>'s that are in the template, and let the PHP do all the work filling them out.
Kath
Quote:
Originally posted by shri I think you missed one step in the mod for showthread.php
I'm not sure, but there seems to be something wrong with the dHTML in the selector. In Netscape, it refuses to display any form elements after the selector, and refuses to display the images.
-Why- this is happening I have no idea, but I'm working on it. It doesn't affect MSIE at all.