How do I detect the URL in the address bar using PHP?
Posted: Thu Oct 26, 2006 2:48 am
Hello All
I'm looking to decet the URL in the address bar of the browser and when it contains a url specified by the $nodisplay variable the code mosLoadModules ( 'header', -2); will not run. Basically I don't know how to reference the URL.
I think I've made some headway - can anyone fill in the blanks (blanks = ???????????????).
So I need to add code that detects the current URL in the place of the ?????????????.
Just to warn you there may be other errors too.
I use Joomla CMS by the way and for what I want to do the module publishing functions aren't sufficient, the frontpage url is just an example I actually have to stop code running for specific pages within individual components.
Hope someone can help
Cheers
Paul
I'm looking to decet the URL in the address bar of the browser and when it contains a url specified by the $nodisplay variable the code mosLoadModules ( 'header', -2); will not run. Basically I don't know how to reference the URL.
I think I've made some headway - can anyone fill in the blanks (blanks = ???????????????).
So I need to add code that detects the current URL in the place of the ?????????????.
Just to warn you there may be other errors too.
I use Joomla CMS by the way and for what I want to do the module publishing functions aren't sufficient, the frontpage url is just an example I actually have to stop code running for specific pages within individual components.
Code: Select all
<html>
<head>
<?php
$url = ?????????????????;
$nodisplay = "index.php?option=com_frontpage&Itemid=1";
?>
</head>
<body>
<div id="header">
<?php
if
( $nodisplay == $url )
{
return;
}
else
{
mosLoadModules ( 'header', -2);
}
?>
</div>
</body>
</html>Hope someone can help
Cheers
Paul