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: #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 »

Messages In This Thread
RE: Hide Links in Post to users who haven't replied - ZiNgA BuRgA - 03-16-2008 12:21 PM

 Standard Tools
Forum Jump: