Module Settings

The general settings are the same as for any other module, so in the following only the specific parameters for “Header Image” will be explained: These parameters determine the behaviour of “Header Image”, on which trigger and which images to change. The individual settings are:

Linked To:

  • ( ) Default Image only
  • ( ) Current Section
  • ( ) Current Category
  • ( ) Current Parent Main Menu Item
  • ( ) Current Menu Item
  • ( ) Smart
  • ( ) Smart with…

This parameter defines to which ID of the currently shown content the images shall be linked to. Each content has a unique ID, and its ID-Number is used for changing the currently image.

Using Default Image only will set the module such that it only will work with the default image, regardless of the current contents context. This enables to build a Slideshow feature with default images and do some more flexible things with it.

So this enables the use of Section-ID, Category-ID, Main Menu-ID or Current Menu-ID for the image file name selection. For determining which ID's are used in your content, use the “Content” Menu or “Menu” Menu to determine your various IDs.

In case you are using “Linked To:” with “Category” it might happen that Mambo requires to show all content of one section. This would result in multiple choices for categories. In this case the module selects the first Category-ID in lowest order of the categories linked to the section requested.

Special is the Smart? setting, where you are allowed to use Section, Category and Menu Item-ID number directly in the filename and the module will select automatically from the available files. Plus additional capability to retrieve such context from the MTREE and Virtue-Mart Component.

Operation Mode:

  • ( ) Images or Files
  • ( ) Background
  • ( ) Use HTML Code

This option defines the mode of operation for the module.

Images or Files

The module will use files. Either image files with the extension defined in the later parameter, or any type of file if you define the wildcard “.*” as the image file extension.

By default, all files are treated as image files and the respective img tag is sent to the browser. Except for files that end in “.html”, these files will be read and its content is sent to the browser. This allows you also to make flexible use of “.html” files with this module.

Background

In this mode, only the full URL of the image is sent to the browser. Useful for use in backgrounds.

Example:

To dynamically change the background of a table cell use the following in your “index.php” template file:

background="<?php mosLoadModules ('header',-1); ?>"

This assumes that the module got assigned to the “header” position in the Mambo backend.

Use HTML Code

By putting any HTML Code into the HTML Code area, you can send other files instead of images as well.

For instance Macromedia Flash files:

If you want to send such files then set the Image Filename Prefix = “.swf” and enter the required HTML Code into the Code area that defines the Flash object embedding. Use the tag

#__image

instead of the original file name, the module will select the file automatically as per your settings and replace the tag with the current filename before sending it to the clients browser.

Slideshow Images with Smart-Mode

Sets the Slideshow feature.

Use Localization:

  • ( ) No
  • ( ) Yes

With this option you can allow localization of the files. This means that, dependant on the selected site language, that the files from a localized folder are used. This works best with Mambelfish (http://mambelfish.mamboforge.net) for multi-language sites.

And it works like this:

1) You should set the ISO-Code for your sites default language in your Administration-Backend through “Site → Global Configuration”. We now assume the ISO-Code for your site is “en_EN” for English. We use the full 4-letter ISO-Code !

2) Install and prepare Mambelfish to have your site in multiple languages, also use the ISO-Codes for the additional languages. We now assume that you have a second language, “ge_DE” for German. We use the full 4-letter ISO-Code !

3) Create in the folders where your header files and random files are located one additional subfolder for each language code:

Example:

For your header files:

/images/headers/
/images/headers/en_en/
/images/headers/ge_de/

For your random header files:

/images/randoms/
/images/randoms/en_en/
/images/randoms/ge_de/

4) Localize your header and random files and store them in the respective localized subfolders, use the same filename.

Now the module is able to select localized versions of you header files.

ALWAYS make sure that you have a localized version of your DEFAULT IMAGE FILE in the localized folders. If the module does not find a localized version of your default image file, localization is not performed by default. If the module does not find a localized subfolder for the header files or the random files, the respective localization is turned off as well and the files from the defined folders are used.

Images Folder: (/templates/your-template-path/images )

This defines the folder where the image files can be found. Please always use a forward slash for the folder name to meet the requirements and to make it clear to the browser that the folders starts from the domain. With above example the full image URL would be then: www.your-domain.com/templates/your-template-path/images

