You will have to edit one file:
/admin/applications/forums/modules_public/forums/topics.php
First, make a backup file so that if anything goes wrong, you can replace it...
After doing that, find this line of code:
Above that line, add following code:
Final result, all the guests will see this message instead of links:
Please Login or Signup to see this Hidden Link!
Please Login or Signup to see this Hidden Code!
/admin/applications/forums/modules_public/forums/topics.php
First, make a backup file so that if anything goes wrong, you can replace it...
After doing that, find this line of code:
$template = $this->registry->output->getTemplate('topic')->topicViewTemplate( $this->forum, $this->topic, $post_data, $displayData );Above that line, add following code:
if (!$this->memberData['member_id'])
{
foreach($post_data as $k => $postData)
{
foreach($postData as $key => $post)
{
$post_data[$k][$key]['post'] = preg_replace('#<pre class=\'prettyprint\'>(.*?)</pre>#', ' <font color=\'red\'><b>Please <a href=\'index.php?app=core&module=global§ion=login\' style=\'text-decoration:none;\'>Login</a> or <a href=\'index.php?app=core&module=global§ion=register\' style=\'text-decoration:none;\'>Signup</a> to see this Hidden Code</b></font> ', $post['post']);
}
}
}
if (!$this->memberData['member_id'])
{
foreach($post_data as $k => $postData)
{
foreach($postData as $key => $post)
{
$post_data[$k][$key]['post'] = preg_replace('#<a(.*?)rel=\'nofollow external\'(.*?)<(.*?)a>#', ' <font color=\'red\'><b>Please <a href=\'index.php?app=core&module=global§ion=login\' style=\'text-decoration:none;\'>Login</a> or <a href=\'index.php?app=core&module=global§ion=register\' style=\'text-decoration:none;\'>Signup</a> to see this Hidden Link</b></font> ', $post['post']);
}
}
}Final result, all the guests will see this message instead of links:
Please Login or Signup to see this Hidden Link!
Please Login or Signup to see this Hidden Code!











