Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
MARCO1 BBCODE Hide Tags [ hide] [/ hide] Details »»
MARCO1 BBCODE Hide Tags [ hide] [/ hide]
Version: 2.00, by MARCO1 MARCO1 is offline
Developer Last Online: Jan 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.x Rating:
Released: 02-08-2010 Last Update: 02-09-2010 Installs: 305
Uses Plugins Auto-Templates
 
No support by the author.

MARCO1 BBCODE Hide Tags
vB4.x.x
By
Marco Mamdouh

Please Note that : I'm keeping update my products and codes without any money simply support me in vb.org to continue this work

Support Me!
Mark As Installed - Nominate For MOTM

What's this ?
This Mod Hide X Area in the threads By Using HIDE BBCODE Tags With Powerful control via AdminCp with very nice button in your editor to automatically enter Hide tags when you click on it, More info and pictures in Attachments.

Features :
  • Compatible with All vBulletin 4 Versions.
  • No conflict with any other Mods to hide links.
  • Full Control via vBulletin Admincp.
  • Auto Template And Core Functions Edit.
  • Can Control the Hide message from Admincp.
  • Admin Can see hidden content without reply.
  • Moderators Can see hidden content without reply.
  • Super Moderators Can see hidden content without reply.
  • Thread Author Can see hidden content without reply.
  • Usergroups permissions : If you have any additional usergroup like VIP To See hidden content without reply.
  • Excluding X Forum To BBCODE Hide : You can disable the Mod in any sub-forum via Admincp.
  • Full Optimized to make your forum very fast when you using it
  • 0 Query Which Make the forum fast because there is no DB Query In This Mod Coding.
Installation :
Upload images folder in your forum root directory.
Import the .xml file from your AdminCp.

Require 1 Template edit :
In editor_toolbar_on template find :
HTML Code:
<vb:if condition="!$show['basicbbcodeonly']">
Add Above :
HTML Code:
<img src="images/buttons/hide.gif" class="imagebutton" id="{vb:raw editorid}_cmd_wrap0_hide" width="20" height="20" alt="Insert Hide Tags" />

Screenshots & Download :

In Attachments.

If you want more Hide Images ?
TimberFloorAu Has Made very very very Good images in this post : https://vborg.vbsupport.ru/showpost....6&postcount=49
PSD Images : https://vborg.vbsupport.ru/showpost....1&postcount=52
Many thanks to him for his time.


Translations :
You can translate this Mod and publish it in your forum however you can't do that without take permissions from Me via PM's
This Mod Is Also Available in Arabic Thanks to DR.Osama : https://vborg.vbsupport.ru/showpost....6&postcount=42
English Version in Attachments.

BUGS :

Quote:
Warning: Cannot use a scalar value as an array in [path]\includes\class_postbit.php(314) : eval()'d code on line 186
Fix : Check this post, https://vborg.vbsupport.ru/showpost....&postcount=280
I'm sorry But I really don't have much time to update any of my free mods at this time.

DON'T FORGET TO SUPPORT ME

Download Now

File Type: zip MARCO1 Hide BBCODE.zip (26.8 KB, 2757 views)

Screenshots

