joomla2.5

Set frontend session time out limit in joomla

狂风中的少年 提交于 2019-12-05 09:45:08
How to set session timeout limit for frontend users in joomla 2.5? I had set the Session Lifetime option in Global configuration but it sets the limit in backend only. Hari Rajagopal you can comment the line JHtml::_('behavior.keepalive'); on top in the file modules/mod_login/tmpl/default.php After that the time from the backend will also expires the frontend as well as backend Try this plugin. According to my knowledge. If you are to Session Control Plugin make the different session lifetime for different user group on your Joomla site. Session Control Plugin make the user group online all

Remove hasTip javascript code from Joomla

邮差的信 提交于 2019-12-05 06:48:54
Joomla 2.5 adds this code: window.addEvent('domready', function() { $$('.hasTip').each(function(el) { var title = el.get('title'); if (title) { var parts = title.split('::', 2); el.store('tip:title', parts[0]); el.store('tip:text', parts[1]); } }); var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false}); }); Now - I know I can edit the html behavior file: libraries/joomla/html/html/behavior.php to comment it out - but this isn't the best solution. Have tried but neither work: 1. http://flexicontent.org/forum/index.php?f=23&t=4909&rb_v=viewtopic 2. http://www.jsnippets.net

Joomla 2.5 calendar field type in custom form date and time selection

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 04:56:36
问题 I have two fields in my admin/componsents/com_xxxxx/models/forms/xxxxx.xml file. these feed into an input form for administrators on the back end of Joomla 2.5 <field name="f_start" type="calendar" class="inputbox" required="true" format="%Y-%m-%d %H:%M:%S" default="0000-00-00 09:30:00" label="COM_xxxxx_F_START" description="COM_xxxxx_F_START_DESC" filter="safehtml" /> <field name="f_end" type="calendar" class="inputbox" required="true" format="%Y-%m-%d %H:%M:%S" default="0000-00-00 19:30:30"

Insert multiple rows using a single query

核能气质少年 提交于 2019-12-05 03:06:06
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. In your model you can do this: $db = $this->getDBO(); $query = " INSERT INTO x (a,b) VALUES ('1', 'one'), ('2', 'two'), ('3', 'three') "; $db->setQuery($query); $db->query(); If you are outside your model you need to get the DB object like so:

Joomla getUser() does not show the updated user data

穿精又带淫゛_ 提交于 2019-12-05 02:25:55
问题 Below code allows me to show the user's name in the profile page of the Joomla profile of a user. Given that I have overridden the template to get the look and feel I want. $user =& JFactory::getUser(); if (!$user->guest) { echo 'You are logged in as:<br />'; echo 'Real name: ' . $user->name . ''; } My problem is I allow user to update his or her profile. After he updates the his name, database is updated correctly but it does not show the updated name in the profile page. When I go through

Joomla! JDatabase::getErrorNum() is deprecated, use exception handling instead

吃可爱长大的小学妹 提交于 2019-12-04 19:15:46
问题 I have the following code: $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('*'); $query->from('#__users'); $db->setQuery($query); // Check for a database error. if ($db->getErrorNum()) { JError::raiseWarning(500, $db->getErrorMsg()); } $result = $db->loadResult(); Now getErrorNum as well as JError are deprecated. Just to clarify, JError and $db->getErrorNum() are NOT deprecated in Joomla 2.5 but are in Joomla! 3.0. So this question has value for somebody who develops

Invalid token with Joomla custom component

邮差的信 提交于 2019-12-04 19:13:41
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 controller, the value of the token is the same: print_r(JUtility::getToken()); So if the token is the same

Several tables in JTable of joomla 2.5

谁都会走 提交于 2019-12-04 16:33:38
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 then only that table data is delete, which is initailized in JTable class, but if I add all tables and

Upgrade / Migrate from Joomla 1.5.26 to Joomla 3.0.1

天大地大妈咪最大 提交于 2019-12-04 13:03:56
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? Yesceeohhh It is better to stick with Joomla 2.5 as it is recommended till 2014. Here is statement quoted by joomla .org "Joomla 2.5 is the Long Term Support (LTS) version of

How to use cookies from a component?

試著忘記壹切 提交于 2019-12-04 11:19:37
问题 How can I use cookies in a Joomla component? setcookie( JUtility::getHash('JLOGIN_REMEMBER'), false, time() - 86400, '/' ); Can anybody describe how this works? 回答1: // Get input cookie object $inputCookie = JFactory::getApplication()->input->cookie; // Get cookie data $value = $inputCookie->get($name = 'myCookie', $defaultValue = null); // Check that cookie exists $cookieExists = ($value !== null); // Set cookie data $inputCookie->set($name = 'myCookie', $value = '123', $expire = 0); //