Pages

Monday, January 10, 2011

Menghilangkan tp=1 pada Joomla

Ada berbagai tip menghilangkan atau mencegah user melihat blok template
joomla kita dengan /?tp=1.

Ada yang menggunakan .httaccess ditambahi :

RewriteCond %{QUERY_STRING} tp=(.*)
RewriteRule ^(.*)$ index.php [F,L]


Ada yang oprek core Joomla di file :
libraries/joomla/application/module/helper.php

baris 96-101 :

if(count($result) == 0) {
if(JRequest::getBool('tp')) {
//$result[0] = JModuleHelper::getModule( 'mod_'.$position );
//$result[0]->title = $position;
//$result[0]->content = $position;
//$result[0]->position = $position;

trus di baris 200-an

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


Tapi..cara yang paling yahuddd menuruhku dan simpel adalah :

BERILAH PERINTAH UNTUK MEMANGGIL VARIABEL tp ITU MENJADI NOL

Berikan baris perintah ini di baris awal blok php file index.php template
yang aktif

JRequest::setVar('tp',0);

0 comments:

Post a Comment