The Custom HTML module is different; it allows you to determine the module content from scratch.. Navigate to Extensions | Module Manager to see which modules are part of the default in
Trang 17 Click on Save and click on Preview In the frontend Main Menu, click on the Ugly Paintings link to see the results:
What just happened?
Using the Custom HTML module, we've added a special little content block It will only show
up on specific pages Usually, modules contain dynamic content, such as links or a login form
The Custom HTML module is different; it allows you to determine the module content from
scratch You can use it to display a fixed text on some pages, such as a welcome note, a note
on the section that the reader finds on those pages, or some "static" hyperlinks
If you're a scripting wizard you can also add dynamic HTML code (JavaScript)
However, by default the Joomla! editor TinyMCE will clean up dynamic code
from the text when saving If you do want to be able to enter (and save!) any
code here, navigate to Extensions | Plugin Manager, select Editor - TinyMCE
2.0, select Code cleanup on save: Never, and click on Save.
Trang 2What other extensions are part of the Joomla! core?
Navigate to Extensions | Module Manager to see which modules are part of the
default installation
Archive mod_archive When you archive items in Joomla! you can use this
module to display a list of links to archived articles (sorted by date) We've explored archiving articles in Chapter 6
Breadcrumbs mod_breadcrumbs This displays a set of hyperlinks that helps visitors
understand where they are (that is, Home | Category |
Article) Custom HTML mod_custom This is a simple, but very flexible module to display
content anywhere on the page See the previous section for an example of its usage
Feed Display mod_feed This displays a list of hyperlinks to news updates
(newsfeeds) from another website
Latest News mod_latestnews This module shows a list of hyperlinks to show the last
articles added to certain sections or categories The name is confusing because it is really about "latest content", not just news
Login mod_login This module shows a form that users can use to log in
or create a new account You've seen this in action in Chapter 9
Main Menu mod_mainmenu The mod_mainmenu module is Joomla!'s default menu
module All menus in Joomla! are in fact instances of the basic menu module mod_mainmenu In other words,
in spite of the name this is not just a "Main Menu" module, it's Joomla!'s menu functionality—period
News Flash mod_newsflash You've read about this module earlier in this chapter It's
not just for news, but it allows you to display the intro texts of a set of articles in any category
Popular mod_mostread Add this module to display a list of hyperlinks to the
articles that have been accessed most often
Random Image mod_random_image Shows a random image from an image folder any time
the page is reloaded; a simple way to surprise the visitor with a page that looks different on every visit, even when there's no new content added
Trang 3Module Name Type What can you do with it?
Related Items mod_related_items Shows a list of hyperlinks to pages with a subject matter
related to that of the current page The relationship is based on the meta tag keywords of the articles If the current page and two other articles contain the keyword
tutorial, then two items will appear in the link list.
Sections mod_sections Shows a list of hyperlinks to all sections in the site
Statistics mod_stats Shows a set of website statistics, such as the number of
content items and visitors hits
Syndicate mod_syndicate This shows a RSS Feed link; users can click on this to
subscribe to updates for the current page and read them
in a special application (a news reader)
Who's Online mod_whosonline Shows how many users are logged in
Wrapper mod_wrapper Allows you to show an external page (a page from
another site) within your site
Every module in the Module Manager has a Module Name and a Type The
name is the (customizable) Title of the module that you show at the frontend of the site The module Type is the (fixed) name Joomla! uses internally As you saw
above, you can repeatedly use the same module type (for example,
mod_mainmenu), but you distinguish module copies with their name (for
example, Top Menu, or User Menu)
Navigate to the Components menu to see which components are part of the Joomla! core A
short overview:
Component Name What can you do with it?
Banner Manage banner ads on your website You can create new banners and
manage banner clients
Contacts Add and manage contact information and link contacts to registered users
See Chapter 4 for an example
News Feeds Add newsfeeds from other sites to your Joomla! site
Poll Create multiple choice surveys See Chapter 4 for an example
Search Access search statistics to see how many searches were done for certain
keywords or keyword combinations
Trang 4Enhancing your site using third-party extensions
When you run into the limitations of the basic Joomla! installation and the core extensions, it's time to check out some more sophisticated, dedicated extensions Any functionality you can think of is likely to already exist in the form of a component, module, or plugin (or a combination) It takes just a few steps to add an extension to your website First you download the extension (as a ZIP file), then you install it through Joomla!'s Extension Manager, and finally you adjust its settings to get it to work the way you want to
Trying out an alternative News flash
Earlier in this chapter, you've explored a core module, Newsflash This is a great module for attracting attention to a few selected articles, but it has some limitations For example,
content can be inadvertently shown twice on your home page In the following example, an
article intro is displayed because it's set to show on the Front Page, but its title is also shown because the article is part of the Newsflash category:
Trang 5To prevent this, you have to manually check for double home page entries However, there are dedicated content presentation modules available that can do this automatically (and do much more) We'll check out an example
Time for action – downloading and installing an extension
Let's install an alternative news module, News Show Pro:
1. Navigate to http://tools.gavick.com and select the News Show Pro link.
2. Click on Download to download the file mod_news_pro_gk1_J15!.zip file
containing the extension files You'll be asked to login or register Click on Register
to register as a user and log in to the site You'll be taken to the download page where you can download the ZIP file
3. In the backend of your site, navigate to Extensions | Install/Uninstall You'll be taken to the Install screen of the Extension Manager:
4. Now install the extension by clicking on Browse to select the extension ZIP file on your computer Click on Upload File & Install Once the installation is complete, you'll see a message (Install Module Success).
Trang 6Time for action – putting the extension to work
Now, let's get News Show Pro display an article teaser text in the right-hand side column on the front page If you've followed along and installed the NewsFlash module earlier, it's time
to hide that module again, as we'll replace it To do so, navigate to Extensions | Module Manager Locate the NewsFlash module and click on the green check mark in the Enabled
column to hide it on the frontend
1 In the Module Manager, locate the News Show Pro module and click on the Module Name (News Pro GK1) to see the huge list of available options.
This is a bit different from the default Newsflash module! If you scroll down, you'll see News
Show Pro has more than 70 different Module Parameters But don't despair, you'll only have
to tweak a few settings to get this beast to work
2 In the Title field, enter Recent Lectures.
Trang 74. In the Menu Assignment section, set the module to display on the Home page only.
5. In the Module Parameters, set Main block width to 200 This defines the maximum
width of the displayed module contents
6. In the Category field, select SRUP Activities/Lectures.
7. In the Amount of columns and Amount of rows boxes, enter 1 This will display one
news item at a time
8. Set Showing frontpage articles to Disabled This will hide category contents that's
already set to show in the Front Page mainbody
9. Set News image height and News image width both to 50px This will automatically
reduce any images (in the article intro texts) to small thumbnails when displayed as part of the News Show Pro module
10. Set Autoanimation to Enabled This will create an automatic sliding display.
11. Click on Save and click on Preview.
What just happened?
The right-hand side column still shows a teaser text, but the differences are in the details:
Trang 81 There are no double front page entries any more Whatever appears on the front page, is automatically filtered out of the News Show module
2 Every second or so a new teaser text will automatically slide in to reveal other category contents:
Moreover, there are some controls allowing the visitor to manually browse the available teasers from this category Of course, automatic panel animation might
be a bit too much for your sophisticated site – but it's cool to have this option
3 The images in the article intro texts have been converted to small thumbnails
to make better use of the limited screen real estate of the front page column
If you just see one teaser text and no other content sliding in,
chances are the category you've chosen doesn't contain enough articles Create some new (dummy) articles to see the effect
Trang 9News Show Pro is a good example of the difference between Joomla!'s built-in extensions and the extensions that are available through third-party developers Generally, the core extensions are lightweight, simple, and do their job just fine However, dedicated third-party extensions are bound to have more options and features Moreover, you usually can choose between several excellent extensions to perform the same kind of functionality Another great extension for displaying article teasers, for example, is Mini Frontpage
(http://www.templateplazza.com/minifrontpage-module)
Have a go hero – experiment with News Show settings
Try out the many different options that the News Show module offers You can change the layout and set all sorts of combinations of teasers, links, and sliding panels When downloading the extension, you'll notice there's a separate PDF manual available for
download that contains instructions and examples to help you on your way The following
is an example from the developer's demo site:
Trang 10Showing images in a gallery
On our art website we'd like to display our art pictures really big, allowing the visitor to enjoy
as much of the ugly details as possible This means we definitively need an image gallery using a lightbox You'll no doubt have seen this trick used on the Web; images are displayed small (as thumbnails) on the web page itself, to be maximized only after the visitor has clicked them Then, the image opens in a lightbox, greybox, slimbox, or whatever different developers like to call this method It not only looks cool, but it's functional too, as it allows you to show a lot of pictures on the page, leaving it to the visitor to pick which pictures he or she wants to have a better look at:
Time for action – create an image gallery
To show all images in a folder as a gallery, we'll use the plugin Simple Image Gallery available from JoomlaWorks
1. Download the Simple Image Gallery extension ZIP file from
http://www.joomlaworks.gr
2. Navigate to Extensions | Install/Uninstall Select the ZIP file you downloaded and click on Upload File & Install You'll see a message when the installation is finished