Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
13 August 2011
web environment
OS: Windows / MAC OSX / Linux LAMP stack (or XAMPP) Xdebug (PHP module) php.ini: error_reporting = E_ALL & E_NOTICE
Joomla
3
Example data + default Rhuk Milkyway template 2nd language installed (nb-NO or nl-NL) J!Dump
phpMyAdmin FireFox
4
Locations
File
5
names
.PHP (logic) .XML (installation & parameters) .INI (language files, in /languages/ )
in jos_modules
Manual reference INSERT INTO `jos_modules` VALUES (0, 'db8 Latest Weblinks', '', 0, 'left', 0, '0000-00-00 00:00:00', 1, 'mod_db8latestweblinks', 0, 0, 1, '', 0, 0, ''); Automatic reference
Install
Assignment 2a
Joomla's weblinks component shows weblinks from category + register clicks. My client wants a module that shows the latest added weblinks on their site. Create Module for Joomla 1.5
Show the title + link + mouse-over description for the latest 3 weblinks
TIP Database table: jos_weblinks title, URL, description, date (not used by component :-), hits, catid.
</install>
INSERT INTO `jos_modules` VALUES (0, 'db8 Latest Weblinks', '', 0, 'left', 0, '0000-00-00 00:00:00', 1, 'mod_db8latestweblinks', 0, 0, 1, '', 0, 0, '');
2. Sandbox installer: Put .XML & .PHP both in zip file, and install via Joomla's Installer in back-end.
10
positions positions
show: www.example.com/index.php?tp=1 <?php if($this->countModules('left')) : ?> <jdoc:include type="modules" name="left" style="xhtml" /> <?php endif; ?>
Defining
11
Assignment 2b
For some incomprehensible reason, my customer wants to replace their logo with the 3 latest added weblinks. Apparently they have gone mad. The safest thing now is to comply with their request until the companies CEO has returned from holiday. Create a new Module Position in Joomla's default template Rhuk Milkyway at the postion where the logo is located. Display your Module in that Module Position
12
In template Rhuk Milkyway /templates/rhuk_milkyway/index.php Add: <jdoc:include type="modules" name="weblinks" style="xhtml" /> somewhere after <div id="header"> or <div id="header_l"> or <div id="header_r">
13
keep
parameters?
use
parameters?
14
Assignment 2c
My customer phoned me the 4th time this week to ask me to change the number of latest added weblinks. This cannot continue and we need to find a way they can determine the ammount themselves. Edit your module, add a parameter to display n weblinks To prevent any other disturbances, add a weblink category too
15
16
17
19
20
21
22
layout
Individual
layout
Specific layout in template.css (CSS tag: module_menu) Module Class Suffix in Module parameters (tag: _menu)
23
Assignment 2d
Now you are getting a real headache from this customer. This time they want to restyle the latest added weblinks module. Before our headache increases and before they call for the 7th time, we have to find a more permanent solution for their layout demands. Edit your module, add a parameter for layout (moduleclass_sfx)
24
25
26
Module Class Suffix: _menu (= same suffix as the main menu module).
27
Peter Martin
28