PDA

View Full Version : Allow avatars after a certain amount of posts AND days


Swan
10 Jan 2002, 12:18
I made this little one to prevent the users from spamming tens or hundreds of messages to get a custom avatar. You can set from the cp the amount of days a user must be registered from to allow the use of custom avatars.
I made this one in 20 secs today so don't blame me if it doesn't work for you... it's here to test it! :)

I'm running VB 2.2.1 and it has run fine for a couple of days...

HACK FOLLOWS
=======================================

first you have to add a line to one of the db tables...use mysqladmin or whatever to do that:

insert into setting values(0,26,'Minimum Days','avatardays','180','Number of days a user must be registered before they can use custom avatars.','',2);

then open member.php and set these lines in the 2 lines numbered as shown:

->around line 902:
if (($avatarallowupload or $avatarallowwebsite) and ($bbuserinfo[posts] >= $avatarcustomposts) and ($bbuserinfo[joindate] <= (time()-($avatardays*86400))) )

->around line 954:
if ($bbuserinfo['posts']<$avatarcustomposts || ($bbuserinfo[joindate] > (time()-($avatardays*86400)))) {

========================================

This could be enhanced with the possibility to choose to allow avatars based on days OR posts etc... i'll do it as soon as i have time!

Hope u like it, and sorry if something similar existed! :)