joomla-extensions

Whats is assignRef() function in joomla 2.5

若如初见. 提交于 2019-12-11 06:33:08
问题 i am trying to understand about how to develop custom components in joomla 2.5 and on the very first step i get stuck and i want to know what is the use assignRef() function and for more info click here <?php /** * @package Joomla.Tutorials * @subpackage Components * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1 * @license GNU/GPL */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); /** *

How to get Joomla K2 item as object on category page?

爱⌒轻易说出口 提交于 2019-12-11 02:57:26
问题 I need to get all the items of specific K2 category as object in templates/mytemplate/html/com_k2/default/category.php. Something like: foreach($this->category->items as $item) { echo $item->image; } but I dont' know API of K2 component. To get not only $this->leading or $this->primary or $this->secondary with their limits but ALL the items of the current category 回答1: You may get it with direct query to MySQL: $catid = $this->category->id; $db = &JFactory::getDBO(); $query = $db->getQuery

Joomla 1.5 com_user and importing user plugins like Joomla 1.6 and above

左心房为你撑大大i 提交于 2019-12-10 20:35:08
问题 When accessing com_users component in Joomla 1.6 and 1.7 on front-end the application automatically imports all plugins from 'user' group. Obviously it is very useful if one doesn't want to create a component to simply pass some variables to a plugin. Ok. let's make it simplier: User gets an activation link: http://example.com/index.php?option=com_users&task=edit&emailactivation=1&u=63&d077b8106=1 and clicks it. Of course the component will omit emailactivation and other params simply

How do you add fields to com_content in Joomla! with a plugin and store the data in its own table?

↘锁芯ラ 提交于 2019-12-10 10:33:38
问题 I'm running Joomla 1.7 and I know that it has the ability to add custom form fields to components with a plugin. There is a sample plugin located at: /plugins/user/profile This plugin allows you to put custom form fields on the user profile front end and back end and these fields are stored in a custom table. I created a similar plugin for user profiles and it worked perfectly. However, when I go to create a plugin like this for com_content, I am met with a problem. this is what my XML file

Add new image field to Joomla 1.7 com_content

試著忘記壹切 提交于 2019-12-08 20:33:31
问题 I'm trying to make some changes to com_content component of Joomla 1.7 There are not many docs on specific topic for Joomla 1.7 Maybe you could help me out on this one. I want to have a separate field for extra image in com_content, specifically to Featured view. In the administrator's part I managed to add the field - just in html, then into xml file and finally to DB. Now I'm trying to get that record displayed in my custom html view for Featured articles. I just used simple code echo $this

How to get component version from Joomla?

风格不统一 提交于 2019-12-08 10:37:57
问题 Is there some method to get components version by it's name? I tried a lot of examples but didn't find any that would work. The thing like JComponentHelper::getParams('com_mycomponent')->get('version') doesn't work as it retrieves values from jos_extensions.params row. My components version is only in jos_extensions.manifest_cache row... 回答1: You can use the following: Joomla 2.5: $parser = JFactory::getXMLParser('Simple'); $xml = JPATH_SITE .'/components/com_wrapper/wrapper.xml'; $parser-

How require_once in joomla2.5

邮差的信 提交于 2019-12-08 05:18:55
问题 I Have a problem about require_once in joomla. In this file php: components\com_test\views\__test_r5\tmpl\default.php I want to include some file using this code: require_once (JPATH_ROOT.DS.'/includes/General.php'); but require_once does not works 回答1: The path you are trying to include will evaluate to something like: joomla//includes/General.php . Notice the double slashes before "includes" . The constant DS is defined to be a directory separator. Try: require_once (JPATH_ROOT.'/includes

How do you add fields to com_content in Joomla! with a plugin and store the data in its own table?

感情迁移 提交于 2019-12-06 10:38:01
I'm running Joomla 1.7 and I know that it has the ability to add custom form fields to components with a plugin. There is a sample plugin located at: /plugins/user/profile This plugin allows you to put custom form fields on the user profile front end and back end and these fields are stored in a custom table. I created a similar plugin for user profiles and it worked perfectly. However, when I go to create a plugin like this for com_content, I am met with a problem. this is what my XML file looks like: <?xml version="1.0" encoding="utf-8"?> <form> <fields name="additionalinfo"> <fieldset name=

How to do the share extension to show the http shares and not the https?

空扰寡人 提交于 2019-12-06 07:56:28
I have this situations on Facebook Object Debugger: This one is if I input the http link and this one for https link The code of my joomla extension is: <?php /*------------------------------------------------------------------------ # mod_ofblikebutton - Optimized Facebook Like Button # ------------------------------------------------------------------------ # author: Optimized Sense # copyright: Copyright (C) 2013 http://www.o-sense.com. All Rights Reserved. # @license: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.o-sense.com # Technical Support: http://www.o-sense

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

╄→гoц情女王★ 提交于 2019-12-04 14:52:00
问题 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. 回答1: You can use this function to get a modal button static public function