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/
i need working 1 part of code , catched other urls, however, i've got problem administrator folder.
thnx idea.
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:
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
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
Post a Comment