extensions - Manage the Back End- Part 1
Sviluppare in Joomla!
Home Chi Siamo L'offerta Preservare... PortFolio Il vostro sito con Joomla! E-commerce Migrazione a Joomla! 1.5 Moduli Opzionali F.A.Q. Galleria Immagini Contatti Domande Frequenti L'Open Source Il modello economico I vantaggi TYPOLIGHT !! Ristoranti e Alberghi su CenoFuori
Home sviluppo Joomla! Esempi e trucchi >> ITALIAN VERSION Joomla! Generatore di Componenti Creare componenti per Joomla! 1.5 - Il Componente di Esempio Creare componenti per Joomla! 1.5 - Gestire il front end Creare componenti per Joomla! 1.5 - Gestire il back end - parte 1 Ripristare un hack su Joomla! >> ENGLISH VERSION Joomla! component builder Create components for Joomla! - The example component Create components for Joomla! - Managing the front end Create Joomla! extensions Manage the Back End- Part 1 Marco's noFollow plugin for Joomla! 1.5 SQL Injection and LFI protection
1 of 3
8/28/2010 9:15 PM
and the Joomla! framework then loads the following files: / administrator / components / com_ccat / views / ccatbrands / view..Manage the Back End. __LINE__). __FILE__.. 2.. which receives the requests that must be managed by the component. then loads the specified controller. is invoked the method display() in file /administrator/components/com_ccat/controllers/ ccatbrands..Manage the Back End. which contains the code needed to perform the following tasks ($ task): edit (): call the controllorer for editing of individual record save () saves the information of each record [to eliminate in the next release] remove (): delete individual records [to be deleted in the next release] publish (): it publish individual records unpublish (): Hides the individual records orderup (): Move through records (requires ccatbrand model. / / Define default controller & view . if (!JRequest: getword ( 'controller')) ( JRequest:: setvar ( 'controller'.execute(JRequest::getVar ( 'task')) is executed. / / JRequest:: setvar ( 'view'.
Create Joomla! extensions .
.php / administrator / components / com_ccat / views / ccatbrands / tmpl / default. The file generated by Joomla Component Builder includes a die () to remind us where to make changes. because. the work for the entry point is quite more difficult than front-end.
2 of 3
8/28/2010 9:15 PM
. in the file /components /com_ccat/ccat. The controller call the method display() of the class CcatViewCcatbrands in /components/com_ccat/views /ccatbrands/view. among others.Managing the Back .php 3. insert here! ( 'controller')).
Instead of three asterisks we enter the name for the default controller..php. views and templates for editing. JRequest: getword )
'After line n.Part 1
http://www. when statement $controller->.mmleoni.php] die ( 'Insert the default view in'.php / administrator / components / com_ccat / models / ccatbrands. Remember to remove or comment out the line with die ().Part 1
Creating extensions for Joomla! 1. '. Note that the basic controller always refers to the record set.php A step back: 1. You have only to define the business logic for data managing.5
Each component of Joomla! has.php / administrator / components / com_ccat / tables / ccatbrand. as access is not made via a menu item.. an entry point. in our case: brands(ccatbrands).net/joomla-component-builder/create-joomla-extens.. the controller calls the constructor and the method display () of base the class JController. JRequest: getword ) else ( JRequest:: setvar ( 'view'. to act on the individual records) With the its inclusion. named as the component. you must define the controller / view .php Within the last file we have.End
At back end side.php. to act on the individual records) saveOrder (): save the display order of records (requires ccatbrand model.Create Joomla! extensions . [ccat.html. but what is the default controller? Obviously the answer varies from project to project. the following lines of code: function display ($ tpl = null) ( .html. whether we speak of front end or back end.5 .Part 1 view recods Writing extensions with Joomla!Component Builder is quite easy since it is the program that takes care to write the skeleton for models. never the single record (that brings up the list). usually is the basic information that we changed more frequently. This file will then define which view and which controller to load.. File ccat. to act on the individual records) orderdown (): moves the record down (requires model ccatbrand. but this is your own task.
Side Back . '***'). ( 'controller')).
Operation of the components for Joomla!1. This is a PHP file. as shown by the code.
mmleoni. .Create Joomla! extensions .All Rights Reserved..Part 1
L'estate si avvicina hai già trovato l'albergo per le vacanze? cerca un albergo al mare o un hotel in montagna ove trascorrere le tue vacanze..Manage the Back End.net/joomla-component-builder/create-joomla-extens.
3 of 3
8/28/2010 9:15 PM
Copyright © 2010 Marco Maria Leoni Web Consulting P.