View Full Version : Allow ONLY mods and admins to use custom avatars
Admin
08-08-2001, 10:00 PM
My mods have been bugging me for ever that they want custom avatars, just like they have custom user titles.
This hack is really simple, won't take you more than 5 minutes. :)
1. In member.php find
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
$avatarchecked[$bbuserinfo[avatarid]]="checked";
and add this right after:
if (ismoderator()) {
$avatarcustomposts = 0;
}
2. In the same file replace this:
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
$useavatar=iif($avatarid==-1,0,1);
and add this right after:
if (ismoderator()) {
$avatarcustomposts = 0;
}
And that's it! :D
Have fun. :)
Dakota
08-09-2001, 05:34 PM
Thanks this is a nice hack. Something I have been wanting and should be included with vB.
spazeman
03-05-2002, 05:16 AM
so how does it work? I installed it and all users seem to still have avatars??
M.Smith
03-05-2002, 01:11 PM
its made so it still works for people that have the right amount of post counts
Firefly -
Okay, I've made the changes. Now what? Do I have to turn on "upload/www avatars" in the CP? I can't seem to get it to work just so that only mods/admin/heads have av uploading, but NOT the members. :s
Admin
03-21-2002, 05:47 AM
Yes turn that on, but make the required post number realllllllllllllllllllly high.
Originally posted by FireFly
Yes turn that on, but make the required post number realllllllllllllllllllly high.
When I tried all that, I got it to show up okay for mods/admin/heads and not for members. So the first step is good. BUT! When I tried to upload an avatar using the upload or link box, it didn't take. It simply changed my av to the first avatar in the gallery list. This was tested by myself (admin) and a moderator, with the same results.
I'll mess with it some more today, since I gave in in frustrations last night. *lol* But do you have any ideas why it won't save?
{edited to say} - When I click upload from my pc, I get a "no valid avatar" error.
Admin
03-21-2002, 12:58 PM
Ok I updated the file for 2.2.4, because the hack is VERY old and only works on 2.0.3. So uninstall and install it again.
Originally posted by FireFly
Ok I updated the file for 2.2.4, because the hack is VERY old and only works on 2.0.3. So uninstall and install it again.
:) Thanks for updating it, Chen. But I still get the same errors. For myself, I get an approval for changing my avatar, but it doesn't change if I do upload from pc. If I use a link, it defaults to the first av in the gallery.
My mods get the error "no specified avatar" when using the upload option, and the frist av default when changing the other way.
Admin
03-21-2002, 01:20 PM
Damnit so many things have changed. :p
I'll look again... *sigh*
Originally posted by FireFly
Damnit so many things have changed. :p
I'll look again... *sigh*
:: giggles :: You are the bestest! ;)
Admin
03-21-2002, 01:25 PM
Ok I totally changed the hack, uninstall it and install the new one. :)
I am gonna try installing again now too!
God you are a pain Rose ;)
:p Shut up, Matt. Who invited you here. ;) :D
It works!!!!!
*big huggles for Chen* Thanks, mate! :D
Yup, it does work! Thank You!!! :D :D
And I thought Roses were sweet...and red ;)
Originally posted by Matt
Yup, it does work! Thank You!!! :D :D
And I thought Roses were sweet...and red ;)
Thanks again, Chen!!! This is something we've been waiting for for a year now! *looks to Matt* ;)
And yes, it should be red. *sigh* *goes to change av, now* ;) But I won't spam, so....
Thanks again!
;) This would be a great feature in v3. *hint*
ptbyjason
03-21-2002, 05:40 PM
Is there anyway to allow 1 other custom usergroup besides mods and admins to be able to do this?
Admin
03-21-2002, 05:50 PM
Yes, instead of adding the code I give in my first post, add this:
if (ismoderator() or $bbuserinfo['usergroupid']==X) {
$avatarcustomposts = 0;
}
(change X to the ID of that other group)
ptbyjason
03-21-2002, 07:03 PM
ahhhh, I knew it had to be something simple like that, thanks Chen!
Edited to say: The admins are happy as is. :D Yay!
WitchyT
07-28-2002, 02:15 AM
Great hack :D. One question: Is there any way of letting the mods and admins only change their avs once per week?
Originally posted by WitchyT
Great hack :D. One question: Is there any way of letting the mods and admins only change their avs once per week?
That would be useful, I think. But if members are allowed to change their avatars anytime, why not mods/admin as well?
LordZypher
10-26-2002, 03:07 AM
Curious... Where do I get the Usergroup ID? From the SQL Tables or the admin panel somewhere...
LordZypher
10-26-2002, 03:47 AM
Ok I figured out how to get the id but its not working for me.. Can someone please help me to understand this..
in step 2 you said
2. In the same file replace this:
code:
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
$useavatar=iif($avatarid==-1,0,1);
and add this right after:
code:
if (ismoderator()) {
$avatarcustomposts = 0;
}
Replace it with what?
I am trying this with VB2.2.8 but after I put it on the member.php will not work.. its only blank.. What am I doing wrong?
I am useing this
if $bbuserinfo['usergroupid']==9 {
$avatarcustomposts = 0;
}
I took the moderator thing out as I make the mods avatar when they need them and upload them.. but I want to allow my contributing members to use custom avatar..
Please respond
This hack does not work with vB 2.2.8, after extensive testing, I have found...
I am shortly going to release a working "Mods and Admins can always use Custom Avatars" hack, I just coded it up myself :)
LordZypher
11-01-2002, 12:27 AM
ok kool.. I had tried everyway I could but I am not good with php anyway but as far as the hack goes.. I am needing it to only allow my contributing members to change there avatar.. The user group is 9... That would be great :) Thanks...
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=45246" target="_blank">https://vborg.vbsupport.ru/showt...threadid=45246</a>
There is my hack, if you want the code changed, just request it in the thread [so other users will be able to see and it might be useful to them too]
NTLDR
11-01-2002, 01:26 PM
Originally posted by N9ne
This hack does not work with vB 2.2.8, after extensive testing, I have found...
This hack works fine with vB 2.2.8.
LordZypher
11-01-2002, 04:23 PM
Didn't for me.. Hoping on a good outcome with N9ne's version..
X-Fan
03-24-2003, 01:35 AM
Working fine with a hacked 2.3.0 board.
Sacrifice
07-29-2003, 09:14 AM
Page Not Found
The requested URL was not found on the server.
Anyone can help me please?
Elemental
08-09-2004, 03:55 AM
does not work! members are allowed to do it
WitchyT
10-07-2004, 07:07 PM
does not work! members are allowed to do it
Did you go to your avatar options and replace 0 in Minimum custom posts with a higher number such as 1000000?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.