Page 1 of 1

Hide bbcode in Quick Quote

PostPosted: Mon Sep 14, 2009 5:23 am
Author: dungeon
Hai

I use the Hide bbcode from IM 41 but when a member use the Quote than the Hide is not visible thats oke
But when a member use the Quick Quote than de hide code is visible


the code from the mod for de normal Quote is


function hide_in_quote($text)
{
$text = preg_replace("#[hide](.*?)[/hide]#si","--- phpBB : The Protected Message is not copied in this quote ---", $text);
return $text;
}

function bbencode_third_pass($text, $uid, $deprotect)
{
global $bbcode_tpl;

// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;

// First: If there isn't a "[" and a "]" in the message, don't bother.
if (! (strpos($text, "[") && strpos($text, "]")) )
{
// Remove padding, return.
$text = substr($text, 1);
return $text;
}
// Patterns and replacements for URL and email tags..
$patterns = array();
$replacements = array();

if ( $deprotect ) {
$patterns[0] = "#[hide:$uid](.*?)[/hide:$uid]#si";
$replacements[0] = $bbcode_tpl['show'];
}
else
{
$patterns[0] = "#[hide:$uid](.*?)[/hide:$uid]#si";
$replacements[0] = $bbcode_tpl['hide'];
}

$text = preg_replace($patterns, $replacements, $text);

// Remove our padding from the string..
$text = substr($text, 1);

return $text;
}


How can i do it for the Quick Quote


Greetz Dungeon

Re: Hide bbcode in Quick Quote

PostPosted: Wed Sep 16, 2009 8:02 am
Author: dungeon
hai

my website is almost ready the last thing i have to do is this for the Quick Quote

Is there some one that can help me out so i can open my site



Greetz Dungeon

Re: Hide bbcode in Quick Quote

PostPosted: Thu Sep 17, 2009 8:17 am
Author: Michaelo
It's been a while.... I need to know a little about 'quick quote' ... is it a bbcode?
I have 141 running locally for testing but I don't see an option for quick quote so I don't know it the option is available to me...

I have never used the mod so I am a little lost but I know code so I may be able to help once I get the details...

Ideally I would need to add it to my test site or at least see it in action...

Helter, I assume this mod is not installed in 141 by default... I may need to install it based on the code in your pm...?
But what about the quick_quote (is this just the normal quick quote at bottom of post)?

Basically it should be a case of calling a function called hide_in_quick_quote($text)... which is just a copy of the function hide_in_quote($text).., at the appropriate time

Helter... I noticed I don't have root/mods/bbcode_box in my 141 copy... Am I missing something?

Re: Hide bbcode in Quick Quote

PostPosted: Thu Sep 17, 2009 9:05 am
Author: dungeon
Hai

I know the solution,
But how can i remove this button


[img=left:2g782k3v]http://www.spuwjegalonline.nl/test/knop.jpg[/img]

Re: Hide bbcode in Quick Quote

PostPosted: Thu Sep 17, 2009 12:54 pm
Author: dungeon
Hai

I have fix it

In viewtopic.php

i have remove 'QUICK_QUOTE' => $quick_quote,

Greetz Dungeon

Re: Hide bbcode in Quick Quote

PostPosted: Thu Sep 17, 2009 7:35 pm
Author: Helter
Mike, you should have
rootmodsbbcode_box
rootmodscontact
rootmodsnetclectic ...ect

I installed the hide bbcode mod on the .net site and the only added files are 2 images. The quick quote box should recognize all bbcodes, but I tried a post and using the "View Post" link in the top of the quote box brings up a .js window and does show the hidden text.
[hide:80d03a4967]this is a test[/hide:80d03a4967]