Você está na página 1de 70

Introduction to

CMS with
Joomla!
Course outline

First day

Introduction to CMS

Installation

Second day (back­end)

Control panel, User manager

Media manager

Article manager, Menu manager

Extensions

Third day (front­end)

Article manager

Extras, Q&A session
1. Introduction to CMS


Overview of content management systems 
(CMS)

Using Joomla!
Overview of CMS

 Management of website and contents


 Collaborative creation of contents
 Files, images, audio and documents
 Features
 User management (roles)
 Task work flow
 Track and manage multiple versions
 Separation of content and layout

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Best practices

 When working with CMS, work should be broken


into TWO areas
 CMS Life cycle

Manage and update CMS
 Content Life cycle

Organise information and enhance user experience

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Open Source CMS

 Typo3  Tikiwiki
 Xaraya  eZ Publish
 Plone  WordPress
 PhpNuke  Drupal
 XOOPS  Mambo
 phpCMS  Typo
 Liferay

Your Total Business Solution Partner


Joomla!

Open Source Competency Centre, MAMPU
Using Joomla!

 Download from http://www.joomla.org


 Swahili word "Jumla", which means "all together" or "as a
whole"
 Joomla! is a split from Mambo (2005)
 Demo available at http://demo.joomla.org
 Latest version is 1.5.x – result from complete rewrite of
1.0.x to better organize the code base
 1.0 Supported
 Requires min 1.5.6 to resolve security issues
 Patches must be updated for security
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Why Joomla?

 Uses GNU / GPL license


 Easy installation & simple to manage even to non-
programmers
 Adopts Web 2.0 (many templates)
 Scalable
 Rapid development (content focused)
 Extensible – more than 3000 extensions available
(http://extensions.joomla.org)
 Good framework for developers to create add-
ons/extensions
Your Total Business Solution Partner

 Active global community – there is even a Malaysian


Joomla community

Open Source Competency Centre, MAMPU
Exercise 1
a) Compare and discuss about:
● Technology (based on what language, compatible
with what platform)
● Features (common main features)
● Support (how many support channels, how big is
the community, how active)
● Extension (how many extensions, can the CMS be
extended to more functionalities)
between Joomla! and other CMS

Open Source Competency Centre, MAMPU
2. Installation of Joomla!


Check installations & services

Download Joomla

Create database and user

Point browser to installation page
Check installations & services
 Minimum requirements to install Joomla! 1.5