Image Filename Prefix: (headerimage_ )

Here enter the prefix of all image files, where the ID number will automatically added by the module. So for the files “topbanner_1.jpg”, “topbanner_2.jpg”, “topbanner_3.jpg” the Image Filename Prefix would be “topbanner_” All images must share the same filename prefix.

Extension of Image Files: (.jpg )

This is the file extension of the image files. Always also use the dot with it, so “.jpg”, “.gif”, “.png”, and so on. All images must share the same file extension.

Use of the wildcard “.*” is allowed, the module will then look for a matching filename. In case the matching file has the extension “.html” it is read and sent to the browser. All other file extensions are treated as image files.

Default Image Filename: (headerimage_default.jpg )

This is the name of the default image file that shall be shown if a specific image file was not found in the defined folder. That file must reside in the folder that you specified for the images.

Size of Image Border: (0 )

If you want a border to be displayed around the image, set the size here. “0” means no border, any other value greater than zero defines the border in pixels.

Image Alt-Text: (Top Banner )

If you want an alternate text for the images, then define that text here.

Hyperlink: (http://www.otherdomain.com )

If you want the image to a hyperlink too, enter the URL in here. You can use http: for external links or relative paths also. ===== Hyperlink with Default Image ===== Hyperlink with Default Image: * ( ) No * ( ) Yes Defines if the hyperlink defined above shall also be applied to the default image. ===== Random default image ===== Use a random default image: * ( ) No * ( ) Yes Defines if a random image shall be used in case the related image was not found or does not exist. Does not have an effect on the image for Frontpage, here always the default image is shown. ===== Random Images Folder ===== Random Images Folder: (/templates/…./random ) Specify the folder for any random images here. You may choose the same folder as for the other images, or choose a different one. To randomly select a default image from this folder, you also must turn “Use a random default image” to “YES”. ===== Nr. of images for a slideshow ===== Defines the number of random images that will be displayed together with the Slideshow feature. ===== HTML Code ===== HTML Code: ( any HTML Code in here ) Together with the option “Use HTML Code”, this is now the place where you put your HTML Code that shall be sent to the browser by the module. Use <code>#__image</code> (note the double underscores between # and image as replacement for the actual file name that is generated by the module based on your previous settings. <note> Due to Mambo adding “<br />” line break tags to the content of the HTML Code area for every line of code, the module does remove all those tags from the HTML Code entered into this textarea before sending it to the browser. If you wish to use a line break, use the “<br>” tag instead. </note> ===== Date & Time rules ===== The Date and Time rules defined here allow date and time based activation of the module. Any combination of date and time is allowed and by using only a time and a “zero” date the time is applied to the current time of day. That specific allows activation within a single day. For the time the 24h format is used, such as 08:30:00 and 14:30:00 according to the GNU Time Format. See more here on this. ===== Instance Activity Control ===== This module allows multiple instances, or to be used more than once on a page. This setting specifies how the individual Header Image modules organize themselves once there are more than one module used on a page, also following “Active by” and “Deactive by” rules: * Allow multiple active instances on a page - allows all Header Images for a page to be active at the same time. * Only one active instance at a time on a page - allows only one Header Image module to be active on a page, determined by the order of the modules set in the backend (first modules first). * Only one active instance in the group named below - allows only one Header Image module to be active within a named instance group. See also below at “Instance Group Name”. Used in combination with date/time rules this allows date and time based switching of images within one module position. ===== Instance Group Name ===== Header Image modules may be assigned to Instance Groups. By defining a common instance group name to two or more module instances, the module allows group related instance activity control. For example only one instance of the instance group “logos” may be active with the corresponding setting for “Instance Activity Control”. ===== Module Class Suffix ===== Module Class Suffix: (_header ) In case you want a different CSS-style applied to this image, then add the respective Module Class Suffix here. You also then need to change your CSS template and define the respective class there. ===== Debug Mode ===== Debug Mode: * ( ) Off * ( ) On Switch for displaying debugging information. Set to 'On' if you want to report non-desired behaviour of the module and post the output above of the image that then appears in your content to the forums. This will help us to help you.