How to find your site’s absolute path in Joomla ?

One common issue occurs while you install a module or plugin in Joomla is that you get error message “JFolder::create: Could not create directory”. This occurs because you don’t have write permission on tmp foler. If you have write permission on tmp folder and still you get this error then check path of tmp folder. … More How to find your site’s absolute path in Joomla ?

How can check that Joomla component is active or not ?

In Joomla programming sometime you need to check that component is active or not. Because it is good practice to check first the component is active , instead of getting errors in module. JComponentHelper class has a useful function to perform this task. Following example will shows how to check. if (!JComponentHelper::isEnabled(‘com_test’, true)) { return JError::raiseError(JText::_(‘Test … More How can check that Joomla component is active or not ?

Load Joomla liabrary files into module/plugin

jimport() is a core function of joomla and used to load joomla library files. For example : jimport( ‘joomla.plugin.helper’ ); this syntax will load the file “helper.php” from the joomla liabrary path like : your_site\libraries\joomla\plugin now you can use this library file functions like as follows : // Import the user plugin group. JPluginHelper::importPlugin(‘user’); // Get the dispatcher. … More Load Joomla liabrary files into module/plugin

How to use Joomla Model function into a module or plugin ?

You can use Joomla model function into a module/plugin or another joomla extension using following code. Following example shows us how to show a joomla article in a custom extension. jimport(‘joomla.application.component.model’); JModel::addIncludePath(JPATH_SITE . ‘/components/com_content/models’); $Model = JModel::getInstance(‘Article’, ‘ContentModel’); $articleId = ‘1’; //We used here ‘1’ article id $article = $Model->getItem($articleId); echo $article->introtext; Output : [ … More How to use Joomla Model function into a module or plugin ?