joomla2.5

Prevent joomla api to log deprecated warning

◇◆丶佛笑我妖孽 提交于 2020-01-25 07:38:04
问题 I have joomla 2.5 which log many deprecated warnings like Error::raiseNotice() is deprecated. So I result width a big log file. Can I turn off this option, and log just my own exceptions? 回答1: You can always place an error reporting condition in your index.php like: error_reporting(E_ALL ^ E_DEPRECATED); For more info: http://php.net/manual/en/function.error-reporting.php Or you can edit error.php in your joomla directory, and public static function raiseNotice($code, $msg, $info = null) { //

Joomla - Where is the code in K2 which saves a new item's Title and alias

白昼怎懂夜的黑 提交于 2020-01-24 15:06:08
问题 I have looked every where in the administrator\components\com_k2 folder but am not able to find the code that saves a new item\article in K2. I checked the item.php file under models folder. No luck. I need to override the K2 item save method. I need a know the exact method that saves the Item's title and alias into the #__K2_content table. I have to duplicate the K2 items in joomla articles on save and remove on trash/delete. I have successfully been able to override the K2 core code. But am

Joomla 2.5 Custom Field List not SELECTED in display

て烟熏妆下的殇ゞ 提交于 2020-01-24 08:48:29
问题 I have a created a custom field type in my components "/models/fields/time.php" with the following php: defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); class JFormFieldTime extends JFormField { protected $type = 'time'; public function getInput() { return '<select id="'.$this->id.'" name="'.$this->name.'">'. '<option value="08:00:00" > 8:00 AM</option>'. '<option value="09:30:00" > 9:30 AM</option>'. '</select>'; } } and my course.xml (/models/forms/course.xml) as such: <field

Joomla 2.5 Custom Field List not SELECTED in display

空扰寡人 提交于 2020-01-24 08:48:07
问题 I have a created a custom field type in my components "/models/fields/time.php" with the following php: defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); class JFormFieldTime extends JFormField { protected $type = 'time'; public function getInput() { return '<select id="'.$this->id.'" name="'.$this->name.'">'. '<option value="08:00:00" > 8:00 AM</option>'. '<option value="09:30:00" > 9:30 AM</option>'. '</select>'; } } and my course.xml (/models/forms/course.xml) as such: <field

Joomla setRedirect doesn't work

会有一股神秘感。 提交于 2020-01-22 16:52:24
问题 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

How to redirect user after login in Joomla 2.5

天涯浪子 提交于 2020-01-17 08:41:06
问题 I have created custom Login module in Joomla 2.5 which appears using fancybox. Our site is using SEF URL. Now my problem is user is not redirecting to previous page where popup is trigger. I have used following code in my module and passed it to "return" parameter of login form. $uri =& JFactory::getURI(); $redirectUrl = urlencode(base64_encode($uri->toString())); <input type="hidden" name="return" value="<?php echo $redirectUrl; ?>" /> But it redirect with some value appended at the end of

Overriding Joomla core component file

邮差的信 提交于 2020-01-10 01:48:06
问题 I am trying to override the com_content/views/article/view.html.php file in joomla using the instructions given in this page It says I have to create a folder named 'code' in base directory and create the same directory structure. I tried it , but its not working. Can someone confirm whether its working. Where should I create code folder? Is it on root of joomla installations? PS- The edit is working correctly when applied on core file 回答1: You can override (nearly) any class in Joomla, if

Create a Joomla! Article Programmatically

牧云@^-^@ 提交于 2020-01-09 07:06:10
问题 I have created my own component. When I add a new record to my component, I also want it to create a new article in joomla (i.e. using com_content). I found this on stack overflow Programmatically adding an article to Joomla which explains how to do it. The code makes sense, and looks like it will work. The problem is that once methods start being called that are contained in com_content, all the relative URLs in com_content break down and joomla throws an error. Does anyone know a way to

Create a Joomla! Article Programmatically

╄→尐↘猪︶ㄣ 提交于 2020-01-09 07:06:10
问题 I have created my own component. When I add a new record to my component, I also want it to create a new article in joomla (i.e. using com_content). I found this on stack overflow Programmatically adding an article to Joomla which explains how to do it. The code makes sense, and looks like it will work. The problem is that once methods start being called that are contained in com_content, all the relative URLs in com_content break down and joomla throws an error. Does anyone know a way to

Create a Joomla! Article Programmatically

◇◆丶佛笑我妖孽 提交于 2020-01-09 07:05:59
问题 I have created my own component. When I add a new record to my component, I also want it to create a new article in joomla (i.e. using com_content). I found this on stack overflow Programmatically adding an article to Joomla which explains how to do it. The code makes sense, and looks like it will work. The problem is that once methods start being called that are contained in com_content, all the relative URLs in com_content break down and joomla throws an error. Does anyone know a way to