joomla2.5

Insert multiple rows using a single query

与世无争的帅哥 提交于 2019-12-06 22:38:20
问题 Can Joomla's DB object add multiple rows at once? MySQL can do this like so: INSERT INTO x (a,b) VALUES ('1', 'one'), ('2', 'two'), ('3', 'three') But can Joomla's own functions achieve the same thing in a single query? Currently I am doing a loop to insert each row (same table) in separate query. Not a good idea when dealing with tons of rows at once. 回答1: In your model you can do this: $db = $this->getDBO(); $query = " INSERT INTO x (a,b) VALUES ('1', 'one'), ('2', 'two'), ('3', 'three') ";

Is it possible to export already installed component in joomla 2.5?

两盒软妹~` 提交于 2019-12-06 15:42:00
I want to export a component that already installed in Joomla2.5 site. I've searched in google, and joomla forums, but not able to to find a relevent solution. Anyone knows how to export an installed component from joomla admin side? You can manually export by going to /components folder using ftp and copy component that you want to export. Admin component folder is administrator/components. And zip that folder. 来源: https://stackoverflow.com/questions/11239434/is-it-possible-to-export-already-installed-component-in-joomla-2-5

Several tables in JTable of joomla 2.5

眉间皱痕 提交于 2019-12-06 11:52:11
问题 I want to display/add/delete data from several table in MVC component, in JTable class: class HelloWorldTableHelloWorld extends JTable { function __construct(&$db) { parent::__construct('code', 'id', $db); //parent::__construct('#__fairinfo', 'flight_id', $db); //parent::__construct('hotelinfo', 'hotelid', $db); } } Constructor initializes the id's of tables for deletion and edition purpose. I have successfully displayed the data of three tables, but when I performed the deletion operation

article content not showing in joomla 2.5 after upgrading from 1.5 to 2.5

久未见 提交于 2019-12-06 11:01:34
I have an issue with my joomla 2.5 site. I upgrade my site from joomla 1.5 to 2.5 version. After upgrading, articles not displaying. It shows the article heading but not showing the content. I give the permissions to the site but it doesn't works. I got the real solution that is : go to the jupgrade/template/html folder and delete or rename the com_content folder Then it will work properly Thank you all Your site has following url structure http://keralacarpentry.com/freedom2/index.php?Itemid=2 But joomla component url structure is like this http://www.example.com/index.php?option=com_content

Upgrade / Migrate from Joomla 1.5.26 to Joomla 3.0.1

爱⌒轻易说出口 提交于 2019-12-06 07:31:27
问题 I have a joomla 1.5.26 site and want to upgrade over to Joomla 3.0.1. Is that possible? If so, what are the steps? I am looking for an installer like JUpgrade to do this. I realize that it is a 2 step process: a. Migrate from Joomla 1.5.26 to Joomla 2.5 b. Migrate from Joomla 2.5 to Joomla 3.0.1 Use JUpgrade for both the steps after backing up your files using Akeeba / XCloner component Am I right or am I missing a step? 回答1: It is better to stick with Joomla 2.5 as it is recommended till

joomla loadformdata

扶醉桌前 提交于 2019-12-06 05:09:45
how to show data from 3 tables in one view, because using JTable i can show data only bind to that JTable, please help me with this one. my code so far(not working) in models: public function getEntireProject(){ $item_id = $this->getItem()->id; $db =& JFactory::getDBO(); $query = $db->getQuery(true); $query->select('*'); $query->from('#__project_part_1 AS a'); $query->leftJoin('#__project_part_2 AS u ON a.uuid = u.uuid'); $query->leftJoin('#__project_part_3 AS y ON a.uuid = y.uuid'); $query->where('a.id = '. (int) $item_id); $db->setQuery($query); return $db->loadResult(); } protected function

Alternative layout for article based on category in Joomla 2.5

泪湿孤枕 提交于 2019-12-06 01:33:25
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 layout in 'Category' view of 'com_content' (as opposed to the layout of the articles WITHIN that

joomla module development with form - how to process

流过昼夜 提交于 2019-12-06 00:46:32
问题 I'm creating a simple Joomla 2.5 module that will have an html form. mod_mymodule/tmpl/default.php : <form method="post" id="myemailform" action=""> <label for="ReferralName">Enter Name:</label><input type="text" name="name" value="<?php echo modCamcloudReferralHelper::getReferralName(); ?>"> <label for="ReferralEmail">Enter Email Address:</label><input type="text" name="email"> <label for="ReferralMessage">Enter Message (optional):</label><textarea class="message"></textarea> <span class=

Joomla check for empty string with JInput

别等时光非礼了梦想. 提交于 2019-12-05 19:27:01
Following this guide to sanitize my inputs, I'm wondering if an empty string is covered with this? $jinput = JFactory::getApplication()->input; $this->name = $jinput->get('name', '', 'STRING'); Typically without Joomla I'd be checking for an empty string as well. Something like: if (!empty($_POST['name'])) Looking at the JInput get method I see that it checks if it is isset : public function get($name, $default = null, $filter = 'cmd') { if (isset($this->data[$name])) { return $this->filter->clean($this->data[$name], $filter); } return $default; } Not the same thing, as isset will only check

Add File Uploader to Joomla Admin Component

≯℡__Kan透↙ 提交于 2019-12-05 18:36:29
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 below. But its not working (can't retrieve file) Where am i doing it wrong ? How can i get file and save