Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2005, 11:20 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 06-01-2005, 11:30 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 06-01-2005, 12:53 PM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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. =)
Reply With Quote
  #4  
Old 06-01-2005, 01:01 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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))
{

Reply With Quote
  #5  
Old 06-04-2005, 06:15 AM
bryan09 bryan09 is offline
 
Join Date: May 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 06-04-2005, 01:53 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, that's correct. Seems like I fortgot that fetch_character_count() is not defined in functions.php
Reply With Quote
  #7  
Old 06-05-2005, 01:54 AM
bryan09 bryan09 is offline
 
Join Date: May 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks!

On top of that,

how can we allow the user to only have ONE [img] tag in it's signature?
Reply With Quote
  #8  
Old 06-05-2005, 01:58 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change > 0 to > 1.
And the message should be changed too
Reply With Quote
  #9  
Old 06-05-2005, 03:24 AM
bryan09 bryan09 is offline
 
Join Date: May 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Failed. I tested and it still allowed more than 1 [IMG] with > 1.
Reply With Quote
  #10  
Old 06-05-2005, 10:21 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:52 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.04214 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete