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

This document applies to Jamroom 3 only!
For current Jamroom 4 Documentation, visit the main Jamroom Documentation section.

{jr_forum_topics} Index {jr_google_analytics}

{jr_google_ad}

Overview:

{jr_google_ad} is used for embedding Google Adsense advertisements into a template.

Usage:

Place the {jr_google_ad} function, along with any additonal parameters, into a template to embed Google Adsense advertisements

Parameters:

Name Type Required Default Description
id integer yes n/a Required "id" parameter - this parameter must be given to tell the function your Google Adsense ID.  Without this, the function will not work correctly.  Your Google AdSense ID MUST begin with "pub-".
type string no text_image

Optional "type" parameter - if given, the "type" parameter tells the function what type of advertisement should be output.  There are four (4) possible types:

  • text_image
  • text
  • image
  • link
format string no leaderboard Optional "format" parameter - if given, the "format" parameter will tell the function how to format the advertisement in terms of pixel width and height.  There are thirteen (13) possible types (shown with corresponding pixel width x height):

  • leaderboard - 728 x 90
  • banner - 468 x 60
  • half_banner - 234 x 60
  • skyscraper - 120 x 600
  • wide_skyscraper - 160 x 600
  • vertical_banner - 120 x 240
  • large_rectangle - 336 x 280
  • medium_rectangle - 300 x 250
  • square - 250 x 250
  • small_square - 200 x 200
  • small_rectangle - 180 x 150
  • button - 125 x 125
  • link - 728 x 15

Only the format name need be given, not the pixel width and height, i.e. format="leaderboard").

width integer no yes, if height given

Optional "width" and height parameters - if given, these parameters maybe be given as alternatives to the format parameter, and must only be values acceptable by Google.  Acceptable values can be found above with the possible formats.  In addition to the widths and heights above, there are four (4) additional width x height combinations for use with the "link" type:

  • width: 728; height: 15
  • width: 468; height: 15
  • width: 200; height: 90
  • width: 180; height: 90
  • width: 160; height: 90
  • width: 120; height: 90
show integer no 4 Optional "show" parameter - only available with the "link" type.  If given, this parameter tells the function the number of advertisements to display.
channel integer no n/a Optional "channel" parameter - if given, the corresponding channel will be used with your Google AdSense advertisement.  You must give the numeric id of the channel for this parameter.  Numeric id numbers can be found on your Google AdSense control panel.  Additionally, an array of channels may be passed to the function using a jr_array.
border hexadecimal no n/a Optional "border" parameter - if given, the "border" parameter will change the color of the advertisement border.
bg hexadecimal no n/a Optional "bg" parameter - if given, the "bg" parameter will change the color of the advertisement background.
link hexadecimal no n/a Optional "link" parameter - if given, the "link" parameter will change the color of the advertisement's linked title.
text hexadecimal no n/a Optional "text" parameter - if given, the "text" parameter will change the color of the advertisement text.
url hexadecimal no n/a Optional "url" parameter - if given, the "url" parameter will change the color of the advertisement's url.
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_google_ad} function call in template using all defaults:

{jr_google_ad id="1111111111111"}

Make sure and replace "1111111111111" with your actual Google AdSense ID Number.

embedded {jr_google_ad} function call to display an image-only square banner ad with a channel:

{jr_google_ad id="1111111111111" type="image" format="square" channel="1234567890"}

{jr_forum_topics} page 150 of 185 {jr_google_analytics}
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