Tuesday, July 10, 2007

Components, Modules, Mambots

Components
Components are core elements of Joomla!’s functionality and are displayed in the main body of
the web site’s template. The code for the main body will appear in the template as follows: . Depending on the design of the template in use, this is often in the centre
of the web page.
A typical Joomla! installation comes with Banners, Contacts, News Feeds, Polls, and Web
Links Components.
Members of the Joomla! community produce third party Joomla! Components on a continuous
basis. Look at http://extensions.joomla.org/ or http://developer.joomla.org for a listing of
additional Component downloads.





Manage Components
Introduction
Components are core elements of Joomla!’s functionality and are displayed in the main body of the web
site template, i.e. mainbody.php. Depending on the design of the template in use, this is often in the
centre of the web page.
A typical Joomla! installation comes with Banners, Contacts, News Feeds, Polls, and Web Links
Components.
Members of the Joomla! community produce third party Joomla! Components on a continuous basis.
Look at http://extensions.joomla.org/ or http://developer.joomla.org for a listing of available Component
downloads or check the special forums.
In this section, we will look at:
The core Components that come with the Joomla! installation.
How they are configured and used.
Installing and deleting a Component.



Install a Component
􀂲 Access: Select Installers > Components.
The Install new Component screen will be displayed.



Figure 1: Install New Component screen
Toolbar Buttons: Uninstall is available.
This screen is split into top and bottom. The top is used for installing Components and the bottom, which
lists the Components that are installed and that can be uninstalled.
There are two methods for installing a Module:
The first method of installing is to upload a zipped package file that will be automatically installed to your
server. Click Browse... to go to the location of the Component zip file on your local computer. Once
identified select the file and click Open. The name and location of the file will be displayed in the Package
File: box. Then click the Upload File & Install button. If all goes well you will transfer to a new screen
confirming Success.
The second method is to upload an unpacked archive to your host's server. Type the location of this file (it
must be the absolute location) then click the Install button.
Uninstall a Component
Tick the box next to the Component you want to uninstall and then click the Delete button. A dialogue alert
will show: Are you sure, you want to delete selected items?
Click OK. The page will reload displaying the word Success.


Modules
Modules extend the capabilities of Joomla! giving the software new functionality. A Module is a
small piece of content that can be displayed anywhere that your template allows. Modules are
very easy to install in the Administrator Section (Back-end).
Joomla! Modules may include: Main Menu, Top menu, Template Chooser, Polls, Newsflash, Hit
Counter, etc.
Members of the Joomla! community produce Joomla! Modules on a continuous basis. They are
freely available on http://developer.joomla.org/ or http://extensions.joomla.org for download.
An example of a module PHP code is .



Manage Modules
Introduction
This section deals with:
Explaining what Modules are.
Introducing the Module Manager and the functions associated with it.
Installing and uninstalling a Module.
Providing an explanation of how to configure installed Site Modules.
Modules are used to display various information and/or interactive features throughout your Joomla! site.
A Module can contain just about anything from simple plain text, to HTML, to complete standalone third
party applications. Modules can also display interactive content, such as polls, latest news, Newsfeeds
and more.
Site Modules are different from Administrator Modules because they display their content on the Frontend
of your site while Admin Modules pertain to various Administrative (Back-end) tasks and/or features.
Modules can be created by you (custom/user Module), or downloaded, and installed.


Module Manager Screen
The management of the Modules is always done in the Administrator (Back-end)panel.
􀂲 Access: Select Modules > Site Modules.
The Module Manager Screen displays a list of the installed Site Modules.
Figure 2: Module Manager screen
Toolbar Buttons: Publish, Unpublish, Copy, Delete, Edit, and New are available.
The following information is displayed:
Column Name Details/Options
Module Name: This is the title of the module. It is editable and will be displayed on the Front-end of your
Web site if you choose so.
Published: This tells you if the module contents will show on the Front-end of your Web site. Click
the button to toggle the published/unpublished state.
Reorder:
This column allows you to change the relevant order that the modules display on the
Front-end of your Web page(s). Click the 'up' or 'down' arrows to increase or decrease
the module order by one position.
Order:
This shows the order of the modules as displayed in the Front-end of your web site. To
modify this order, type in the number that you would like to have them presented. Then,
click the Save Order button next to the Column Heading Order.
Access: This shows who can see the modules on the Front-end of a Web page. Clicking the link
will toggle through Public/Registered/Special.
Position:
This shows which template positions the module will be displayed. Some common
Template positions are: User1, Left, Righting, and Top.
NOTE: You can only assign the module position to one that is already coded into your
template
Pages:
This shows on which pages the module will be displayed. Options include All, Varies or
None.
NOTE: This is not applicable to Administrator modules. Click on the Edit button in the
Toolbar to edit this.
ID: This is the ID number for the module item. This is allocated by the Joomla! site system
when the module instance is saved.
Type: This is the type of module. An example is mod_mainmenu, which is the 'type' of module
used for the User Menu and the Main Menu module instances.
At the bottom of the list, you may see a pagination feature, which will allow you to navigate to the
next set of modules in the list. You can also set the number of modules displayed on a page by
selecting the number in the drop down box at the bottom of the screen.


