MyBB Hacks

Full Version: Hide Links in Post to users who haven't replied
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Well, I really don't like these things.  I personally think they're kinda silly.  Well, I just don't believe in trying to force activity on a forum.

But I'm always surprised at how many people want this - in fact, I've received a number of PMs from people requesting this.
Ahh well, it's not hard to make anyway Tongue

So here it is.

Features:
  • Admin can choose whether this only affects the first post, or all posts in the thread
  • Specifiable messages for posts and quotes
  • Will correctly parse out links even from multi-quoting across forums and threads
  • Links automatically shown to Mods/Admins
  • Will also hide stuff placed in [hide] tags
Of course, a simple work around is to post in the thread, grab the links, then delete the post...

Installation:
Simply upload to /inc/plugins and activate via the AdminCP.

v1.0.1
- Fixes issue with [hide] tags
[attachment=68]

Older Versions
v1.0 [attachment=29]
This is very useful for forums that revolve around downloads as it helps track down leechers and encourages discussions.

Guest

I love this plugin, but I have one problem. If you place the message like:
[hide]Message[/hide]
it wil be hidden.

But if you place it like:
[hide]
Message
[/hide]
it won't be hidden.

I would like it to be hidden in every way, with breaks or without. But what's the way to do that?

Supermonkey
(I'm sorry for my (bad) english, I'm a dutch student, and I have to learn more english Wink)
Hmm, looks like I didn't notice that one.
Download the updated file in the first post Tongue

Guest

When the module hide is active, why the signatures of the people do
not appear more?
Guest Wrote:When the module hide is active, why the signatures of the people do
not appear more?
Sorry I didn't understand you...

Guest

Im' sorry I'm french. When "hide links" is active , my problem is :

[Image: th_35941_signature_122_938lo.jpg]
Oh I see what you mean.  Yes, a side effect of disabling links in the parser is that signatures are affected too, unfortunately...

Unfortunately, I can't really think of any work around, sorry Ouch

Cohen

Hi,

nice mod. I have a question about it:

Is there a possibility to hide the text just in the [hide]tags[/hide] and not in the rest of the post???

I just want to use the tags to hide the text and I dont need the function to "Hide only the text in first post".

Can you help me?
You can do that by opening up hidelinkreply.php:
find:

PHP Code:
return preg_replace(array('#\<a href=".*?" target="_blank"\>.*?\</a\>#', '#\[hide\].*?\[/hide\]#si'), array($mybb->settings['hidelinkreply_postmsg'], $mybb->settings['hidelinkreply_postmsg']), $message);

replace with:

PHP Code:
return preg_replace('#\[hide\].*?\[/hide\]#si', $mybb->settings['hidelinkreply_postmsg'], $message);


Then find:

PHP Code:
	return preg_replace(array(
		"#\[url\]([a-z]+?://)([^\r\n\"\[<]+?)\[/url\]#i", "#\[url\]([^\r\n\"\[<]+?)\[/url\]#i",
		"#\[url=([a-z]+?://)([^\r\n\"\[<]+?)\](.+?)\[/url\]#si",
		"#([\s\(\)])(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\"\s\(\)<\[]*)?)#i",
		"#([\s\(\)])(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\"\s\(\)<\[]*)?)#i",
		'#\[hide\].*?\[/hide\]#si'
	), array(
		$mybb->settings['hidelinkreply_quotemsg'],
		$mybb->settings['hidelinkreply_quotemsg'],
		$mybb->settings['hidelinkreply_quotemsg'],
		$mybb->settings['hidelinkreply_quotemsg'],
		$mybb->settings['hidelinkreply_quotemsg'],
		$mybb->settings['hidelinkreply_quotemsg'],
	), $message);

Replace with:

PHP Code:
	return preg_replace('#\[hide\].*?\[/hide\]#si', $mybb->settings['hidelinkreply_quotemsg'], $message);

Pages: 1 2 3 4
Reference URL's