vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Allow ONLY mods and admins to use custom avatars (https://vborg.vbsupport.ru/showthread.php?t=24975)

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
Code:

  if ($bbuserinfo[userid]==0) {
    show_nopermission();
  }

  $avatarchecked[$bbuserinfo[avatarid]]="checked";

and add this right after:
Code:

if (ismoderator()) {
  $avatarcustomposts = 0;
}

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;
}

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

Rose 03-20-2002 11:45 PM

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.

Rose 03-21-2002 12:49 PM

Quote:

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.

Rose 03-21-2002 01:14 PM

Quote:

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*

Rose 03-21-2002 01:23 PM

Quote:

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. :)

Matt 03-21-2002 01:40 PM

I am gonna try installing again now too!

God you are a pain Rose ;)

Rose 03-21-2002 01:51 PM

:p Shut up, Matt. Who invited you here. ;) :D


It works!!!!!



*big huggles for Chen* Thanks, mate! :D

Matt 03-21-2002 01:53 PM

Yup, it does work! Thank You!!! :D :D

And I thought Roses were sweet...and red ;)

Rose 03-21-2002 02:14 PM

Quote:

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:
Code:

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!

Rose 03-22-2002 01:46 AM

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?

Rose 08-03-2002 04:05 PM

Quote:

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?

N9ne 10-24-2002 06:30 PM

Thanks for this hack!

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

Quote:

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
Code:

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

N9ne 10-31-2002 12:26 AM

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...

N9ne 11-01-2002 12:38 AM

<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

Quote:

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.

N9ne 11-01-2002 01:32 PM

Didn't for me :confused:

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

Quote:

Originally Posted by Elemental
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?


All times are GMT. The time now is 01:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01288 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete