Invision Power Board: Hide Links
Product:
Invision Power Board
IPB version:
v2.3.x
Description:
Hide thread posted links from selected guest, eg. Guests, Banned users etc.
Let’s start here!
1. Open file: sources/lib/func_topic_linear.php
Find:
//----------------------------------------- // Print post row //-----------------------------------------
and add:
if($this->ipsclass->vars['bl_hide_links_on']){ if (in_array($this->ipsclass->member['mgroup'], explode(',', $this->ipsclass->vars['bl_hide_links_group']))){ $gelen=$row['post']; $post_array = preg_split('/(<a.*?<*a>)/', $gelen, 65535, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); for ($i=0; $i<=count($post_array); $i++){ if(strstr($post_array[$i], '<a')) $gelen = str_replace($post_array[$i], $this->ipsclass->vars['bl_hide_links_replace'], $gelen); } // replace code [CODE] $post_array = preg_split('/(<!--ec1-->.*?<!--c2-->)/', $gelen, 65535, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); for ($i=0; $i<=count($post_array); $i++){ if(strstr($post_array[$i],'<!--ec1-->')) $gelen=str_replace($post_array[$i], $this->ipsclass->vars['bl_hide_links_replace_code'], $gelen); } $row['post'] = $gelen; } }
2. Open file: sources/lib/func_topic_threaded.php
Find:
//----------------------------------------- // Print post row //-----------------------------------------
and add:
if($this->ipsclass->vars['bl_hide_links_on']){ if (in_array($this->ipsclass->member['mgroup'], explode(',', $this->ipsclass->vars['bl_hide_links_group']))){ $gelen=$row['post']; $post_array = preg_split('/(<a.*?<*a>)/', $gelen, 65535, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); for ($i=0; $i<=count($post_array); $i++){ if(strstr($post_array[$i], '<a')) $gelen = str_replace($post_array[$i], $this->ipsclass->vars['bl_hide_links_replace'], $gelen); } // replace code [CODE] $post_array = preg_split('/(<!--ec1-->.*?<!--c2-->)/', $gelen, 65535, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); for ($i=0; $i<=count($post_array); $i++){ if(strstr($post_array[$i],'<!--ec1-->')) $gelen=str_replace($post_array[$i], $this->ipsclass->vars['bl_hide_links_replace_code'], $gelen); } $row['post'] = $gelen; } }
Now, go to IPB Control Panel -> Tools & Settings -> XML settings file tools
and, upload this XML file: ipb_settings_partial.zip
Everything is done.
orakanggo 11:11 am on 8 January 2008 Permalink |
thanks dah ngisi komen lagi di blog saya mas, mungkin link ini http://orakanggo.wordpress.com/2008/01/08/menjadi-seorang-reverser/ dapat berguna buat sampeyan
Tufan 3:37 pm on 26 September 2008 Permalink |
Danke. Thanks. Teşekkürler.!
It’s working.!
Abu Ja'far 6:02 pm on 26 September 2008 Permalink |
@Tufan
your welcome…
Dean 2:10 am on 24 October 2008 Permalink |
thank you for this. Plugged it into my site and it worked right away. Great work!
Ghyoom 2:24 am on 21 February 2009 Permalink |
Thank you too match
Kayani 3:56 am on 19 April 2009 Permalink |
Thank you, worked perfectly. Version 2.3.5 the file func_topic_threaded, the
/ ——————
/ Print post row
/ ——————
is not in the file
look for
$row = $return[‘row’];
instead and paste after this line.
Sotamejissise 7:58 am on 24 April 2009 Permalink |
I’m the only one in this world. Can please someone join me in this life? Or maybe death…
Yandrie Rachman 3:02 pm on 26 December 2013 Permalink |
keren,,,