Jump to content


Welcome to DevFuse Forums


Sign In  Log in with Facebook

Create Account
Welcome to DevFuse Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of DevFuse Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.
 
Guest Message by DevFuse

(View All Products)Featured Products

Donation Tracker


Help fund your forum with donations, setup goals and track member donations. Offer rewards for members donating.

Timeslip System


Have your members submit their race times and share with others. Intergrates with our Garage System.

Videos System


Allows your members to submit their own videos for community viewing. Support is included for all the major video sites.

Garage System


Setup a community Garage when members add their own vehicles with images and modifications.

Form Manager


Build your own forms for your members without coding experience. Support included for pm, email and topics.

Collections System


Build a community database of items for your members. Full features custom fields included.

Tutorial info Visit support topic

  • Added on: Dec 29 2010 04:12 AM
  • Views: 2020
 


Hiding links from guests.

This is a very shor tutorial which will teach you on how to hide both links and hidden codes in posts from unregistered users (guests)

Posted by ArpSofttt on Dec 29 2010 04:12 AM
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:

$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&section=login\' style=\'text-decoration:none;\'>Login</a> or <a href=\'index.php?app=core&module=global&section=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&section=login\' style=\'text-decoration:none;\'>Login</a> or <a href=\'index.php?app=core&module=global&section=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!

Powered by Tutorials 1.5.1 © 2013, by Michael McCune