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)
-   -   New Posting Features - vS-Hide Hack Resurrection (https://vborg.vbsupport.ru/showthread.php?t=237057)

bigrover 10-21-2010 05:42 PM

I performed a complete re-install of this product mod on my vB 4.0.7 and the text is now hidden when I select "reply with quote". Actually the hidden text is replaced with ***hidden text*** in bold, and I can live with that. I'm not sure what I missed before.

OK, I figured it out! The situation that causes the text to not be hidden occurs when the option information is not included in the tag. For example, [hide]***hidden stuff***[/hide] will work and only the groups set as the default in the control panel can see it, but if anyone selects Reply With Quote the hidden text will be revealed. However, if the tag is written out completely as [hide='5,6,7']***more hidden stuff***[/hide] then it works properly, even when quoted. The same is true with the [showtogroups] tag. It is not case sensitive, but it does require the options to be specified. Which leads to the next big issue...

Now if I can only figure out how to make this mod default the group numbers in the HIDE and SHOWTOGROUPS buttons in the editor.

akanevsky 10-22-2010 01:30 AM

Quote:

Originally Posted by bigrover (Post 2112449)
I performed a complete re-install of this product mod on my vB 4.0.7 and the text is now hidden when I select "reply with quote". Actually the hidden text is replaced with ***hidden text*** in bold, and I can live with that. I'm not sure what I missed before.

OK, I figured it out! The situation that causes the text to not be hidden occurs when the option information is not included in the tag. For example, [hide]***hidden stuff***[/hide] will work and only the groups set as the default in the control panel can see it, but if anyone selects Reply With Quote the hidden text will be revealed. However, if the tag is written out completely as [hide='5,6,7']***more hidden stuff***[/hide] then it works properly, even when quoted. The same is true with the [showtogroups] tag. It is not case sensitive, but it does require the options to be specified. Which leads to the next big issue...

Now if I can only figure out how to make this mod default the group numbers in the HIDE and SHOWTOGROUPS buttons in the editor.

I tested this on vBulletin 4.0.7 and it does strip out the text when you use just [hide] a [/hide].

MonsterDK 10-22-2010 01:48 AM

Quote:

Originally Posted by Psionic Vision (Post 2112601)
I tested this on vBulletin 4.0.7 and it does strip out the text when you use just [hide] a [/hide].

Psionic Vision how is it possible to stop hidden content been seen in WHAT'S NEW tab via mouse over in 4.0.6 ?

bigrover 10-22-2010 02:16 AM

Quote:

Originally Posted by Psionic Vision (Post 2112601)
I tested this on vBulletin 4.0.7 and it does strip out the text when you use just [hide] a [/hide].

Did you try Reply With Quote? It fails consistently on mine when the options are not included. I'm going to check the install again, but I think the problem lies in the regex in vS_HHR_Engine.php and that won't have anything to do with the install. Since it works with the options included that means it is properly going through the hooks to the engine. I'm going to have a few beers and debug the regex to see why it isn't matching without the options.

I could always wipe out my whole site and start over with a fresh install of vB and only this mod, but I know I will be in the same place. I've already disabled all the other mods with no change. It isn't practical for me to include the options to list the authorized forums as the list is quite long. Also, if the original poster sees the entire list of authorized forums and can monkey around with that list. That kinda defeats the whole concept of security for this mod.

bigrover 10-22-2010 03:43 AM

GOT IT!

Find at line 685 in vS_HHR_Engine.php:
PHP Code:

        if (!($purpose == 'dopost' AND $show['toolbar_showtogroups_button']))
        {
            
$message preg_replace("/\[(" $this->tags['SHOWTOGROUPS'] . ")=("|\"|'|)([0-9,]+)\\2\](.*)\[\/\\1\]/siU"$replacement$message);
        } 

Replace with:
PHP Code:

        if (!($purpose == 'dopost' AND $show['toolbar_showtogroups_button']))
        {
            
// hack trying to fix HIDE without options
            
$message preg_replace("/\[(" $this->tags['SHOWTOGROUPS'] . ")\](.*)\[\/\\1\]/siU"$replacement$message);
            
$message preg_replace("/\[(" $this->tags['SHOWTOGROUPS'] . ")=("|\"|'|)([0-9,]+)\\2\](.*)\[\/\\1\]/siU"$replacement$message);
        } 

The regex was not going to match on to the tag without the options included. I basically duplicated the function of the HIDE-POSTS match above it at line 662. Works great now.

Now to figure out the toolbar button prompt issue. The provided instructions are incorrect and lead to a dead-end.

Kraxell 10-22-2010 08:58 AM

is it possible to see, where a user have thanks? (which posts/threads)

weindians 10-22-2010 09:05 AM

is it possible to import thanx from post thank u hack to this mod

bigrover 10-22-2010 12:39 PM

Quote:

Originally Posted by MonsterDK (Post 2112605)
Psionic Vision how is it possible to stop hidden content been seen in WHAT'S NEW tab via mouse over in 4.0.6 ?

On my vB 4.0.7 system the hidden text is properly dealt with in the mouse hover situation. It works as expected.

bigrover 10-22-2010 12:58 PM

If you want to have the mod use the configured defaults rather than prompt for options when the button in the editor is pushed, consider the following changes.

Go to your plugin manager and edit HHR: Load Editor Buttons (E/2). The variable of interest is twoparams. If it is set to '1' then the button will prompt for one option, however if it is set to zero, the button doesn't prompt at all. It just inserts the tags and you go on with your edit. When the tags are processed by the mod, if no options are specified, it defaults to the configuration entered in the control panel.

In my case I have the HIDE tag mapped to SHOWTOGROUPS so my changes to the HHR: Load Editor Buttons (E/2) plugin would look like this:
PHP Code:

if ($show['toolbar_shortcut_button'])
{
    
$extrabuttons[] = array(
        
'buttonimage' => vB_Template_Runtime::fetchStylevar('imgdir_editor') . '/hide.gif',
        
//'twoparams' => ($vbulletin->options['hidetag_shortcut'] == 0 || $vbulletin->options['hidetag_shortcut'] == 4 || $vbulletin->options['hidetag_shortcut'] == 5) ? 1 : 0,
        
'twoparams' => 0,
        
'bbcodetag' => 'hide',
        
'tag' => 'hide',
    );


and:
PHP Code:

if ($show['toolbar_showtogroups_button'] AND $vbulletin->options['hidetag_shortcut'] != 4)
{
    
$extrabuttons[] = array(
        
'buttonimage' => vB_Template_Runtime::fetchStylevar('imgdir_editor') . '/showtogroups.gif',
        
//'twoparams' => 1,
        
'twoparams' => 0,
        
'bbcodetag' => 'showtogroups',
        
'tag' => 'showtogroups',
    );



motorola 10-22-2010 01:18 PM

Psionic Vision can you give me an answere on my previous question ?


All times are GMT. The time now is 11:54 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.01794 seconds
  • Memory Usage 1,767KB
  • 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_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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