joomla2.5

Joomla MySQL Performance

无人久伴 提交于 2019-12-10 16:43:36
问题 I have been developing a Joomla site with version 2.5.11.Site will be under very high traffic. My problem is about MySQL query performance. Database includes about 60000 rows in content table, and the query seen below (core com_content articles model query) execution time is about 6 seconds.Very slow. SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, CASE WHEN a.modified = 0 THEN a.created ELSE a

Joomla 2.5 ― using administrator components controllers in frontent part of component

爱⌒轻易说出口 提交于 2019-12-10 15:28:25
问题 how can I use the controllers created at /administrator/components/com_mycom/controllers/* in /components/com_mycom/mycom.php In detail: I have a »log« controller with an »add« method, and I would like to use this from the frontend. I one is not logged in in the backend the task is not executed and a 500 error rises. So just would like to include the backend controllerpath in the frontend, so that JController::getInstance( 'Mycom' ) still works. Greetings… EDIT: After a long time of searching

How to create a custom form field type in a module?

∥☆過路亽.° 提交于 2019-12-10 12:50:19
问题 Im useing joomla 2.5, and I want to create a custom form field type that stored in the same module. In the XML: <fieldset name="basic" addfieldpath="/modules/mod_royalslider/fields"></fields> <fieldset name="basic"> <field name="title" type="City" label="anythging" description="" /> </fieldset> </fields> In the file /modules/mod_royalslider/fields/city.php <?php // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); jimport('joomla.form.formfield');

Alternative layout for article based on category in Joomla 2.5

人走茶凉 提交于 2019-12-10 10:25:30
问题 I currently have 2 'layouts' for articles in my Joomla 2.5 install default.php default_links.php feature_link.php feature_link.php which work as intended when each is selected in the 'Edit Article' screen of the 'Article Manager' under 'Alternative Layouts'. However, I'd like articles in a certain category to automatically display using one layout, and all other articles to display using the other. I see you can select 'Alternative Layout' under the 'Category Manager', but this specifies the

Add File Uploader to Joomla Admin Component

折月煮酒 提交于 2019-12-10 10:19:42
问题 I made Joomla admin component according to Joomla guide - http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Developing_a_Basic_Component In that i need to have file uploader which let user to upload single file. In administrator\components\com_invoicemanager\models\forms\invoicemanager.xml i have defined <field name="invoice" type="file"/> In the controller administrator\components\com_invoicemanager\controllers\invoicemanager.php im trying to retrieve that file like

Invalid token with Joomla custom component

只愿长相守 提交于 2019-12-09 23:19:58
问题 I'm building a custom Joomla component and I added this to my form in my template (default.php) file (it is using a HTTP POST): echo JHTML::_( 'form.token' ); //add hidden token field to prevent CSRF vulnerability Then I check the token in my controller with: JRequest::checkToken() or die( 'Invalid Token' ); But no matter what I do I get an Invalid Token. I have verified that a hidden type with a token is created in my form when I view sources on the html page. I also verified, in the

How to edit Edit Profile And View Profile page (Joomla 2.5)

泪湿孤枕 提交于 2019-12-09 23:14:43
问题 I have created web-application using Joomla 2.5. In that I have used Joomla user management. I have kept menu as View Profile & Edit Profile (Menu Item Type as Users Manager » User Profile). The problem is when I click on View Profile, I get un-wanted data also as shown below. Basic Settings Editor: Editor - JCE Time zone: No Information Entered Frontend language: No Information Entered Backend Template Style: No Information Entered Backend language: No Information Entered Help Site: No

Joomla: Call helper function from within a model?

二次信任 提交于 2019-12-09 18:24:03
问题 I'm starting off with both php and Joomla development, and finding it difficult working within Joomla to do some fairly simple stuff. Went through the Joomla MVC example and Lynda (and have built a few simple views so far). I have a helper file/class/function that outputs all the userids that exist in the "completed" table so I can display a link for either a new record based on that user or edit an existing user's record. I've already used a different function in this helper file

How to Get User Group Names in Joomla 2.5

回眸只為那壹抹淺笑 提交于 2019-12-09 16:12:20
问题 I'm writing a Joomla 2.5 component that I had been developing in Joomla 1.7. I have been using code like this: $user = JFactory::getUser(); $groups = $user->get('groups'); The $groups array would contain a list of ids with the group name as the index. Joomla 2.5 seems to have scrapped this functionality. I have been unable to find out how to get the group names without directly querying the database. Is there any method for getting a list of the groups a user is a member of without having to

show only the content of article

一曲冷凌霜 提交于 2019-12-09 01:16:44
问题 how do I only show content in a single article? I am using Joomla 2.5 and Ajax to call a single article, but when I render the article in a <div> tag, I render again the header, the footer and all the page , but I only want the content. How do I configure the page or the article to show only the content? 回答1: If you only want to get component you can append tmpl=component parameter with the url. Your article url will be like this- index.php?option=com_content&view=article&id=1&tmpl=component