(http://help.joomla.org/content/view/1938/310/)
 PHP 4.3.10 (5.0.x)
 MySQL 3.23.x or above (5.0.x)
 Apache 1.3.9.x or above (2.2.x)
[oscc ~]$ su -
Enter password:
[root ~]# php -v
[root ~]# mysql -V
[root ~]# httpd -V
[root ~]# service httpd status
Your Total Business Solution Partner

[root ~]# service mysqld status


[root ~]# exit
[oscc ~]$
Open Source Competency Centre, MAMPU
 Download

 Download from http://www.joomla.org


 Extract the package (assuming tar file is at Desktop)
[oscc ~]$ pwd
/home/oscc
[oscc ~]$ cd Desktop/
[oscc Desktop]$ mkdir joomla
[oscc Desktop]$ mv Joomla_1.5.x-Stable-
Full_Package.tar.gz joomla
[oscc Desktop]$ cd joomla
[oscc joomla]$ tar -zxvf
Joomla_1.5.x-Stable-Full_Package.tar.gz
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
 Download

Make a directory 'joomla' at document root


[oscc joomla]$ mkdir /var/www/html/joomla

Move it there

[oscc joomla]$ pwd


/home/oscc/Desktop/joomla
[oscc joomla]$ mv * /var/www/html/joomla

Change permission 777 (only for development purpose)


● Your Total Business Solution Partner

[root joomla]$ chmod -R 777


/var/html/www/joomla
Open Source Competency Centre, MAMPU
 Database

 Connect to mysql using user 'root'


[oscc joomla]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end
with ; or \g.
Your MySQL connection id is 44835 to server
version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to


clear the buffer.
Your Total Business Solution Partner

mysql>

Open Source Competency Centre, MAMPU
 Database

 Create database 'joomladb'


 Create user 'userjoomla' with password 'joomla123' to
access the database
mysql > create database joomladb;
mysql > grant all privileges on joomladb.*
to userjoomla@localhost identified by
'joomla123';
mysql > flush privileges;
mysql > exit;

Point web browser to http://localhost/joomla to


Your Total Business Solution Partner

proceed with installation

Open Source Competency Centre, MAMPU
Installation

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation Not required if on Windows

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation

Choose your
own admin
password

Your Total Business Solution Partner


Click to install
sample data

Open Source Competency Centre, MAMPU
You will get this page only if you haven't
Installation changed permission like in Slide 12

Select all &


copy this
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation

● Copy & paste code from Joomla finish page and save as
configuration.php under /var/www/html/joomla (using any
text editor) – you only have to do this if you haven't
changed permission like in Slide 12

● Delete /var/www/html/joomla/installation folder

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation No need to do this if on Windows

● Change permission of these files/folders (must as root)


[oscc ~]$ su -
[root ~]# cd /var/www/html/joomla
[root joomla]# chmod 744 configuration.php
[root joomla]# chmod -R 777 images
[root joomla]# chmod -R 777 tmp
[root joomla]# chmod -R 777 cache
[root joomla]# chmod -R 777 components
[root joomla]# chmod -R 777 modules
[root joomla]# chmod -R 777 plugins
[root joomla]# chmod -R 777 templates
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Installation No need to do this if on Windows

● contd....
[root joomla]# cd administrator
[root administrator]# chmod 777 tmp -R
[root administrator]# chmod 777 components -R
[root administrator]# chmod 777 templates -R
[root administrator]# chmod 777 modules -R

● Chown the same files/folder to webserver eg apache,


www-data,etc
Your Total Business Solution Partner

● Point browser to http://localhost/joomla (website/front-end)

● Point browser to http://localhost/joomla/administrator

(back-end)
Open Source Competency Centre, MAMPU
Default install website layout

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
3. Joomla! back­end 

Control panel, Global configuration

Roles & privileges

User manager

Media manager

Article manager

Menu manager

Extensions manager (template, components 
& plugins
Control panel (logged in as admin)
Version number

Menu bar

Your Total Business Solution Partner

Quick icons

Open Source Competency Centre, MAMPU
Control panel

● Site -> Control Panel


● Menu bar (top) - contains
 Site – media manager, user manager, global configuration
 Menus – menu manager
 Content – article manager
 Components – components settings
 Extensions – extensions manager
 Tools – messaging, mass mail, cache
 Help
● Icons - provide quick access to submenus under each
Your Total Business Solution Partner

menu

Open Source Competency Centre, MAMPU
Global configuration

 Site -> Global Configuration


 Manage global setting for site, server & system
 Site name, metadata, SEO
 User registration, cache, debug, session, media settings
 Time zone (Malaysia is UTC +08:00)
 Database, ftp and mail settings

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Roles & privileges

 Back-end roles: Manager, Administrator, Super


Administrator
Global Manage Global Manage Access Manage Manage
config Users article Extensions Components Contacts/ Media
params Articles
Back-end
Super X X X X X X X
Administrator
Administrator X X X X X
(all users
except SA)
Manager X X X

Your Total Business Solution Partner

 After installation, Joomla! will create 1 user 'admin' as


Super Administrator
Open Source Competency Centre, MAMPU
User manager

 Site -> User Manager


 Provides
 Create/edit/remove user – user unique by username &
email
 Manage lost password – renew password
 A user cannot have more than 1 role
 If user registration is allowed, notification email will
be sent out to admin everytime there's a new
registration
 If a user is created, notification email will be sent out
Your Total Business Solution Partner
to the user informing his username and password

Open Source Competency Centre, MAMPU
User manager

Create a user 'manager' with


Manager privilege

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Media manager

 Site -> Media Manager


 Only allowed to upload documents and images
 Subfolders:
 M_images – images for menu items
 Banners – for banners component
 Smilies – to use inside articles
 Stories – images for articles
 Supports multiple uploads

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Exercise 2

As admin:
a) Change the site name
b) Change the time zone
c) Create a user with a role 'Manager'

As manager:
a) Create a folder “mynews” under stories/
b) Upload an image to that folder

Open Source Competency Centre, MAMPU
Article manager
 Sections are big containers
 eg Products, Profile
 they hold Categories
 Categories are little containers
 eg. Maps, Publications (under Products)
 eg. Organisation Charts, Vision, Mission (under Profile)
 they hold Content Items/Articles
 Articles are all the text and images you want to appear on
a page
 To create an article, MUST create its Section & Category
Your Total Business Solution Partner
first

Open Source Competency Centre, MAMPU
Article manager

 Actions available for articles:


 Publish/Unpublish – control display on website
 Trash – equivalent to Recycle Bin on windows, can restore
trashed articles
 Archive/Unarchive – for old news
 Move/Copy – move or copy articles to other
Section/Category
 Parameters – global parameters for articles (eg. show
author name, created date, linkable title, etc)
Your Total Business Solution Partner

 Ordering can be set by typing numbers and click on


floppy button or by clicking on up & down arrow
Open Source Competency Centre, MAMPU
Article manager

 Find your articles


 Filter by Section, Category, Author or State
 Filter by search keyword
 Filter will be remembered for the session

 Default listing will be remembered for the session


Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Article manager

 Image
 To insert images uploaded in Media Manager
 Can only insert images uploaded under stories/
 Pagebreak
 To break an article into multiple pages – provides navigation
(prev, next, toc)
 Place cursor where you want the article to break
 Black dashed line will appear
 Read More...
 To break an article and provide Read More button/link to view
Your Total Business Solution Partner
the whole article
 Place cursor where you want button/link to appear
 Red dashed line will appear
Open Source Competency Centre, MAMPU
Front page manager

 Content -> Front Page Manager


 Manage which articles appear on front page
 Front page always display selected articles in Blog Layout

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Exercise 3
a) Create a Section “pets”
b) Create 2 Categories under that Section
● “Cat”, “Fish”
c) Create 3 Articles under each Category
● “Domestic”, “Tiger”, “Others”
● “Shark”, “Arapaima”, “Others”
d) Try rearranging the order
e) Create articles in each section and try searching for your
articles
f) Publish 1 article on front page
Open Source Competency Centre, MAMPU
Menu manager

 Menu section (represented by a box in website)


 They hold menu items
 Menu items can be nested (submenus)
 A menu item can be linked to any menu item type
(articles, components, external link, separator or alias)
 Menu manager is to manage all menus and
submenus but to display it in website, you need to
enable its corresponding module (mod_menu)
 Each menu section has access level (public,
registered or special) which can be controlled in
Extensions -> Module Manager
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Menu manager
Also possible to
 To add a menu box Extensions > Module
 Create menu section first
Manager > New >
Menu but have to set

Menus ­> Menu Manager ­> New the class suffix for
CSS styling (under

Every menu must be unique  Advanced
 Copy existing menu module (eg. Main Menu) Parameters)

Extensions > Module Manager

Select 'Main Menu' ­> Copy

Click on 'Copy of Main Menu' to edit

Fill up title to display
Select menu name Module Parameteres > Menu Name > 
Your Total Business Solution Partner

select the menu section you want to appear inside the box

Enable the menu box

Open Source Competency Centre, MAMPU
Menu manager
 To add a menu item inside
menu box
 Determine which menu
If a component
section has a menu item,

Menus ­> Menu Manager ­>  it will show up
[menu section] here. What kind
of links available
 Add new menu item for component

Click on New depends on the
component itself.

Select menu item type (article 
layout, category list, etc)
Fill up title to show & make 
Your Total Business Solution Partner

sure to fill up parameters on 
right hand side

Open Source Competency Centre, MAMPU
Exercise 4
a) Create a new menu box
b) Add 3 menu items inside the box linking to your
articles, using
● Article layout
● Category blog layout
● Section layout
What are the differences between the layouts?
c) Add 2 more items inside, using
● External link
● Wrapper
Open Source Competency Centre, MAMPU
Extensions 

 Extensions include components, modules, plugins,


languages and templates
 Extensions are used to add extra functionalities to Joomla!
 Extensions are developed by independent open source
developers community
 Components, modules & plugins can be enabled or
disabled
 Template can be activated by making it the default one
 Components
 can be a simple or complex program
Your Total Business Solution Partner

 eg. Document management, Calendars, Statistics

Open Source Competency Centre, MAMPU
Extensions 

 Modules
 lightweight and flexible extension that is used for page
rendering
 generally less complex and are able to be seen across
different components
 eg. Breadcrumbs, Menu, Syndication, Who's online
 Plugins
 handle events triggered by the core application and
extensions
 extend third-party extensions
 Templates
Your Total Business Solution Partner

 for skining purposes, website design and layout

Open Source Competency Centre, MAMPU
Extensions

 To install an extension
 Extension -> Install/Uninstall -> Browse the file (*.zip) ->
Click Upload File & Install
 Joomla! will recognize whether it's a component, module,
plugin, language or template, and create appropriate links
 Extension compatibility:
 1.5 Native

Joomla! 1.5.x compatible
 1.5 Legacy

Joomla! 1.5.x with Legacy plugin enabled
Your Total Business Solution Partner

Extensions > Plugin Manager > enable System ­ Legacy
 1.0 Native

Joomla! 1.0.x compatible
Open Source Competency Centre, MAMPU
Template

 Change banner
 Go to active template folder and replace the banner
with the same name

/var/www/html/joomla/templates/<activetemplate>/images/

Look for the banner's name

Rename new banner with the name (also with the same ext 
eg. gif, jpeg, png, etc)

Copy and paste new banner to replace the old one
 Or change banner name and path in CSS file

/var/www/html/joomla/templates/<activetemplate>/css/
Your Total Business Solution Partner


Look for template.css

Find div#logo and edit the banner name and path

