Joomla

Call to undefined method JController::getInstance()

断了今生、忘了曾经 提交于 2019-12-21 12:04:07
问题 i seem to have tried everything. I am trying to learn how to create a new component and currently my folder structure looks like this (please note that the component does install). This is a picture of my folder structure: Ive closed some of it because i found it irelevant but please if you need to see whats inside of them please let me know. as i stated above the component does install without problems. however when i try to access it i get the following error: Fatal error: Call to undefined

Using Multiple Controllers in Joomla Component Development

我们两清 提交于 2019-12-21 06:37:07
问题 My structure has component.php in the root of my component. I am using the http://www.notwebdesign.com/joomla-component-creator/j15/index.php I feel the need to have multiple controllers to have cleaner code as I have around 12 tasks to be run. I am using multiple models and need to have multiple controllers. Anyone who can point me in the right direction? Sample code highly appreciated. 回答1: You need to make a folder in your component's main directory (e.g. components/com_mycom/controllers/.

How does Joomla Model View Controller (MVC) work?

£可爱£侵袭症+ 提交于 2019-12-20 09:04:21
问题 I am new to Joomla, I want to know how the Joomla controller passes data to the model, model to controller and controller to view. Although this might be a silly question, I really tried to find the answer. I hope I can get some help from the stackoverflow family. 回答1: The controller picks up the view variable in the url and using these determines which view needs to be used. It then sets the view to be used. The view then calls the model to fetch the data it requires and then passes this to

joomla i am bussy making mij own rating system

馋奶兔 提交于 2019-12-20 07:49:12
问题 hello im bussy making my own rating system bud i dont know how i get a to mij model can some one help me this mij code controller/beer.php <?php defined('_JEXEC') or die; class BierapiControllerBeer extends JControllerLegacy { function save() { JRequest::checkToken() or die ('verkeerde token'); $date = $this->input->post_ > get('jform', array(), ' array'); $model = $this->getModel(); if ($model->save($date)) { $this->setMessage('save succes'); } else { JError::raiseWarning('', 'save gevaald/>

Joomla 2.5 ajax file upload

天大地大妈咪最大 提交于 2019-12-20 07:12:32
问题 I want to upload files through a component that I'm developing on Joomla 2.5, I need to support not HTML5 browsers without flash. On Joomla 1.5 I successfully used this method , but on J2.5 after upload the file, when the json response is returned, instead of upload my page, it just shows the download dialog for joomla.json file. How can I successfully recieve the json response on the inner iframe? Thanks! Edit: this is the code I'm using: showUploadImage is executed after the page is loaded,

Joomla 2.5 ajax file upload

依然范特西╮ 提交于 2019-12-20 07:12:03
问题 I want to upload files through a component that I'm developing on Joomla 2.5, I need to support not HTML5 browsers without flash. On Joomla 1.5 I successfully used this method , but on J2.5 after upload the file, when the json response is returned, instead of upload my page, it just shows the download dialog for joomla.json file. How can I successfully recieve the json response on the inner iframe? Thanks! Edit: this is the code I'm using: showUploadImage is executed after the page is loaded,

Database script for Joomla upgrade from 1.7 to 2.5?

此生再无相见时 提交于 2019-12-20 06:36:53
问题 I am looking for the script that does the database changes and upgrades the Joomla installation from Joomla 1.7 to Joomla 2.5. Thus I am not looking for changes in the code as I can check those from SVN. Having access to this script can allow me to just run these scripts on the server where I cannot run the automatic upgrade from Joomla admin. Update: As @Elin indicated. Snapshot of the sql folder under com_admin. Which sql queries are executed from here? Thanks. 回答1: Look in the sql folder

How to pass Joomla parameters to an iframe (wrapper) page?

萝らか妹 提交于 2019-12-20 06:05:22
问题 I try to fetch my users information using the getUser() function with a php script located in a iframe (wrapper) of Joomla. It seems there is problem passing parameters to iframe code. The only way I can catch user informations is to insert the code into a basic article (which is not an iframe). The var_dump($user); output shows : object(JUser)#17 (23) { ["isRoot":protected]=> NULL ["id"]=> int(0) ["name"]=> NULL ["username"]=> NULL ["email"]=> NULL ["password"]=> NULL ["password_clear"]=>

using paypal button - can my webpage tell if paypal transaction was successful or not?

↘锁芯ラ 提交于 2019-12-20 05:23:11
问题 I am using joomla and have brought a component which allows users to post listings on my site. The plugin uses a credit system to pay for the listing but the credit system is quite complex and confusing so i have disabled it. I found that PayPal provides some code which inserts a Buy Now button on any webpage :) perfect, just what i wanted! The only problem I am having is at the moment the button is displayed on my Add Listing form (which is again part of the component) but it can easily be

How to extend Joomla! to my custom PHP file

守給你的承諾、 提交于 2019-12-19 11:51:53
问题 I have a php file i created. I want to extend all the Joomla! classes to that file. Or i at least want to be able to use Joomla's class for accessing the database within my PHP file. How can I extend the functionality that way? Thanks in advance. 回答1: put these lines on top of your php file define( '_JEXEC', 1 ); define('JPATH_BASE', dirname(__FILE__).'/../../../../' ); // should point to joomla root define( 'DS', DIRECTORY_SEPARATOR ); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php