vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I stop parsing of BB code? (https://vborg.vbsupport.ru/showthread.php?t=103152)

kau 12-28-2005 08:37 PM

Anyone see why it's erroring out?

Quote:

Originally Posted by Psionic Vision
File class_bbcode.php, around line 1714:

PHP Code:

    /**
    * Handles an [img] tag.
    *
    * @param    string    The text to search for an image in.
    * @param    string    Whether to parse matching images into pictures or just links.
    *
    * @return    string    HTML representation of the tag.
    */
    
function handle_bbcode_img($bbcode$do_imgcode$has_img_code false



What tag can I put in this function and where to stop parsing of IMG tags if the poster is a user group id 1?

I tried just displaying the user group id but couldn't even find the tag to do that would work.

Dr00pY 11-11-2006 09:12 AM

Did anyone ever figure out a way to do this??? I tried creating a plugin that does this, but it seems that a member has figure out a way around it. Was trying to avoid doing a code hack, but it might be the only solution....


My plugin used the following hooks:

editpost_update_start
newreply_post_start
newthread_post_start

all 3 places have the following code in them:

Code:

if (!in_array($vbulletin->userinfo['usergroupid'], array(x,y,z)))
{
        //we need to remove the [img] tags....
        $vbulletin->GPC['message'] = str_ireplace("[img]","",$vbulletin->GPC['message']);
        $vbulletin->GPC['message'] = str_ireplace("[/img]","",$vbulletin->GPC['message']);

}


Does anyone know what other place I might need to put this code in or see any errors in my code? I figure if we can catch the issue before the post is saved, this will prevent images from being posted.

Thanks for the help....

Dr00pY


All times are GMT. The time now is 06:20 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.02872 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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