Thread Rating:
  • 3 Votes - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Hide Links in Post to users who haven't replied
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #1
Hide Links in Post to users who haven't replied
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

.php  hidelinkreply.php (Size: 13.07 KB / Downloads: 1878)

Older Versions
v1.0
.php  hidelinkreply.php (Size: 13.06 KB / Downloads: 1434)

My Blog
(This post was last modified: 03-09-2008 10:09 AM by ZiNgA BuRgA.)
01-26-2008 12:53 AM
Find all posts by this user
MyBB Us3r Offline
Junior Member
**
Posts: 19
Joined: Jan 2008
Post: #2
RE: Hide Links in Post to users who haven't replied
This is very useful for forums that revolve around downloads as it helps track down leechers and encourages discussions.
01-28-2008 06:35 AM
Find all posts by this user
Guest
Unregistered
 
Post: #3
RE: Hide Links in Post to users who haven't replied
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)
03-09-2008 02:01 AM
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Hide Links in Post to users who haven't replied
Hmm, looks like I didn't notice that one.
Download the updated file in the first post Tongue

My Blog
03-09-2008 10:09 AM
Find all posts by this user
Guest
Unregistered
 
Post: #5
RE: Hide Links in Post to users who haven't replied
When the module hide is active, why the signatures of the people do
not appear more?
03-14-2008 09:19 AM
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Hide Links in Post to users who haven't replied
Guest Wrote:When the module hide is active, why the signatures of the people do
not appear more?
Sorry I didn't understand you...

My Blog
03-14-2008 11:51 AM
Find all posts by this user
Guest
Unregistered
 
Post: #7
RE: Hide Links in Post to users who haven't replied
Im' sorry I'm french. When "hide links" is active , my problem is :

[Image: th_35941_signature_122_938lo.jpg]
03-15-2008 09:06 AM
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #8
RE: Hide Links in Post to users who haven't replied
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

My Blog
03-15-2008 10:43 AM
Find all posts by this user
Cohen
Unregistered
 
Post: #9
RE: Hide Links in Post to users who haven't replied
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?
03-16-2008 05:57 AM
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #10
RE: Hide Links in Post to users who haven't replied
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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
	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);


My Blog
03-16-2008 12:21 PM
Find all posts by this user

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: