vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Disable BBcodes in a certain theme? (https://vborg.vbsupport.ru/showthread.php?t=317939)

Guest210212002 03-24-2015 11:30 AM

Disable BBcodes in a certain theme?
 
On my old vb3 board, I had a plug-in (that I can't seem to find) that disabled the IMG tag for a single theme. I have a work-safe theme that my members really like, which has no avatars, no images in posts and a generic looking header so that they can browse my guitar forum incognito at work. (Because let's face it, guitar forums are more fun than actually working.)

How do I pull this off with vb4? I've already stripped the theme of all the usual bits, but I don't know how to stop it from parsing the IMG bbcode (and ideally the VIDEO bbcode as well).

Any insight would be great. Thanks!

kh99 03-27-2015 08:03 PM

You can create a plugin using hook location bbcode_parse_start and code like this:
Code:

if (defined('STYLEID') && STYLEID == X)
{
  $dobbimagecode = 0;
  $dobbvideocode = 0;
}


where you replace the X with the styleid of the NSFW style. Then you need to truncate (empty) the postparsed table to see the results (the images seem to be affected immediately, but you need to clear the postparsed table to affect the video tag).

Guest210212002 03-28-2015 10:49 AM

That worked, thanks once again man!


All times are GMT. The time now is 08:51 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.00975 seconds
  • Memory Usage 1,709KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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