3. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 3 of 13 XOOPS Documentation Team
Table of Contents
MODULE PURPOSE.......................................................................................................................................4
INSTALL/UNINSTALL ...................................................................................................................................4
OPERATING INSTRUCTIONS ........................................................................................................................5
ADMINISTRATION MENU.............................................................................................................................5
PREFERENCES ..............................................................................................................................................9
THE USER SIDE ............................................................................................................................................9
BLOCKS ........................................................................................................................................................9
TEMPLATES................................................................................................................................................13
MODULE CREDITS .....................................................................................................................................13
Table of Figures
FIGURE 1 MAIN VIEW OF THE XOOPS HEADLINES MODULE (ADMIN SIDE)...................................................................4
FIGURE 2 THE MODULE ADMINISTRATION AND INSTALLATION .....................................................................................5
FIGURE 3 THE MODULE ADMINISTRATION AND UN-INSTALLATION ...............................................................................5
FIGURE 4 THE “LIST HEADLINES” TAB...........................................................................................................................6
FIGURE 5 THE “ABOUT THE MODULE” TAB ...................................................................................................................8
FIGURE 6 THE “HELP” TAB ............................................................................................................................................8
FIGURE 7 THE PREFERENCES OPTIONS............................................................................................................................9
FIGURE 8 THE USER VIEW OF THE MODULE ....................................................................................................................9
FIGURE 9 HEADLINES SEEN LIVE ON THE YOUR WEBSITE.............................................................................................10
4. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 4 of 13 XOOPS Documentation Team
Module Purpose
“XOOPS Headlines” module allows you to display RSS/XML news feeds from other websites. A news
feed is a file summarizing elements of a site’s content, a service commonly provided by dynamic
websites. Linking to the feed allows you to display ‘headlines’ and other content from the remote site on
your own that will update automatically as the remote site changes. This module is typically used as a
news aggregator or syndication tool.
Note that the XOOPS core system generates its own built in RSS feed, accessible from
http://www.yourdomain.com/backend.php. Some XOOPS modules generate additional module-specific
feeds.
Figure 1 Main view of the XOOPS Headlines Module (Admin side)
Install/Uninstall
No special measures necessary, follow the standard installation process – extract the module folder into
the /modules directory. Install the module through Admin -> Modules -> Install Modules (see below).
5. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 5 of 13 XOOPS Documentation Team
Figure 2 The Module Administration and Installation
Detailed instructions on installing modules are available in the XOOPS Operations Manual.
To uninstall the module, just click on the red arrow:
Figure 3 The Module Administration and un-installation
Operating instructions
To use this module you simply need to enter the details of news feeds you wish to use on your site (see
‘List headlines’ below), and ensure that your user groups have access rights to the Headlines module
(and block, if you decide to use it). Once the feeds are configured they are self-maintaining – they will
update automatically as the remote websites refresh their content.
Administration Menu
There are four options on top:
Option Action
Preferences Here you can configure your preferences for the module
Update Click here if you’ve made some changes to the module, uploaded
new files, etc. – this will recompile the module and update all
entries in the database
Blocks When you click here, it will redirect you to the Blocks section of
XOOPS, and select the blocks related to your module
Go to module If the module is visible on the user side, this will take you there
There are three Tabs in the Administration of the XOOPS Partners module:
Home
About
6. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 6 of 13 XOOPS Documentation Team
List Headline
Help
Figure 4 The “List Headlines” Tab
There are no configuration options available for the module per se; rather you add, configure and delete
individual news feeds through the ‘List headlines’ link in the administrative menu. This opens the form
shown below. When adding a new feed the options are:
Option Function
Add Headlines
Site name: The title of the website providing the feed
URL: The URL of the website providing the feed
URL of RDF/RSS file: Important ! The URL to access the actual feed
itself. If you get this wrong, the feed will not work.
Order: Sets the order in which this feed will appear in the
list relative to the others. This is the same as
‘weighting’ used in most other modules.
7. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 7 of 13 XOOPS Documentation Team
RSS Encoding: Feeds can be encoded in different ways. You need
to set the right encoding so that the module can
read the feed. To find out what encoding a feed is
using, open the feed URL and look at the contents
of the file in your browser. Usually the type of
encoding is indicated in the first few lines.
Cache time: The contents of feeds are cached for a specified
period of time – the Headlines module doesn’t call
the feed from the remote site every time it is
accessed ! You can choose to cache feeds
anywhere from 1 hour to 1 month. Consider how
frequently the remote site is updated and set your
cache time appropriately. Bear in mind that you are
drawing on the bandwidth of the remote site each
time the feed is called.
Main Page Settings
Display in main page: Do you want this feed to be visible on the
Headlines index page ? Default is ‘yes’.
Display image: Some feeds include a logo or image for the remote
site. Do you want to display it, if it is available ?
Default is ‘no’.
Display in full view: Select ‘yes’ to display the headlines plus the first
few lines of each story. If you select ‘no’ (default)
only the headlines will be displayed.
Max items to display: How many of the most recent headlines/items do
you want to display from this feed ? You can
choose from 1 to 30. The default is 10.
Block Settings
Display in block ? Do you want this feed to be included in the
Headlines block ? Default is ‘yes’.
Display image ? Do you want to display the feed’s image in the
block ? Default is ‘no’.
Max items to display How many of the most recent headlines/items do
you want to display from this feed ? You can
choose from 1 to 30. The default is 5.
Once a feed has been entered it will be included in the summary feed list, where you can easily edit its
display modes, order, cache time, and encoding. Select the ‘Edit’ link to configure other properties.
8. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 8 of 13 XOOPS Documentation Team
Figure 5 The “About the Module” Tab
Figure 6 The “Help” Tab
9. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 9 of 13 XOOPS Documentation Team
Preferences
In the Preferences, you can set the most important options for the module, such as the elements of the
form that will be visible to the user. The Preference options are pretty well described:
Figure 7 The Preferences options
The User Side
The Headlines module is very simple from the user perspective. The Headlines index page displays a list
of available feeds at the top. Users can view different feeds simply by selecting a link from the list. The
contents of the currently selected feed are displayed below. Users can select articles/items of interest,
which open the remote (source) site in a new window.
Figure 8 The User view of the module
Blocks
The Headlines block simply displays links to the content of the feeds you have listed.
10. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 10 of 13 XOOPS Documentation Team
Figure 9 Headlines seen live on the your Website
If you set “Display in Block” to “Yes” in the Headlines preferences, you can now see them here.
In this case, the block is linking to two separate websites that provide articles about XOOPS and Sports
from Yahoo. Clicking on the title of the site, for example “XOOPS Official Website” will open the URL
listed as the feed’s home page, while clicking on a ‘headline’ will open an individual article on the remote
site. In either case, the remote site will open in a new window.
This is done by using blocks. To manage blocks, click on the “Blocks” link in the module’s Administration:
When you click on the top menu “Blocks” you’ll be redirected to the Blocks screen, with the Headlines
blocks already filtered out for you:
11. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 11 of 13 XOOPS Documentation Team
Headlines Module provides you with only one block. First, let’s move the block to the Right position, and
set the block to be visible by clicking on the “visibility” icon, which can have two states:
Visible (on-line)
invisible (off-line)
Now that we have it visible, let’s edit it by clicking on the “Edit” icon :
Now the “Block Edit” screen will open up:
12. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 12 of 13 XOOPS Documentation Team
These are the options that we need to change:
Option Action
Block Type This to select the location where you want the block to be visible.
We have already selected the Center Block – Center
Weight If you have several block and want to control their order, you should
set the Weight here, and the blocks will be sorted by their assigned
weight. “0” is the highest, and the higher the number, the lower the
position of the block5
Visible This has to be set to “Yes” if you want to make it visible
Visible in Here you can select which modules you want this block to be visible
in. The first two choices are the most common: either on the Top
Page (which is the page you see when you first get to the Website),
or on all pages. Or you can select individual module, or any
combination of them
Title You can change to a name that is more meaningful for your users
Content Edit Template This is only if you would like to make some changes to how the
block is presented
Cache lifetime If the module is not frequently updated or presenting live data, it is
useful to set a cache so the block won’t be generate every time
opens a page this will save some resources on your server
Group Here you can select the groups that you want to see the block
Most of the time you can leave it as it is.
Once the block is set correctly and made visible, the Headlines can be seen on the User side:
13. XU-302 Headlines Module Tutorial
Last change: 11/26/2011 3:19 PM Page 13 of 13 XOOPS Documentation Team
Templates
xoopsheadline_index.html
This is the template for the Headlines index page.
xoopsheadline_feed.html
This template displays the details of an individual feed when you open it on the index page.
xoopsheadline_block_rss.html
This is the template for the Headlines block; it shows links to syndicated headlines from other sites via
RDF/RSS news feeds.
Module Credits
The Partners module was written by Kazumi Ono (Onokazu), and modified by Jim Garrett (ZySpec)