File Type: jpg admincp.jpg (71.2 KB, 0 views)
File Type: jpg forum1.jpg (58.2 KB, 0 views)
File Type: jpg FORUM2.jpg (48.2 KB, 0 views)
File Type: jpg FORUM3.jpg (43.5 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
8 благодарности(ей) от:
Babis 92, blue7, ChiNa, josner, mohammadxxx, smsma.net, sweetpotato, vBarsiv

Comments
  #202  
Old 07-10-2010, 10:55 AM
angelimnot angelimnot is offline
 
Join Date: Feb 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those are the things we wanted fixed yellow.. that and it pops up a scalar error.. when I asked marco what the fix for it was.. he told me to erase all the user groups and put 0 that would fix it.. but then whats the point of using the mod if everyone can see everything? I am in need for a fix for this mod.. or someone to make one that works right
Reply With Quote
  #203  
Old 07-15-2010, 10:13 AM
demonfatal demonfatal is offline
 
Join Date: Mar 2009
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MARCO1 an update is needed PLEASE, nothing is really hidden...
Reply With Quote
  #204  
Old 07-15-2010, 06:50 PM
Yellow Slider Yellow Slider is offline
 
Join Date: Aug 2006
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

he isn't going to update anything, too bad.
Reply With Quote
  #205  
Old 07-16-2010, 06:52 AM
iyama iyama is offline
 
Join Date: Sep 2008
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think Marco is to busy with his girlfriend to hide

Marco can you give your users a update about this all please?
Reply With Quote
  #206  
Old 07-17-2010, 10:47 PM
Danny M Danny M is offline
 
Join Date: Apr 2010
Location: UK
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this hack also work by instead of a user replying to a thread, they can just click the 'thanks' button to see the post content?
Reply With Quote
  #207  
Old 07-18-2010, 05:48 AM
Blooded Blooded is offline
 
Join Date: Feb 2010
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you please update this mod?
Reply With Quote
  #208  
Old 07-18-2010, 05:04 PM
NAVAMUEL NAVAMUEL is offline
 
Join Date: Sep 2009
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please update this mod
Reply With Quote
  #209  
Old 07-18-2010, 06:49 PM
xtremecoders xtremecoders is offline
 
Join Date: May 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PROBLEM FIXED !!!!!!

Its an array function Syntax Problem and was easy to fix it....

all you have to do is to find and replace inside the script all in_array function with the correct syntax.

Marco uses syntax like ...
in_array($vbulletin->userinfo['usergroupid'],$MARCO1_NoHideUSG) , which is wrong and lead to array corruption.

The Correct is in_array($vbulletin->userinfo['usergroupid'],array(MARCO1_NoHideUSG))

Steps :

1: Open the
Product MARCO1 BBCODE Hide vB4.xml using an editor like wordpad
2: Edit -> Select all & Delete
3: Paste the next Script.


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="marco1_hidebbcode" active="1">
    <title>MARCO1 Hide BBCODE</title>
    <description>Hide X Area From your threads With BBCODES</description>
    <version>2.0</version>
    <url />
    <versioncheckurl />
    <dependencies>
    </dependencies>
    <codes>
    </codes>
    <templates>
    </templates>
    <stylevardfns>
    </stylevardfns>
    <stylevars>
    </stylevars>
    <plugins>
        <plugin active="1" executionorder="126">
            <title>MARCO1 Hide BBCODE Functions</title>
            <hookname>postbit_display_complete</hookname>
            <phpcode><![CDATA[if ($_REQUEST['do'] == 'whatever'){
            global $vbulletin, $vboptions, $bbuserinfo, $db, $threadid, $postid;
            $bbuserinfo = $this->registry->userinfo;
            $postid = $_REQUEST['p'];
            $hide_call = $_REQUEST['all'];
            $hide_read = false;
            $hide_replied = '';
            $hide_thanked = '';
            
                $hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
                $myreplies = 0;
                if($db->num_rows($hide_replied)){
                    while ($h_post = $db->fetch_array($hide_replied)){
                        $myreplies += $h_post['count'];
                    }
                    $myreplies = vb_number_format($myreplies);
                }
                if($myreplies > 0){
                    $hide_read = true;
                }
            
            if(!$bbuserinfo[userid]){
                $hide_read = false;
            }
            if( $hide_read == true){
                $hide_post = $db->query_first("SELECT pagetext as 'message' FROM ". TABLE_PREFIX ."post WHERE postid='$postid'");
                $hide_string = "#\[hide\](.*)\[\/hide\]#siU";
                require_once(DIR . '/includes/class_bbcode.php');
                $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
                $hide_post['message'] = $parser->do_parse($hide_post['message'],true);
                if(preg_match_all($hide_string, $hide_post['message'], $hide_match)) {
                    for($i=0; $i<count($hide_match[0]); $i++) {
                        $hide_replace[$i] ="<fieldset>".$hide_match[1][$i]."</fieldset>";
                        $hide_post['message']= str_replace($hide_match[0][$i],$hide_replace[$i],$hide_post['message']);
                    }
                }
            }
            $ajax_on = true;
            $output = $hide_post['message'];
            echo "$output";
            exit;
        }]]></phpcode>
        </plugin>
        <plugin active="1" executionorder="126">
            <title>MARCO1 Hide BBCODE Functions (M)</title>
            <hookname>postbit_display_complete</hookname>
            <phpcode><![CDATA[if ($this->registry->options['MARCO1_BBHideon'] == '1' AND stristr($post['message'],'[hide]')){
            global $vbulletin, $vboptions, $bbuserinfo, $db, $threadid, $hide_call, $postid;
            $bbuserinfo = $this->registry->userinfo;
            $post = $this->post;
            $hide_read = false;
        
            $hide_replied = '';
        
                        
            $hide_stop = 0;
            if (!empty($this->registry->options['MARCO1_HideForumID'])){
                $MARCO1_Forum_NOHIDE = explode(" ",$this->registry->options['MARCO1_HideForumID']);
                if(in_array($thread['forumid'], array(MARCO1_Forum_NOHIDE))){
                    $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
                    $hide_stop = 1;
                }
            }
            if($post['userid'] == $bbuserinfo['userid'] AND $hide_stop == 0){
                $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '<fieldset>\\1</fieldset>', $post['message']);
                $hide_stop = 1;
            }
            if ($hide_stop != 1){
                if ($this->registry->options['sid_hide_showadmin'] AND $bbuserinfo[usergroupid]==6){
                    $hide_read = true;
                }elseif ($this->registry->options['sid_hide_showmod'] AND can_moderate($thread['forumid'])){
                    $hide_read = true;
                }
                $MARCO1_NoHideUSG = split(',',$vbulletin->options['MARCO1_NoHideUSG']);
if ($vbulletin->options['MARCO1_BBHideon'] AND in_array($vbulletin->userinfo['usergroupid'], array(MARCO1_NoHideUSG))){
                        $hide_read = true;
                    }
                }
                
                    $hide_img_set = $hide_img_set + 2 ;
                    $hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
                    $myreplies = 0;
                    if($db->num_rows($hide_replied)){
                        while ($h_post = $db->fetch_array($hide_replied)){
                            $myreplies += $h_post['count'];
                        }
                        $myreplies = vb_number_format($myreplies);
                    }
                    if($myreplies > 0){
                        $hide_read['userid'] = true;
                    }
                
                if (!$hide_call){
                    $hide_call =$post['postid'];
                } else {
                    $hide_call .=",".$post['postid'];
                }
                
                if(!$bbuserinfo[userid]){
                    $hide_read = false;
                }
                if ($hide_read == true){
                    $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '<fieldset>\\1</fieldset>', $post['message']);
                } else {
                    
                $hide_fetch = $vbulletin->options['MARCO1_HIDEMESSAGE']; 

                    $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', $hide_fetch, $post['message']);
                }
            }]]></phpcode>
        </plugin>
        <plugin active="1" executionorder="5">
            <title>MARCO1 Print Pages Hide BBCODE Functions</title>
            <hookname>printthread_post</hookname>
            <phpcode><![CDATA[if($vbulletin->options['MARCO1_BBHideon']AND stristr($post['message'],'[hide]')){
            global $vbulletin, $vboptions, $bbuserinfo, $db;
            $bbuserinfo = $vbulletin->userinfo;
            $hide_read = false;
            $hide_stop = 0;
            $hide_img_set = 0;
            if (!empty($vbulletin->options['MARCO1_HideForumID'])){
                $MARCO1_hide_forum_stop = explode(" ",$vbulletin->options['MARCO1_HideForumID']);
                if(in_array($threadinfo['forumid'], array(MARCO1_hide_forum_stop))){
                    $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
                    $hide_stop = 1;
                }
            }
            if($post['userid'] == $bbuserinfo['userid'] AND $hide_stop == 0){
                $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
                $hide_stop = 1;
            } 
            if ($hide_stop != 1){
            
                    $MARCO1_NoHideUSG = split(',',$vbulletin->options['MARCO1_NoHideUSG']);
if ($vbulletin->options['MARCO1_BBHideon'] AND in_array($vbulletin->userinfo['usergroupid'], array(MARCO1_NoHideUSG))){
                        $hide_read = true;
                    }
                
                
                    $hide_img_set = $hide_img_set + 2 ;
                    $hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
                    $myreplies = 0;
                    if($db->num_rows($hide_replied)){
                        while ($h_post = $db->fetch_array($hide_replied)){
                            $myreplies += $h_post['count'];
                        }
                        $myreplies = vb_number_format($myreplies);
                    }
                    if($myreplies > 0){
                        $hide_read['userid'] = true;
                    }
                
            
                if(!$bbuserinfo[userid]){
                    $hide_read = false;
                }
                
                 $hide_img = $vbulletin->options[MARCO1_HIDEMESSAGE];
                 
                if($hide_read == true){
                    $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
                } else {
                    $post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', $hide_img, $post['message']);
                }
            }
        }]]></phpcode>
        </plugin>
    </plugins>
    <phrases>
        <phrasetype name="vBulletin Settings" fieldname="vbsettings">
            <phrase name="setting_MARCO1_BBHideon_desc" date="1265211380" username="MARCO1" version="1.1"><![CDATA[Choose yes if you want to enable Hide BBCODE]]></phrase>
            <phrase name="setting_MARCO1_BBHideon_title" date="1265211380" username="MARCO1" version="1.1"><![CDATA[Enable MARCO1 Hide BBCODE ?]]></phrase>
            <phrase name="setting_MARCO1_HIDEMESSAGE_desc" date="1265211504" username="MARCO1" version="1.1"><![CDATA[That's the Hide content message that's will appear when you hide something using the Mod.]]></phrase>
            <phrase name="setting_MARCO1_HIDEMESSAGE_title" date="1265211504" username="MARCO1" version="1.1"><![CDATA[What's the Hide Message ?]]></phrase>
            <phrase name="setting_MARCO1_HideForumID_desc" date="1265675231" username="MARCO1" version="1.1"><![CDATA[Add Forum ID's of forums that you will not need to use BBCODE Hide Content on it.]]></phrase>
            <phrase name="setting_MARCO1_HideForumID_title" date="1265675231" username="MARCO1" version="1.1"><![CDATA[Excluding Forum of BBCODE Hide]]></phrase>
            <phrase name="setting_MARCO1_NoHideUSG_desc" date="1265677222" username="MARCO1" version="1.1"><![CDATA[<p>What's the Usergroups that's can view the hidden content without reply ?<br>
    <strong>Separate with ","</strong><br>
    <strong>By Default I allow Moderators, Admins and Super Moderators to see 
    hidden content without reply</strong></p>]]></phrase>
            <phrase name="setting_MARCO1_NoHideUSG_title" date="1265677222" username="MARCO1" version="1.1"><![CDATA[Usergroups Permissions]]></phrase>
            <phrase name="settinggroup_MARCO1_HIDEBBCODE_SETTINGS" date="1265211320" username="MARCO1" version="1.1"><![CDATA[MARCO1 Hide BBCODE Settings]]></phrase>
        </phrasetype>
    </phrases>
    <options>
        <settinggroup name="MARCO1_HIDEBBCODE_SETTINGS" displayorder="65535">
            <setting varname="MARCO1_BBHideon" displayorder="10">
                <datatype>free</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>1</defaultvalue>
            </setting>
            <setting varname="MARCO1_HIDEMESSAGE" displayorder="20">
                <datatype>free</datatype>
                <optioncode>textarea</optioncode>
                <defaultvalue><![CDATA[<img src="images/hide.gif">]]></defaultvalue>
            </setting>
            <setting varname="MARCO1_HideForumID" displayorder="30">
                <datatype>free</datatype>
                <defaultvalue>0</defaultvalue>
            </setting>
            <setting varname="MARCO1_NoHideUSG" displayorder="40">
                <datatype>free</datatype>
                <defaultvalue>5,6,7</defaultvalue>
            </setting>
        </settinggroup>
    </options>
    <helptopics>
    </helptopics>
    <cronentries>
    </cronentries>
    <faqentries>
    </faqentries>
</product>


4: Save the file
5: Upload again the new file using as always vb product manager and install it.

You can see a sample of a working mod HERE

Now all working as it should.

Do it and inform me if is OK...

Xtremecoders.org


Reply With Quote
  #210  
Old 07-19-2010, 06:22 AM
Blooded Blooded is offline
 
Join Date: Feb 2010
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xtremecoders View Post
PROBLEM FIXED !!!!!!

Its an array function Syntax Problem and was easy to fix it....

all you have to do is to find and replace inside the script all in_array function with the correct syntax.

Marco uses syntax like ...
in_array($vbulletin->userinfo['usergroupid'],$MARCO1_NoHideUSG) , which is wrong and lead to array corruption.

The Correct is in_array($vbulletin->userinfo['usergroupid'],array(MARCO1_NoHideUSG))

Steps :

1: Open the
Product MARCO1 BBCODE Hide vB4.xml using an editor like wordpad
2: Edit -> Select all & Delete
3: Paste the next Script.




4: Save the file
5: Upload again the new file using as always vb product manager and install it.

You can see a sample of a working mod HERE

Now all working as it should.

Do it and inform me if is OK...

Xtremecoders.org


works perfect, the only problem with this mod is when someone make a blog the hide dont work same if the put "blog this post"
Reply With Quote
  #211  
Old 07-19-2010, 03:26 PM
xtremecoders xtremecoders is offline
 
Join Date: May 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SORRY for the MISTAKE.

I was wrong and Problem was appears again.

SO, i found the Problem, and ALL is OK now.



PROBLEM FIXED !!!!!!

Its an array function Syntax Problem and was easy to fix it....

all you have to do is to find and replace inside the script all in_array function with the correct syntax.

Marco uses syntax like ...
in_array($vbulletin->userinfo['usergroupid'],$MARCO1_NoHideUSG) , which is wrong and lead to array corruption.

The Correct is in_array($vbulletin->userinfo['usergroupid'], $MARCO1_NoHideUSG, true))

Steps :

1: Open the
Product MARCO1 BBCODE Hide vB4.xml using an editor like wordpad
2: Edit -> Select all & Delete
3: Paste the next Script.


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="marco1_hidebbcode" active="1">
	<title>MARCO1 Hide BBCODE</title>
	<description>Hide X Area From your threads With BBCODES</description>
	<version>2.0</version>
	<url />
	<versioncheckurl />
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
	</templates>
	<stylevardfns>
	</stylevardfns>
	<stylevars>
	</stylevars>
	<plugins>
		<plugin active="1" executionorder="126">
			<title>MARCO1 Hide BBCODE Functions</title>
			<hookname>postbit_display_complete</hookname>
			<phpcode><![CDATA[if ($_REQUEST['do'] == 'whatever'){
			global $vbulletin, $vboptions, $bbuserinfo, $db, $threadid, $postid;
			$bbuserinfo = $this->registry->userinfo;
			$postid = $_REQUEST['p'];
			$hide_call = $_REQUEST['all'];
			$hide_read = false;
			$hide_replied = '';
			$hide_thanked = '';
			
				$hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
				$myreplies = 0;
				if($db->num_rows($hide_replied)){
					while ($h_post = $db->fetch_array($hide_replied)){
						$myreplies += $h_post['count'];
					}
					$myreplies = vb_number_format($myreplies);
				}
				if($myreplies > 0){
					$hide_read = true;
				}
			
			if(!$bbuserinfo[userid]){
				$hide_read = false;
			}
			if( $hide_read == true){
				$hide_post = $db->query_first("SELECT pagetext as 'message' FROM ". TABLE_PREFIX ."post WHERE postid='$postid'");
				$hide_string = "#\[hide\](.*)\[\/hide\]#siU";
	            require_once(DIR . '/includes/class_bbcode.php');
	            $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
	            $hide_post['message'] = $parser->do_parse($hide_post['message'],true);
				if(preg_match_all($hide_string, $hide_post['message'], $hide_match)) {
					for($i=0; $i<count($hide_match[0]); $i++) {
						$hide_replace[$i] ="<fieldset>".$hide_match[1][$i]."</fieldset>";
						$hide_post['message']= str_replace($hide_match[0][$i],$hide_replace[$i],$hide_post['message']);
					}
				}
			}
			$ajax_on = true;
			$output = $hide_post['message'];
			echo "$output";
			exit;
		}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="126">
			<title>MARCO1 Hide BBCODE Functions (M)</title>
			<hookname>postbit_display_complete</hookname>
			<phpcode><![CDATA[if ($this->registry->options['MARCO1_BBHideon'] == '1' AND stristr($post['message'],'[hide]')){
			global $vbulletin, $vboptions, $bbuserinfo, $db, $threadid, $hide_call, $postid;
			$bbuserinfo = $this->registry->userinfo;
			$post = $this->post;
			$hide_read = false;
		
			$hide_replied = '';
		
                        
			$hide_stop = 0;
			if (!empty($this->registry->options['MARCO1_HideForumID'])){
				$MARCO1_Forum_NOHIDE = explode(" ",$this->registry->options['MARCO1_HideForumID']);
				if(in_array($thread['forumid'], $MARCO1_Forum_NOHIDE, true)){
					$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
					$hide_stop = 1;
				}
			}
			if($post['userid'] == $bbuserinfo['userid'] AND $hide_stop == 0){
				$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '<fieldset>\\1</fieldset>', $post['message']);
				$hide_stop = 1;
			}
			if ($hide_stop != 1){
				if ($this->registry->options['sid_hide_showadmin'] AND $bbuserinfo[usergroupid]==6){
					$hide_read = true;
				}elseif ($this->registry->options['sid_hide_showmod'] AND can_moderate($thread['forumid'])){
					$hide_read = true;
				}
				$MARCO1_NoHideUSG = split(',',$vbulletin->options['MARCO1_NoHideUSG']);
if ($vbulletin->options['MARCO1_BBHideon'] AND in_array($vbulletin->userinfo['usergroupid'], $MARCO1_NoHideUSG, true)){
						$hide_read = true;
					}
				}
				
					$hide_img_set = $hide_img_set + 2 ;
					$hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
					$myreplies = 0;
					if($db->num_rows($hide_replied)){
						while ($h_post = $db->fetch_array($hide_replied)){
							$myreplies += $h_post['count'];
						}
						$myreplies = vb_number_format($myreplies);
					}
					if($myreplies > 0){
						$hide_read['userid'] = true;
					}
				
				if (!$hide_call){
					$hide_call =$post['postid'];
				} else {
					$hide_call .=",".$post['postid'];
				}
				
				if(!$bbuserinfo[userid]){
					$hide_read = false;
				}
				if ($hide_read == true){
					$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '<fieldset>\\1</fieldset>', $post['message']);
				} else {
					
				$hide_fetch = $vbulletin->options['MARCO1_HIDEMESSAGE']; 

					$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', $hide_fetch, $post['message']);
				}
			}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>MARCO1 Print Pages Hide BBCODE Functions</title>
			<hookname>printthread_post</hookname>
			<phpcode><![CDATA[if($vbulletin->options['MARCO1_BBHideon']AND stristr($post['message'],'[hide]')){
			global $vbulletin, $vboptions, $bbuserinfo, $db;
			$bbuserinfo = $vbulletin->userinfo;
			$hide_read = false;
			$hide_stop = 0;
			$hide_img_set = 0;
			if (!empty($vbulletin->options['MARCO1_HideForumID'])){
				$MARCO1_hide_forum_stop = explode(" ",$vbulletin->options['MARCO1_HideForumID']);
				if(in_array($threadinfo['forumid'], $MARCO1_hide_forum_stop, true)){
					$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
					$hide_stop = 1;
				}
			}
			if($post['userid'] == $bbuserinfo['userid'] AND $hide_stop == 0){
				$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
				$hide_stop = 1;
			} 
			if ($hide_stop != 1){
			
					$MARCO1_NoHideUSG = split(',',$vbulletin->options['MARCO1_NoHideUSG']);
if ($vbulletin->options['MARCO1_BBHideon'] AND in_array($vbulletin->userinfo['usergroupid'], $MARCO1_NoHideUSG, true)){
						$hide_read = true;
					}
				
				
					$hide_img_set = $hide_img_set + 2 ;
					$hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]'");
					$myreplies = 0;
					if($db->num_rows($hide_replied)){
						while ($h_post = $db->fetch_array($hide_replied)){
							$myreplies += $h_post['count'];
						}
						$myreplies = vb_number_format($myreplies);
					}
					if($myreplies > 0){
						$hide_read['userid'] = true;
					}
				
			
				if(!$bbuserinfo[userid]){
					$hide_read = false;
				}
				
				 $hide_img = $vbulletin->options[MARCO1_HIDEMESSAGE];
				 
				if($hide_read == true){
					$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', '\\1', $post['message']);
				} else {
					$post['message'] = preg_replace('/\\[hide\\](.*)\\[\/hide\\]/siU', $hide_img, $post['message']);
				}
			}
		}]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
		<phrasetype name="vBulletin Settings" fieldname="vbsettings">
			<phrase name="setting_MARCO1_BBHideon_desc" date="1265211380" username="MARCO1" version="1.1"><![CDATA[Choose yes if you want to enable Hide BBCODE]]></phrase>
			<phrase name="setting_MARCO1_BBHideon_title" date="1265211380" username="MARCO1" version="1.1"><![CDATA[Enable MARCO1 Hide BBCODE ?]]></phrase>
			<phrase name="setting_MARCO1_HIDEMESSAGE_desc" date="1265211504" username="MARCO1" version="1.1"><![CDATA[That's the Hide content message that's will appear when you hide something using the Mod.]]></phrase>
			<phrase name="setting_MARCO1_HIDEMESSAGE_title" date="1265211504" username="MARCO1" version="1.1"><![CDATA[What's the Hide Message ?]]></phrase>
			<phrase name="setting_MARCO1_HideForumID_desc" date="1265675231" username="MARCO1" version="1.1"><![CDATA[Add Forum ID's of forums that you will not need to use BBCODE Hide Content on it.]]></phrase>
			<phrase name="setting_MARCO1_HideForumID_title" date="1265675231" username="MARCO1" version="1.1"><![CDATA[Excluding Forum of BBCODE Hide]]></phrase>
			<phrase name="setting_MARCO1_NoHideUSG_desc" date="1265677222" username="MARCO1" version="1.1"><![CDATA[<p>What's the Usergroups that's can view the hidden content without reply ?<br>
	<strong>Separate with ","</strong><br>
	<strong>By Default I allow Moderators, Admins and Super Moderators to see 
	hidden content without reply</strong></p>]]></phrase>
			<phrase name="setting_MARCO1_NoHideUSG_title" date="1265677222" username="MARCO1" version="1.1"><![CDATA[Usergroups Permissions]]></phrase>
			<phrase name="settinggroup_MARCO1_HIDEBBCODE_SETTINGS" date="1265211320" username="MARCO1" version="1.1"><![CDATA[MARCO1 Hide BBCODE Settings]]></phrase>
		</phrasetype>
	</phrases>
	<options>
		<settinggroup name="MARCO1_HIDEBBCODE_SETTINGS" displayorder="65535">
			<setting varname="MARCO1_BBHideon" displayorder="10">
				<datatype>free</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="MARCO1_HIDEMESSAGE" displayorder="20">
				<datatype>free</datatype>
				<optioncode>textarea</optioncode>
				<defaultvalue><![CDATA[<img src="images/hide.gif">]]></defaultvalue>
			</setting>
			<setting varname="MARCO1_HideForumID" displayorder="30">
				<datatype>free</datatype>
				<defaultvalue>0</defaultvalue>
			</setting>
			<setting varname="MARCO1_NoHideUSG" displayorder="40">
				<datatype>free</datatype>
				<defaultvalue>5,6,7</defaultvalue>
			</setting>
		</settinggroup>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>


4: Save the file
5: Upload again the new file using as always vb product manager and install it.

You can see a sample of a working mod HERE

Now all working as it should.

Do it and inform me if is OK...

Xtremecoders.org


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 11:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10142 seconds
  • Memory Usage 2,415KB
  • Queries Executed 27 (?)
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
  • (2)bbcode_code
  • (2)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (8)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete