vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Images in Signatures - reward more than a given (https://vborg.vbsupport.ru/showthread.php?t=82344)

BlackxRam 06-01-2005 10:20 AM

Images in Signatures - reward more than a given
 
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 10:30 AM

In profile.php find
PHP Code:

if ($vboptions['maximages'] != 0

ABOVE that ADD
PHP Code:

if (!is_member_of($bbuserinfo20) AND fetch_character_count($signature'[img') > 0)
{
    
$preview 'true';  
    
$errors[] = 'Sorry, but you are not allowed to use images in your signature';


FIND
PHP Code:

if ($_REQUEST['do'] == 'editsignature')


BELOW that ADD
PHP Code:

if (!is_member_of($bbuserinfo20))
{
    
$vboptions['allowbbimagecode'] = false


Then only users in usergroup 20 should be able to use images.

BlackxRam 06-01-2005 11:53 AM

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 12:01 PM

Either you modify is_member_of() to accept multiple usergroup IDs (see this hack) or you can use

PHP Code:

if (!is_member_of($bbuserinfo20) AND !is_member_of($bbuserinfo21) AND !is_member_of($bbuserinfo22))
{



bryan09 06-04-2005 05:15 AM

I got this error

Code:

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:

Code:

        if (!is_member_of($bbuserinfo, 5, 6, 7, 11) AND fetch_character_count($signature, '[img') > 0)
I have used this hack 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:
Code:

if (!is_member_of($bbuserinfo, 5, 6, 7, 11) AND fetch_character_count($signature, '[img') > 0)
ADD above:
Code:

require_once('./includes/functions_misc.php');
It works for me though.

Andreas 06-04-2005 12:53 PM

Yep, that's correct. Seems like I fortgot that fetch_character_count() is not defined in functions.php :)

bryan09 06-05-2005 12: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 12:58 AM

Change > 0 to > 1.
And the message should be changed too :)

bryan09 06-05-2005 02:24 AM

Failed. I tested and it still allowed more than 1 [IMG] with > 1.

Andreas 06-05-2005 09: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.


All times are GMT. The time now is 04:16 PM.

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.02438 seconds
  • Memory Usage 1,744KB
  • 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
  • (4)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete