Professional Documents
Culture Documents
13 August 2011
Hour 1 Introduction
H1.1 The differences between Components, Modules & Plugins H1.2 Modules explained Assignments: a. Core hack in Module b. Template override for a Module c. Alternative for core hack without using template overrides
2
Components Modules Plugins Templates Language Files 1.6/1.7 Libraries Addons Extensions for components Tools External applications
Component: Most important. Determines functionality of page, Max 1 component running at a time! Module: Supportive, Output to screen, Multiple possible (Module order determines output) Plugin: Supportive, invisible running in background, Multiple possible (Module order determines output)
Component: files: (/administrator)/components/com_comp-naam table: jos_components Module: files: (/administrator)/modules/mod_modulenaam table: jos_modules & jos_modules_menu Plugin: files: /plugins/type_plugin/pluginnaam table: jos_plugins
C Form
M Form
P Search in database table C Processing P Search in database table P Search in database table C Results
Search
10
Plugin
H1 Assignment
Needed: Local webserver (LAMP, XAMPP, MAMP, WAMP, or any other AMP) Local installation of Joomla 1.5.23 + English Example Content Text editor, preferably with code hightlighting Browser, preferably FireFox
11
Assignment 1a
My customer uses the Weblinks Component a lot and I want to offer them a faster way to goto that component in the back-end. Change the C-panel (with core hack) to give them a Weblinks shortcut icon.
12
/administrator/templates/khepri/images/header/ 13
Assignment 1b
My customer has the latest news module. They like it, but only want to have 3 news items and they complain that there's no date with those news items. They also want a link under it to get to all the latest news. Only list 3 news items Use a template override to add the date to latest news Add a link to all the latest news
14
Unfortunately NO date output But you can accomplish that with a core hack, which might be overwritten with a Joomla update!
15
after
$lists[$i]->text = htmlspecialchars( $row->title ); Add $lists[$i]->date = htmlspecialchars( $row->created ); In template override /templates/rhuk_milkyway/html/mod_latestnews/default.php Change <?php echo $item->text; ?></a> To <?php echo $item->date. .$item->text; ?></a>
16
Assignment 1c
I just had a phone call from a panicking customer. They cannot change the weblinks anymore. Everything worked fine. Until last week. It stopped working just after I had done the latest Joomla upgrade. How would you quickly solve this issue? And how can you prevent these issues in the future?
17
18
Peter Martin
19