joomla-extensions

Joomla setRedirect doesn't work

こ雲淡風輕ζ 提交于 2019-12-03 22:13:59
I have a simple Joomla controller, but I can't redirect anything. According to the documentation: class MyController extends MyBaseController { function import() { $link = JRoute::_('index.php?option=com_foo&ctrl=bar'); $this->setRedirect($link); } } //The url contains & html escaped character instead of "&" This should work, but I get a malformed URL. Is there something I'm missing here? Why is Joomla converting all the "&" characters into & 's? How am I suppose to use setRedirect? Thank you Alright, I fixed it. So if anyone needs it: instead of $link = JRoute::_('index.php?option=com_foo

How to get component parameters?

Deadly 提交于 2019-12-03 18:38:48
问题 I have a problem here and just cant solve it :-/ I am developing an Joomla component with backend. In the backend I set a parameter, the dashboardId , but I can't access them in the view. I always get data:protected (when I dump params ). It seems like I'm not allowed to access the object. Here is the default.xml : <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="Dashboard"> <message> <![CDATA[dashboard LAYOUT DESCRIPTION]]> </message> </layout> <fields name="params">

Add Custom Button to Joomla's Article Editor (TinyMCE)

天涯浪子 提交于 2019-12-03 16:58:23
问题 I'm trying to insert an additional button in Joomla's article editor. It's using the default TinyMCE plug in Extended mode. As you'll already know there are 4 buttons underneath the editor (Article, Image, Page Break and Read More). What I'd like to do is insert a 5th button. (I did attach a image button SO said I can't post as need a minimum of 10 rep points.) I have tried copying the Page Break Button plugin and renaming it etc, then re-installing it as a new plugin, but all that does it

how to use JHTML::_('behavior.modal') in Joomla?

蓝咒 提交于 2019-12-03 09:14:27
I am creating a component, controllers theatercontroller facilitycontroller Models theater facility view theater facility What I want is I want to add a new facility from the theater view by clicking a button and opening a modal window. I have tried but didn't work. I studied some components but it is difficult for someone like me to understand it. Please I need a simple example and a explanation to understand it. You can use this function to get a modal button static public function getModalButtonObject($name,$text,$link,$width=750,$height=480) { JHTML::_('behavior.modal', "a.{$name}"); //

Add Custom Button to Joomla's Article Editor (TinyMCE)

痴心易碎 提交于 2019-12-03 05:56:52
I'm trying to insert an additional button in Joomla's article editor. It's using the default TinyMCE plug in Extended mode. As you'll already know there are 4 buttons underneath the editor (Article, Image, Page Break and Read More). What I'd like to do is insert a 5th button. (I did attach a image button SO said I can't post as need a minimum of 10 rep points.) I have tried copying the Page Break Button plugin and renaming it etc, then re-installing it as a new plugin, but all that does it cause errors with TinyMCE and no button appears. Question : How do I insert the button? I've continued my

Joomla plugin : how to get article title and article id

橙三吉。 提交于 2019-11-30 15:51:47
问题 I have developed on simple plugin in Joomla 1.6 I stuck at : How to get article title and article url. I am getting no output if tried to print below statement: echo $article->title; echo $article->id; I have written this in php file, not used MVC architecture. Is there any other settings need to do in Joomla admin side ? Please suggest your pointers for extracting article title and article url. Thanks in advance! Pravin 回答1: i tried : public function onContentPrepare($context,&$article, &

Joomla plugin : how to get article title and article id

断了今生、忘了曾经 提交于 2019-11-30 15:20:35
I have developed on simple plugin in Joomla 1.6 I stuck at : How to get article title and article url. I am getting no output if tried to print below statement: echo $article->title; echo $article->id; I have written this in php file, not used MVC architecture. Is there any other settings need to do in Joomla admin side ? Please suggest your pointers for extracting article title and article url. Thanks in advance! Pravin h_45h i tried : public function onContentPrepare($context,&$article, &$params, $limitstart) { echo JRequest::getVar('id'); } Still I am not getting the id. Is this right? The

How to get component parameters?

风流意气都作罢 提交于 2019-11-29 23:51:20
I have a problem here and just cant solve it :-/ I am developing an Joomla component with backend. In the backend I set a parameter, the dashboardId , but I can't access them in the view. I always get data:protected (when I dump params ). It seems like I'm not allowed to access the object. Here is the default.xml : <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="Dashboard"> <message> <![CDATA[dashboard LAYOUT DESCRIPTION]]> </message> </layout> <fields name="params"> <fieldset name="params"> <field name="dashboardId" type="text" label="Dashboard ID" description="com_dashboard

How to install component and route plugin in one package?

旧街凉风 提交于 2019-11-29 15:42:34
I have created custom component and a route plugin for Joomla 1.5 to to provide SEO URLs for my component and also articles and categories which are not menu tied. Now I have to install my component and route plugin separately. Is there a way to install both in one package please? Thank you in advance! Vojtech When any extension installed Joomla triggers an event 'com_yourcomponent_install()' to your install file, which you have mentioned in xml file. write a function com_yourcomponent_install in which get the path of plugin folder and install it $installer = new JInstaller(); // Install the

save form field in component params joomla

半城伤御伤魂 提交于 2019-11-29 15:36:58
I am using joomla 2.5, I am working on custom component of joomla . I have created the form in backend admin page. what i need is , i want to save the post data of form in params row of that component in database of #_extensions . Here is my tables/component.php <?php defined('_JEXEC') or die('Restricted access'); jimport('joomla.database.table'); class componentTablecomponent extends JTable { function __construct(&$db) { parent::__construct('#__extensions', 'extension_id', $db); } public function bind($array, $ignore = '') { if (isset($array['params']) && is_array($array['params'])) { //