plugin event to check administrator's URL? - Joomla! Forum - community, help and support


i'd tried maybe of plugin events, i'm noot able working, when checking administrator url. mean: http://www.example.com/administrator/ or in case: http://localhost/joomla/administrator/

code: select all

defined('_jexec') or die;
class plgcontentnotfinishedplugin extends jplugin{
   
   public function ...? know 1 event?

i need working 1 part of code , catched other urls, however, i've got problem administrator folder.

code: select all

if (strpos($_server['request_uri'], 'administrator') !== false){
//do something
}


thnx idea.

what trying accomplish? if need check if you're in administration area, use this:

code: select all

$app = jfactory::getapplication();
if($app->isadmin()){
//do something
}


otherwise if need check url, use juri:
https://docs.joomla.org/juri/current
https://docs.joomla.org/juri/getinstance
https://docs.joomla.org/juri/tostring





Comments

Popular posts from this blog

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support