Mambots
A Mambot is a small, task-oriented function that intercepts and manipulates content, in some
way, before displaying it. Joomla! provides a number of Mambots in the core distribution, e.g.
{mospagebreak}, {mosimage} etc.

Manage Mambots
Mambots are functional units of code that support the operation of Joomla! They have many different
purposes and functions and are grouped together for easier management.
For example, there are Mambots that only operate on Content Items, others provide search capabilities,
etc. In some groups, any number of Mambots can be published at once, while in others (for example, the
WYSIWYG editors) only one can be active.

Content Mambots
Any number of Mambots can be published in this group. These Mambots operate on Content Items
before they are displayed. They typically replace some sort of shorthand {tag} with other information.
MOS Image
This is an image placement Mambot. {mosimage} tags are replaced with images that you have selected
when creating and/or editing a Content Item. Tags are replaced on a queuing basis. If there are more
tags than images defined, the excess tags are ignored. Likewise, if there are more images listed than
there are tags, then the excess images are ignored.
This Mambot is for those who like to work without a WYSIWYG Editor as it a convenient way to insert
images into the Content Item. Others, who use a WYSIWYG Editor, still prefer using this Mambot to insert
images instead of the insert Image button in the WYSIWYG Editor. This is a personal preference.
Legacy Mambot Includer
This Mambot allows for the handling of Mambots designed for version 4.5 of Mambo. If you do not have
any pre-version 4.5.1 Mambots installed, this Mambot can be safely unpublished.
Code Support
The code support Mambot renders any text within a pair of {moscode}...code... {/moscode} tags
as PHP code.
SEF
The Search Engine Friendly Mambot makes links in content compatible with installed SEF support. It
operates directly on the HTML within the item and does not require a special tag.
MOS Rating
This Mambot provides for the voting/rating of Content Items.
E‐mail Cloaking
This Mambot rewrites all e-mail addresses within a Content Item to 'cloak' them from unwelcome
spambots.
GeSHi
This displays formatted code in Content Items based on the GeSHi highlighting engine.
This is to be considered as an enhanced version of moscode, allowing the rendering of many different
programming languages with colour-highlighted code by specifying the to-be-used language.
Usage: Use the "pre" tag and add the programming language you want to use for highlighting purposes
as a parameter.
Example:
< lang="xml">your code here ... < /pre >
The Mambot version of the GeSHi highlight code comes with the following highlighters for the most
common renders installed, ready to be used:
CSS => use lang="css"
HTML4 Strict => use lang="HTML4strict"
JavaScript => use lang="javascript"
PHP => use lang="php"

PHP Brief => use lang="php-brief"
SQL => use lang="sql"
XML => use lang="xml"
Should you need additional languages, you may download the full package from the developer site:
http://qbnz.com/highlighter/, which includes over 30 languages. You should then upload the required
newLanguage.php from the package into your \Mambots\content\geshi\geshi folder.
Load Module Positions
This Mambot, using the tag {loadmoduleposition modulepositionname}, allows a Module’s
content to be displayed in a Content Item.
MOS Pagination
This Mambot breaks Content Items into pages and assembles an Article Index.
􀂁 Note: By default the Index is labelled, Item title, Page 2, Page 3 etc. To add a title to Page 2, 3 use the
following tag parameter {mospagebreak title=pagedescription}, pagedescription will replace the
Page 2 convention.
Search Mambots
Search Mambots add the ability to search all of the different Components of Joomla! Basic searching is
provided for:
Content Items
Web Links
Contacts
Content Categories
Content Sections
Any number of search Mambots can be published at any one time.
In some groups ordering is important, for example, in the content group, the Image Replacement Mambot
{mosimage} must be first (top of the listing), and the Pagination Mambot {mospagebreak} must be last.
In this Section we will be covering:
Install a Mambot
Uninstall a Mambot
Outline definitions of each type of Mambot
Install a Mambot
􀂲 Access: Select Installers > Mambots.