How to disable quoting by plugin?
#1
Hi
I need to disable possibility of quoting by a plugin. It concerns some posts with a special mycode. E.g. there are posts with a content what normal user can't see but if he use the reply button he will read the content. I suppose I could do it in newreply page, but I just prefer to remove the quote reply buttons.
Reply
#2
What about preg_replace?

$post['message'] = preg_replace("/\[quote\](.*?)\[\/quote\]/is", "", $post['message']);

I think that's the correct regex.
Reply
#3
Well, I'll do so as a last resort. But I asked about a way of removing [Image: postbit_quote.gif]. I think this method would be better but rather there isn't any hook Sad
Reply
#4
Just remove the code for it from the postbit and postbit_classic template:

{$post['button_quote']}{$post['button_multiquote']}
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#5
I don't want to do it for all posts. Maybe I described it bad Toungue
I want that some posts (with a special content - e.g. [download] tag) won't be quoted, because if a user clicks the reply button, he will see unparsed text (with something available only for premium accounts).
Reply
#6
Yes i made in my plugin something like that.

Use the hook

parse_quoted_message

Then in the function assigned try this.

$quoted_post['message'] = preg_replace('#\[dowload\](.*?)\[/download\]#is', "This content may not quoted in this forum", $quoted_post['message']);


On this form you put the code to replace and oly take the values for forums id where apply this task, thats all.

I do this for my plugin hidden content until reply. I hide the content of the hide tag, urls, attachments until reply a post xD. If you wanna try quote message or multiquote the displays the message you want or nothing xD.

I hope help you. Cheers.
Reply
#7
I found this hook already Smile This is what I meant.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)