vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Hide BBCodes/Signatures From Guests/Users (https://vborg.vbsupport.ru/showthread.php?t=318467)

scotty 10-01-2017 03:07 PM

same here

PHP Version 7.1.9-1+ubuntu16.04.1+deb.sury.org+1

scotty 10-02-2017 06:42 PM

Quote:

Originally Posted by MarkFL (Post 2588257)
I run this on vB 4.2.5 and PHP 7.x without issue. Without more info, I'm afraid I can't help.

do you have any custom bb-codes active?

MarkFL 10-02-2017 09:03 PM

Quote:

Originally Posted by scotty (Post 2590227)
do you have any custom bb-codes active?

Yes, quite a few actually. :)

scotty 10-03-2017 04:30 AM

hm.

according to the error message, there might be something in the custom_bbcodes (line #0 "append_custom_tags()"):

Code:

Call to a member function query_read_slave() on null on line 279 in /local/sites/sitehtml/includes/class_bbcode.php
#0 /local/sites/sitehtml/includes/class_bbcode.php(241): vB_BbCodeParser->append_custom_tags()
#1 /local/sites/sitehtml/includes/class_postbit.php(345) : eval()'d code(13): vB_BbCodeParser->__construct(Object(stdClass), Array)
#2 /local/sites/sitehtml/includes/class_postbit.php(345): eval()
#3 /local/sites/sitehtml/showthread.php(1097): vB_Postbit->construct_postbit(Array)
#4 {main}

any idea?

Scyther 10-08-2017 04:41 AM

Awesome Mod. Thanks.

mchll9898 11-01-2017 05:59 AM

I uploaded the hidebbcodesfromguests folder to my root folder and imported the product file. I'm trying to hide IMG code from guests, but it isn't working :confused:. I have unregistered / not logged in users selected. Can you let me know if I've done anything wrong?

https://vborg.vbsupport.ru/external/2017/10/7.png

MarkFL 11-01-2017 02:38 PM

1 Attachment(s)
Okay, try updating with the attacched .XML file and let me know if that works.

mchll9898 11-02-2017 02:44 AM

Quote:

Originally Posted by MarkFL (Post 2590897)
Okay, try updating with the attacched .XML file and let me know if that works.

Thank you so much! It works great now.

slash77xx 12-13-2017 11:44 AM

1 Attachment(s)
GOOD AFTERNOON.
I HAVE INSTALLED THE product-hidebbcodesandsigsfromque.xml THE LAST VERSION, AND MY PROBLEM IS IN WHICH THE MESSAGE TO REGISTER AS IT APPEARS IN THE IMAGES YOU SHOW.
I USE VBULLETIN 4.2.5 AND PHP 7.1
SOME HELP .

Peter Walker 12-22-2017 01:42 PM

1 Attachment(s)
I needed this for a different reason, that a minor change to this mod made possible:

I have a premium membership system on my forum, where those that are in the Premium secondary usergroup are allowed to view videos, etc. that are displayed with custom bb codes.
Everybody else, should see a message explaining that they need to join the Premium usergroup to view the content.

As this mod does the opposite, I needed to change the code to make it work for me. With the change, it disables the named bbcodes everywhere but, for those who are members of the premium additional usergroup in the given forums.

This means that normal members see the error message, which I changed to tell them to buy a subscription, and members of the premium usergroup can now see the bbcode (videos, etc.)

After chatting with Mark about this and looking closely at the code, I was able to make this work with just a minor change to the product file and reinstalling it.

Find:
Code:

if ($vbulletin->options['markfl_hbfg_active'] AND array_intersect(explode(',', $foruminfo['parentlist']), explode(',', $vbulletin->options['markfl_hbfg_forums'])) AND !in_array($threadinfo['threadid'], array_map('trim', explode(',', $vbulletin->options['markfl_hbfg_threadsignore']))))
{
                if ($show['guest'] OR is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['markfl_hbfg_addgroups'])))
                {
                                $show['markfl_hbfg_bbcodes'] = 1;
                }

Replace with:
Code:

if ($vbulletin->options['markfl_hbfg_active'] AND array_intersect(explode(',', $foruminfo['parentlist']), explode(',', $vbulletin->options['markfl_hbfg_forums'])) AND !in_array($threadinfo['threadid'], array_map('trim', explode(',', $vbulletin->options['markfl_hbfg_threadsignore']))))
{
                if ($show['guest'] OR is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['markfl_hbfg_addgroups'])))
                {
                                $show['markfl_hbfg_bbcodes'] = 0;
                }
                else
                {
                                $show['markfl_hbfg_bbcodes'] = 1;
                }

Or simply use the attached file. Important, this changes the use of the mod, now allowing bbcodes in specific locations, it is the only way I found to do it.

Usage:
BBCode Tag Content To Hide From Guests: Give the mods that are to be activated. In my case they were the custom mods: audiop,videomp4p,videomp4vttp

Active Forums: Mark all the forums that contain premium content that use the above bbcodes.

Usergroup(s) From Which To Hide BBCodes: Set only the usergroups that are ALLOWED to use the BBCodes. e.g. Premium usergroup.

Hide BBCodes From Users Until They Reply? No Users

Usergroups Required To Reply: All

The remaining fields remain empty.

I also changed the phase displayed to:
Code:

This content is reserved for premium members only. Please obtain a premium subscription to view this content.
This is working perfectly in vb 4.2.5.
I have enclosed some images of how it works. Regular members see the blocked message while members that have Premium status can play the content - great!

Enjoy and thanks to Mark for his excellent work that just needed a little tweak.


All times are GMT. The time now is 02:49 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.01123 seconds
  • Memory Usage 1,750KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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