Open Source Competency Centre, MAMPU
Exercise 5
a) Rearrange menu boxes, disable and enable it
back
b) Install a template and make it default
c) Change website header image
d) Install module/component and enable it to
display on website

Open Source Competency Centre, MAMPU
a) Joomlaxplorer
b) http://extensions.joomla.org

Open Source Competency Centre, MAMPU
4. Joomla! front­end


Roles & privileges

Article manager
Roles & privileges

 Front-end roles: Registered, Author, Editor, Publisher


Submit Submit Edit Publish Edit Read Read
web articles articles articles profile public restricted
links content content
Front-end
Publisher X X X X X X X
Editor X X X X X X
Author X X X X X
Registered X X X
Public X

 Restricted content/menu/component that requires login


Your Total Business Solution Partner

will not be visible to public users

Open Source Competency Centre, MAMPU
Article manager

 To manage article from front-end, a user needs to login


and has role either Author, Editor or Publisher
 To submit new article
 User Menu -> click on Submit New Article

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Submit article ­ Author

 Author
cannot edit
his articles
after
submission
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Submit article ­ Author

Fill in if want to
schedule the
article

Will be
displayed after
submission

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Edit article ­ Editor

Articles that are


not published will
have blue
background Button to edit
for each article

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Edit article ­ Editor

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Publish article ­ Publisher

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Publish article ­ Publisher

Option to publish/make
public this article

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Exercise 6
a) Create a Publisher as “publisher”
b) Create an Editor as “editor”
c) Create one or more Authors as “author1”,
“author2”
d) Understand the flow of publishing by having the
author(s) create an article, editor edit the
articles then the publisher will publish it to the
site.
# /sbin/ifconfig
# service iptables stop

Open Source Competency Centre, MAMPU
5. Extras


Security

Extra Components

Q&A
Security

 Being one of the most popular CMS, it is targeted by


many hackers
 Joomla! Is as secure as any other application
 Requires continuous updates
 Security considerations begin from the hosting
server
 Patch the OS
 Open only needed ports (HTTP, HTTPS)
 Patch the software
 Configure the software in a secure manner
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Joomla! Installation precautions

 Verify that Joomla! is from the official site


 http://www.joomla.org
 During installation
 Do not use the default MySQL tables prefix as jos_

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Joomla!  Post install precautions

 Install Joomla Diagnostics


 http://www.joomla-addons.org/joomla-
diagnostics.html
 Audit the installation with Joomla! HISA
 http://joomlacode.org/gf/project/hisa/
 Change the default administrator name (default is
admin)
 Ensure that this is recorded down

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Joomla!  Post install precautions

 Remove all files as instructed by Joomla! And other


unneeded files or directories
 Ensure files and directories have the proper
permissions
 Password protect sensitive directories with
.htaccess
 Move the configuration.php file to outside of the web
directory if possible. Make it non-writable.

Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Example of a Joomla! exploit

 Below is the Joomla! (until version 1.5.5) "token"


Password Change Vulnerability as describe in http://
gcert.mampu.gov.my/index.php?
option=com_content&task=blogsection&id=7&Itemid
=98
 This will reset the admin password for Joomla!
1. Go to url : target.com/index.php?
option=com_user&view=reset&layout=confirm
2. Write into field "token" char ' and Click OK.
3. Write new password for admin
Fix with
4. Go to url : target.com/administrator/
Your Total Business Solution Partner
Joomla
5. Login admin with new password 1.5.6

Open Source Competency Centre, MAMPU
Joomla! Routine precautions

 Establish a security plan and ensure the relevant


parties know about it.
 Remove unused extensions and themes
 Subscribe to Joomla! For continuous updates
 Subscribe to security sites such as
 http://www.ictsecurity.gov.my/
 Subscribe to the extensions/themes where possible
and ensure only the latest release is used
 Carryout routine backup of Joomla! Site and its
database
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU
Extra Components

 JCE Administrator Component


 A WYSIWYG editor for Joomla! based on Moxiecode's
TinyMCE.
 Used with JCE Editor Plugin
 SectionEx
 List all articles within a section, grouped by categories. It
combines and extends Joomla!'s build in "Section Layout"
and "Category List Layout".
 ChronoForms
 Create custom forms
Your Total Business Solution Partner
 Simple Image Gallery
 Adding image galleries inside your Joomla! articles

Open Source Competency Centre, MAMPU
Extra Components

 Plugin Googlemaps
 Plugin for displaying one or more googlemaps within
content-items, modules or components
 Joom!Fish
 To maintain and organize your manual translated
content in your Joomla! database
 Xmap
 Sitemap component for Joomla!

Remember, Google is
your best friend!
Your Total Business Solution Partner

Open Source Competency Centre, MAMPU

Você também pode gostar