How to disable ?tp=1 in Joomla

We covered how to show your published module positions using ?tp=1 in a previous post.

Now, a few weeks have passed and for some reason you are hyper paranoid and want to know how to hide it.  My first thought is to tell you that there are far more important things to be worrying about, but to each his own.  *shrugs*

The easiest way is to add this to your Joomla .htaccess file.

##### Start ?tp=1 prevention ######
RewriteCond %{QUERY_STRING} tp=(.*)
RewriteRule ^(.*)$ index.php [F,L]
##### End ?tp=1 prevention ######

You may need to change it from htaccess.txt to .htaccess first.  If your site goes down after changing the file name or has odd behaviors it’s time for you to do some reading on what .htaccess is and how to use it.  This article has a lot of good info on the file and it’s proper usage.

I have heard about the previous method not working well for everybody in all situations.   Maybe you don’t want to use SEO urls.  Maybe you don’t want to read about htaccess and it’s proper usage. 

Another alternative is to do a core hack.

Go to /libraries/joomla/application/module/helper.php and look around line 200 for this code.

//dynamically add outline style
if(JRequest::getBool('tp')) {
$attribs['style'] .= ' outline';
}

Comment out the 3rd line out with //

//dynamically add outline style
if(JRequest::getBool('tp')) {
//$attribs['style'] .= ' outline';
}

Keep in mind this is a core hack. If you upgrade or patch your Joomla install, this hack will get deleted.

Finally, if all this code confuses you or is a hassle, you might want to try out Morph from JoomlaJunkie. This feature, as well as hundreds of other tweaks are built right into it.

About the author

3 Comments

  1. Hi
    Is the htaccess modification compatible with sef url’s?

    Thanks and regards

  2. Thanks a lot ….
    What about the security option in joomla sites?

Trackbacks/Pingbacks

  1. View module positions on a Joomla site with ?tp=1 | Joomla Tips - [...] the sites javascript.  Pretty cool stuff. Want to disable this functionality for some reason?  Check out this post. Tip …
  2. Tweets that mention How to disable ?tp=1 in Joomla | Joomla Tips -- Topsy.com - [...] This post was mentioned on Twitter by Saurabh Shah and Joomla Tips, Pete Coutts. Pete Coutts said: RT @JoomlaTips: …
  3. Where is that Joomla module published? 3 simple ways to find out. | ProThemer Team Blog - [...] posted a new blog post about how you can disable ?tp=1 in Joomla, but for all of you using …
  4. how to disable tp=1 in joomla « MahastMahast - [...] source : http://joomlatips.com/2010/core-tips/how-to-disable-tp1-in-joomla [...]

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>