View Full Version : Images in Signatures - reward more than a given
BlackxRam
06-01-2005, 11:20 AM
I am trying to find a way to limit the use of BBCODE in certain usergroups, in signatures for example.
I would like to restrict certain usergroups from posting images in signatures and allow other people TO do it. Some people like to put HUGE images in signatures or some usergroups I just don't want using them.
Is there a easy way to get this done? I tried searching the forums, but didnt find a way.
Andreas
06-01-2005, 11:30 AM
In profile.php find
if ($vboptions['maximages'] != 0)
ABOVE that ADD
if (!is_member_of($bbuserinfo, 20) AND fetch_character_count($signature, '[img') > 0)
{
$preview = 'true';
$errors[] = 'Sorry, but you are not allowed to use images in your signature';
}
FIND
if ($_REQUEST['do'] == 'editsignature')
{
BELOW that ADD
if (!is_member_of($bbuserinfo, 20))
{
$vboptions['allowbbimagecode'] = false;
}
Then only users in usergroup 20 should be able to use images.
BlackxRam
06-01-2005, 12:53 PM
Well what about 3 different usergroups are allowed? Im not sure but is it similar to how a Conditional in the templates would be? Im not 100%.
Could you give me an example?
Thanks for the speedy reply and assistance for sure. =)
Andreas
06-01-2005, 01:01 PM
Either you modify is_member_of() to accept multiple usergroup IDs (see this hack (https://vborg.vbsupport.ru/showthread.php?t=61149)) or you can use
if (!is_member_of($bbuserinfo, 20) AND !is_member_of($bbuserinfo, 21) AND !is_member_of($bbuserinfo, 22))
{
}
bryan09
06-04-2005, 06:15 AM
I got this error
Fatal error: Call to undefined function: fetch_character_count() in /var/www/html/forums/profile.php on line 1310
My line 1310 is as follow:
if (!is_member_of($bbuserinfo, 5, 6, 7, 11) AND fetch_character_count($signature, '[img') > 0)
I have used this hack (https://vborg.vbsupport.ru/showthread.php?t=61149) to accept multiple groups at once.
What can be wrong?
Ok to my above error question ... here is what I did ... tell me if I am right or wrong.
Find:
if (!is_member_of($bbuserinfo, 5, 6, 7, 11) AND fetch_character_count($signature, '[img') > 0)
ADD above:
require_once('./includes/functions_misc.php');
It works for me though.
Andreas
06-04-2005, 01:53 PM
Yep, that's correct. Seems like I fortgot that fetch_character_count() is not defined in functions.php :)
bryan09
06-05-2005, 01:54 AM
Ok thanks!
On top of that,
how can we allow the user to only have ONE [img] tag in it's signature?
Andreas
06-05-2005, 01:58 AM
Change > 0 to > 1.
And the message should be changed too :)
bryan09
06-05-2005, 03:24 AM
Failed. I tested and it still allowed more than 1 [IMG] with > 1.
Andreas
06-05-2005, 10:21 AM
Hmm, should work in the way that users from usergroup id 20 are not able to use mir then 1 [img]-Tag in their signature.
bryan09
06-05-2005, 04:39 PM
[Because i use the "multiple groups at once" hack too, you think that is a factor?
bryan09
06-20-2005, 02:22 AM
Hey strange ...
A member not within the usergroup I set, still able to use the [IMG] tag manually. (Without clicking on the IMG button since there isn't a button). WHy is this so?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.