|
Add To My Yahoo Module and Tutorial |
|
|
|
|
Page 2 of 3
mod_myyahoo.xml This file aids the installation and defines the parameters for use with the module.
<?xml version="1.0" encoding="iso-8859-1"?> <mosinstall type="module" version="4.5.2">
First, the file is identified as valid XML and labled with the character set found within. The 'mosinstall' tag declares this package to be a module for version 4.5.2 and later.
<name>Add To My Yahoo</name> <author>Joseph LeBlanc</author> <creationDate>March 11, 2005</creationDate> <copyright>(C) 2005</copyright> <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license> <authorEmail>contact@jlleblanc.com</authorEmail> <authorUrl>www.jlleblanc.com</authorUrl> <version>1.0</version> <description>A button enabling visitors to add the site's newsfeed to their My Yahoo! page</description>
These tags properly identify for the pacakge. With the exception of 'name', the absence of values for these tags will not hinder the installation process.
<files> <filename module="mod_myyahoo">mod_myyahoo.php</filename> </files>
This is a list of files for the package. In this case there is only one module file.
<params> <param name="shortmessage" type="text" default="" label="Short Message" description="Enter a short message to be displayed with the link (optional)" />
This tag provides an input for adding a short message just before the button is displayed. It is the first in a set of tags which define the parameters for use. The 'name' attribute is a one-word identifier Mambo stores with the module configuration. For a typical input box, 'type' is set to 'text'. Other possible values include 'radio' for radio button interfaces and 'list' for drop-down lists. A complete list of parameter types is available on the help.mamboserver.com website. If a value for the parameter should be stored upon install, set it with 'default'. A short description set with 'label' is displayed next to the forum input. Detailed explanations of the parameter's significance can be defined in 'description', which displays in a mouseover pop-up next to the short description.
<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling" />
This input allows the administrator to add a suffix onto the end of the module's CSS class when unique styling is desired. For instance, if all of the other module links are set to display with a hover effect that would be undesirable for the button, a module class suffix can be used to override this while preserving the original style.
<param name="feed" type="list" default="RSS 0.91" label="RSS Feed" description="RSS feed to send to My Yahoo!"> <option value="RSS 0.91">RSS 0.91</option> <option value="RSS 1.0">RSS 1.0</option> <option value="RSS 2.0">RSS 2.0</option> <option value="Atom">Atom</option> </param>
The previous two parameters were defined with one tag, while this one encapsulates several options. Administrators can set the button to pull from any of the feeds defined here.
<param name="button" type="radio" default="long" label="Button Style" description="Add to My Yahoo! button style"> <option value="long">Long bar</option> <option value="short">Short with text description</option> </param>
Yahoo! currently has two different button styles available. Instead of using a drop-down list, a radio button group is sufficient. The coding is almost identical to the feed choice, but defines the type as 'radio' instead of 'list'.
</params> </mosinstall>
These two tags finish the list of parameters and the module installation.
|