vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   gving banned members banned avatar? (https://vborg.vbsupport.ru/showthread.php?t=43846)

GeorgeofCS 09-23-2002 09:33 AM

gving banned members banned avatar?
 
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:
[sql]UPDATE user SET avatarid=x WHERE usergroupid=y[/sql]

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

    $DB_site->query("UPDATE user SET usergroupid=$bangroup[usergroupid], customtitle = 0 , usertitle='".addslashes($bangroup['usertitle'])."' WHERE userid=$banuser[userid]"); 

and change it to:
PHP Code:

    $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


All times are GMT. The time now is 05:52 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.01074 seconds
  • Memory Usage 1,722KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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