I am working on a client's website which is based on the Joomla 2.5 framework. With SEF turned off (the in built Joomla version) the URL is this
Code: Select all
http://(domain)/index.php?option=com_cmgroupbuying&view=alldeals&Itemid=424
The user has a plugin, I have built into a plugin the line to make sure this plugin only fires when the component CMGroupbuying is in use
Code: Select all
$component = JRequest::getCmd('option');
if($component =='com_cmgroupbuying')
{ etc etc }
With SEF turned off, this works beautifully. However when I enable SEF the URL turns into
and the detection script stops working as joomla just no longer sees the Request::getCmd('option'); being equal to com_cmgroupbuying which to be honest, blows me away as it renders getCmd totally useless. I have seen other people suffer with this in the part but not found any definitive fix. I have seen some folks quote that 'JRequest works with or without SEF, but I am seeing otherwise
Can anyone offer a solution to stop this failure of Joomla, either by some extra lines in the DEFAULT htaccess fault to retain this information for joomla to use, or maybe detecting part of the URL so I can build a detector script from that, or any way to fix this using other clever methods
Many thanks