Joomla

Joomla 2.5 displays wrong datetime

怎甘沉沦 提交于 2019-12-30 05:14:24
问题 I have Created this code in a custom component that I made: $date = date('m/d/Y h:i:s a', time())."<br>"; echo 'Current date and time is: ' . $date; $date = JFactory::getDate(); echo 'Current date and time is: ' . $date->toFormat() ."<br>"; The first code displays the datetime correctly, but the second one displays the time +3 hours I have checked the configuration.php file and the public $offset = 'Europe/Athens'; and is correct. I am also changing the settings from the system configuration

Difference between components, modules, extensions and plugins in Joomla

╄→尐↘猪︶ㄣ 提交于 2019-12-29 11:34:08
问题 What is the difference between Joomla components, modules, extensions and plugins? 回答1: Plugins Plugins enable you to execute code in response to certain events, either Joomla core events or custom events that are triggered from your own code. This is a powerful way of extending the basic Joomla functionality. Components Components are the main functional units that display in your template, like the content management system, contact forms, Web Links and the like. They are usually displayed

Joomla! - Import users from CSV file

倖福魔咒の 提交于 2019-12-29 09:33:24
问题 I am running Joomla! 2.5.1 for my website. I wish to have this mass-registration function which allows administrators to import users from a CSV file. I know there's many extensions available for what I've mentioned above. But I want to be able to add custom fields such as "company name", "position in company", etc. How can I do this? Is there any FREE extension which can do this? 回答1: There are a few components that will allow you to automatically import users from a CSV: J-Import: http:/

Load Joomla 3.x Framework and Modules in external PHP file

…衆ロ難τιáo~ 提交于 2019-12-29 07:53:06
问题 I am migrating my Joomla 2.5 site to Joomla 3.3. Now I'm struggling with loading the joomla framework and displaying a module in a phpbb-Template. Loading the Joomla framework worked fine in Joomla 2.5 with this code: define( '_JEXEC', 1 ); define('JPATH_BASE', '/var/customers/webs/tf2swiss/joomlasite'); define( 'DS', DIRECTORY_SEPARATOR ); require_once('../configuration.php'); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework

How to use multiple models in joomla MVC Component

做~自己de王妃 提交于 2019-12-29 06:29:28
问题 I am using different model in joomla than view's own model that is similar to its name by assigning it from controller, like: $view->setModel($this->getModel('user')); Now how can I use its method getSingleUser($user_id) in view. In an example in joomla documentation , it is using is some thing like this: $this->get("data1","model2"); So I assume data1 is name of method in model2? If so then how can I pass argument that is userid in my case. I know this is easy thing that many of joomla

How to use multiple models in joomla MVC Component

孤者浪人 提交于 2019-12-29 06:29:07
问题 I am using different model in joomla than view's own model that is similar to its name by assigning it from controller, like: $view->setModel($this->getModel('user')); Now how can I use its method getSingleUser($user_id) in view. In an example in joomla documentation , it is using is some thing like this: $this->get("data1","model2"); So I assume data1 is name of method in model2? If so then how can I pass argument that is userid in my case. I know this is easy thing that many of joomla

Error uploading big extensions to joomla on a localhost

可紊 提交于 2019-12-25 16:55:49
问题 I get the following error when I tried uploading the Akeeba Backup extension on my localhost: "There was an error uploading this file to the server." I tried uploading JCE Editor and it worked fine. I understand this error appears because I cannot upload extensions bigger than X MB (JCE is 1,5MB and Akeeba is 2,25MB). So my guess is I cannot upload extensions bigger than 2MB. Researching I came across two solutions, neither worked for me. First solution: In the file ini.php find the following

Joomla 3: How do I use the raw format without adding format=raw to the URL?

笑着哭i 提交于 2019-12-25 12:43:02
问题 I would like to load view.raw.php as a raw view just like if I has appended view=raw to the URL. But I would like to do it without adding view=raw to the URL. I have tried the following inside my main controller and none work: First I tried this: JFactory::$document = null; JFactory::getDocument(); Then I tried this: $input = JFactory::getApplication()->input; $input->set('format', 'raw'); And this: $_REQUEST['format'] = 'raw'; And this: $urlparams['format']='raw'; $urlparams[]=array('format'

Loading an article into a components template in Joomla

荒凉一梦 提交于 2019-12-25 11:57:42
问题 i would like to load an article into a components templates php code within the Joomla framework. I can load modules in php, modules in articles, components in articles and and..but i never wanted to load an article into a components php. Does anybody know of a code snippet for that? Appreciate any help. 回答1: I would load the article model in your view like JModelLegacy::addIncludePath(JPATH_SITE.'/components/com_content/models', 'ContentModel'); $model = JModelLegacy::getInstance('Article',

Migrating from Joomla 2.5 to 3x Generating Errors

只愿长相守 提交于 2019-12-25 11:14:27
问题 Trying to migrate some of the custom components which works well in Joomla 2.5.14 to Joomla 3.1.5, however getting some errors like - 404 component not found in Joomla Backend & other errors in frontend Is there any migration guide from Jooma 2.5 to 3x series, of what changes need to be done in custom components Front End Section of Site 1st error Notice: Use of undefined constant DS - assumed 'DS' in forms.php 2nd error Warning: require_once(com_formsDScontroller.php) [<a href='function