Joomla
Saturday, 25 January 2014 11:08

Joomla: Apply plugin only to front-end / back-end

Written by
Rate this item
(15 votes)
Question How to apply a plugin only to front-end / back-end for a site Answer To apply plugin code only to front-end function onBeforeRender() { //apply only to frontend only $app = JFactory::getApplication(); if($app->isSite()) { Your code ----------------------- ----------------------- ----------------------- } } To apply plugin code only to back-end function onBeforeRender() { //apply only to backend only $app = JFactory::getApplication(); if(!$app->isSite()) { Your code ----------------------- ----------------------- ----------------------- } } To apply plugin code front-end and back-end function onBeforeRender() { //apply only to frontend only $app = JFactory::getApplication(); if($app->isSite()) { Your code ----------------------- ----------------------- ----------------------- } //apply only to backend only…
Rate this item
(16 votes)
Question: I developed a plugin extension for joomla article in that I controlled and modified some content but this control also refelect to k2 item page / other content. How to apply my plugin only to joomla article / k2 item Answer To apply plugin content only to joomla article use following code public function onContentAfterDisplay($context, &$article, &$params, $page = 0){ if($context == 'com_content.article'){ Your code here ----------------------------- ----------------------------- } } To apply plugin content only to k2 item use following code public function onContentAfterDisplay($context, &$article, &$params, $page = 0){ if($context == 'com_k2.item'){ Your code here ----------------------------- ----------------------------- } }…
Saturday, 25 January 2014 09:02

Joomla: Article auto publish

Written by
Rate this item
(15 votes)
Hi, Many of you suffer that how to auto publish an article when it is posted from Front-end. Many says Article not auto published I gave publish permission in component but still not automatically published I don't want to give publisher group to a user I can't/don't want to dynamically change user group for certain permission So what is the solution? Here is the solution its simple Component permission is an Iterative solution only. You should give as global permission  Go to your site backend for Joomla 1.6 to 2.5 Site > Global Configuration > permission > user_group > edit for…
Rate this item
(18 votes)
How to add multiple type of editors in single page This is the normal calling method of calling editor <?php $editor =& JFactory::getEditor(); echo $editor->display( 'body', '', '400', '150', '20', '20', false, $params ); ?> Here is the code how to call editor type <?php $editor =& JFactory::getEditor('your_editor_type'); echo $editor->display( 'body', '', '400', '150', '20', '20', false, $params ); ?> Sample code calling multiple editor <?php $editor =& JFactory::getEditor('tinymce'); echo $editor->display( 'body', '', '400', '150', '20', '20', false, $params ); ?> <?php $editor =& JFactory::getEditor('jce'); echo $editor->display( 'body', '', '400', '150', '20', '20', false, $params ); ?>
Read more for Ladbrokes the UK bookmakerLadbrokes UK - full information
BIGTheme - Free Templates

Our Services

  • Website Development
  • Extention Development
  • Joomla
  • Magento
  • Wordpress
  • Prestashop

Our Services

  • Thirdparty Integration
  • Social Apps

Who Online

We have 2 guests and no members online

Contact us

info@ilmtech.in