Include Yii framework in a Joomla module

Comparing #2 with #3

Revision #3 was created by zaccaria zaccaria on Jan 28, 2011, 1:06:23 PM.

minor

Content

[...]
RewriteRule yiimodule\.shtml$ /index.php?option=com_jumi&fileid=13&yiiPath=$1 [L]

RewriteRule ^yiimodule/([A-z_0-9/]+)\.shtml$ /index.php?option=com_jumi&fileid=13&yiiPath=$1 [L]
```

This will explain
YiiJoomla that for the path yiimodule he has to use the module with id 13, that means our application.

It will also take the path and passing to the application as the get paramter 'yiiPath'
[...]
------------------

Now our application can work using
get routing with get format, but it would be very nice to use url routingpath format. For achive it we have to use a custon CHttpRequest class':

Create a file in components named JHttpRequest with this content:
[...]
class JClientScript extends CClientScript
{
   public function registerCssFile($url, $media='') {
 
   {
 
      
JHTML::_('stylesheet', $filename = '', $path = $url , $attribs = array() );
 
   }    public function registerScriptFile($url, $media='') {
 
   {
 
      
JHTML::_('script', $filename = '', $path = $url , $attribs = array() );
 
   }
}
```


As you see, this function will invoke Joomla's methods for publishing css and script file.
[...]