View Full Version : gving banned members banned avatar?
GeorgeofCS
09-23-2002, 09:33 AM
I first tried to find this then I tried to make it unsuccessfully. I know it's simple. I just want to be able to have all banned members have a avatar that says banned. :)
Xenon
09-23-2002, 09:57 AM
run this query:
UPDATE user SET avatarid=x WHERE usergroupid=y
replace x with the avatar id of your banned avatar and y with the banned usergroup id.
and to do that automatically in the future:
open mod/user.php
find this: $DB_site->query("UPDATE user SET usergroupid=$bangroup[usergroupid], customtitle = 0 , usertitle='".addslashes($bangroup['usertitle'])."' WHERE userid=$banuser[userid]");
and change it to:
$DB_site->query("UPDATE user SET usergroupid=$bangroup[usergroupid], avatarid=x, customtitle = 0 , usertitle='".addslashes($bangroup['usertitle'])."' WHERE userid=$banuser[userid]");
replace the x with the avatarid
Dean C
09-23-2002, 05:50 PM
what a fantastic idea ^ :D
- miSt
Tungsten
11-06-2002, 02:28 PM
Suppose you have an avatar called 'banned.jpg' and you place it into your /images folder beneath the forums root.
Now suppose you don't want to make that avatar available in the VBulletin list of pre-configured avatars (thus assigning it an avatar ID# which this code hack uses). The reason being that you want the 'banned.jpg' file to be specific to banned users and not something that everyone can pick from the list of avatars.
That being the case...
How would you modify this code so that the avatar automatically assigned to a banned user would point to the /images/banned.jpg file instead of a certain avatar ID#?
:D
Xenon
11-06-2002, 03:33 PM
just increas the ammount of posts to get this avatar to 32767.
so noone can use this avatar but you can assign it to banned members...
Dean C
11-07-2002, 05:27 PM
What is it with that numbe 32767??
- miSt
Xenon
11-07-2002, 06:14 PM
Well it has to do with the bit-ammount an iteger value is Saved.
As you know, a PC can just use the binary number system to save values.
so int values are saved within two byte which are 16 bit
from 00000000 00000000 up to 11111111 11111111.
so the highest value can be 2^16-1 = 65535
Intergervalues are Signed, so you need on bit as the sign, which results that the highest number is 01111111 1111111
that is 32767
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.