Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute Hooks on pages without Hooks.
#4
Carlos Wrote:
Code:
$sn=$_SERVER["SCRIPT_NAME"];
if (substr($sn,strrpos($sn,"/")+1)=="pages.php") {
    // ...
}
(checking the file with suffix -- 'pages.php' instead of 'pages')
You could probably get the suffix out as well (untested):
Code:
$sn=$_SERVER["SCRIPT_NAME"];
if (substr($sn,strrpos($sn,"/")+1,-4)=="pages") {
    // ...
}
Just for the sake of making it even easier and shorter.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
Execute Hooks on pages without Hooks. - by Carlos - 2011-06-15, 06:23:33
Execute Hooks on pages without Hooks. - by Zegnåt - 2011-06-15, 06:57:12
Execute Hooks on pages without Hooks. - by Carlos - 2011-06-15, 07:28:40
Execute Hooks on pages without Hooks. - by Carlos - 2011-06-15, 07:35:28



Users browsing this thread: 1 Guest(s)