Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

{jr_gravatar} Index {jr_html_select}

{jr_html_ad}

Overview:

{jr_html_ad} is used for embedding a static or rotating set of advertisements into a template.

Usage:

Place the html code for each ad that you want to rotate into its own template in your skins/<skin_name>/ads directory, where <skin_name> is replaced with your current skin, such as Cobalt:

jamroom/skins/Cobalt/ads

Each advertisement template should be named with the following conventions: ad#.tpl, where the "#" is replaced by a number, such as ad4.tpl.

 Note: It is extremely important that all templates in your ads directory be named with these conventions, and that the number portion of all templates are consecutive, beginning with 1 (i.e. templates named ad1.tpl, ad2.tpl, ad3.tpl, NOT ad2.tpl, ad4.tpl, ad7.tpl).

Parameters:

Name Type Required Default Description
id integer no n/a If an advertisement id is given, the ad with the specified id will be displayed.  The advertisement id is the numeric portion of the advertisement template name (i.e. the ad id of a template called ad4.tpl is 4).
ad_dir string no "ads" The ad_dir directory tells Jamroom the name of the directory within the skin to look for ad templates in.
skin string no Cobalt The skin parameter tells the function to look in the skins/<skin_name> directory to find ads folder from which to draw ads from.  If this is not supplied, the function will look in the Cobalt directory.
assign string no n/a optional "assign" parameter - if given, the output of the function will be assigned to a template variable of the same name.

 

Examples:

embedded {jr_html_ad} function call in template, displaying a rotating ad:

{jr_html_ad}

embedded {jr_html_ad} function call to display the ad with the advertisement id "4" inside the skins/Custom/ads directory:

{jr_html_ad id="4" skin="Custom"}

{jr_gravatar} page 126 of 171 {jr_html_select}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network