Programming Modules for Joomla 1.5, 2. Create a simple Module

download Programming Modules for Joomla 1.5, 2. Create a simple Module

If you can't read please download the document

description

Programming Modules for Joomla 1.5 - Hour 2: Create a simple Module (Workshop for Joomladay Norway 2011, Saturday August 13th 2011)

Transcript of Programming Modules for Joomla 1.5, 2. Create a simple Module

Programming Joomla 1.5 Modules Hour 2: Create a simple Moduleby Peter Martin Nickname: pe7er Twitter: @pe7er Website: www.db8.nl

13 August 2011

Hour 2 Write a Module part 1H2.1 Development Tools H2.2 Simple non-OOP Modules H2.3 Module Positions H2.4 Parameters Assignments: a. Create a Simple non-OOP Module b. Module Positions c. Use of Parameters

2

2.1 Development Tools 1/2 Local

web environment

OS: Windows / MAC OSX / Linux LAMP stack (or XAMPP) Xdebug (PHP module) php.ini: error_reporting = E_ALL & E_NOTICE

Joomla 3

(Latest Stable Version)

Example data + default Rhuk Milkyway template 2nd language installed (nb-NO or nl-NL) J!Dump

2.1 Development Tools 2/2 PHP

Editor with code highlighting

Netbeans Eclipse PDT

phpMyAdmin FireFox 4

Firebug Webdeveloper toolbar MeasureIT ColorZilla

2.2 Simple non-OOP Modules 1/2 File

Locations

/administrator/modules/mod_example Front-end: /modules/mod_example Example: db8 Latest Weblinks => mod_db8latestweblinksBack-end:

File 5

names

.PHP (logic) .XML (installation & parameters) .INI (language files, in /languages/ )

2.2 Simple non-OOP Modules 2/2 Reference

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

in Joomla back-end with XML installation file (Sandbox installer) mod_db8latestweblinks.zipmod_db8latestweblinks.xml mod_db8latestweblinks.php

6

Assignment 2aJoomla'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 weblinksTIP Database table: jos_weblinks title, URL, description, date (not used by component :-), hits, catid.

7

Assignment 2a possible solutionmod_db8latestweblinks.php