Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
glfusion:glbanner:start [2010/02/23 15:48]
lee Add known issue re pubic variable declarations
glfusion:glbanner:start [2017/10/06 16:31]
lee
Line 1: Line 1:
 ====== glBanner - Banner Ad Plugin ====== ====== glBanner - Banner Ad Plugin ======
-The Banner plugin allows administrators to create banner ads which may be displayed in the header and footer.  Banners may be assigned to Campaigns, which are assigned to a site member.+The Banner plugin allows administrators to create banner ads which may be displayed in the header and footer. Banners may be assigned to Campaigns, which are assigned to a site member.
  
 ===== Requirements ===== ===== Requirements =====
- +  * glFusion v1.7.0 or newer 
-  * glFusion v1.1.or newer+  * lgLib plugin 1.0.5 or newer
  
 ===== Installation ===== ===== Installation =====
- 
 The Banner Plugin uses the glFusion automated plugin installer.  Simply upload the distribution using the glFusion plugin installer located in the Plugin Administration page. The Banner Plugin uses the glFusion automated plugin installer.  Simply upload the distribution using the glFusion plugin installer located in the Plugin Administration page.
- 
  
 ===== Upgrading ===== ===== Upgrading =====
- 
 The upgrade process is identical to the installation process, simply upload the distribution from the Plugin Administration page. The upgrade process is identical to the installation process, simply upload the distribution from the Plugin Administration page.
- 
  
 ===== Features ===== ===== Features =====
- 
   * Banners may be one of sevaral types:   * Banners may be one of sevaral types:
     * Locally-uploaded image     * Locally-uploaded image
     * Remotely-hosted image     * Remotely-hosted image
     * Raw HTML or Javascript, such as Google Adsense     * Raw HTML or Javascript, such as Google Adsense
 +    * glFusion autotag
   * Banners may be published for a limited period, or up to a maximum number of impressions or hits.   * Banners may be published for a limited period, or up to a maximum number of impressions or hits.
-  * Banners may be grouped into Campaigns.  Campaigns may also have limited publishing periods and hit limits.+  * Banners may be grouped into Campaigns. Campaigns may also have limited publishing periods and hit limits.
   * Banners may be weighted to give priority to certain ads.   * Banners may be weighted to give priority to certain ads.
   * Campaign owners may disable and enable specific banners within their campaigns.   * Campaign owners may disable and enable specific banners within their campaigns.
-  * Banner Categories are used to determine placement of the banners.  Categories may be enabled or disabled, and administrators may create their own categories.+  * Banner Categories are used to determine placement of the banners. Categories may be enabled or disabled, and administrators may create their own categories.
     * 'header' and 'footer' category types are used to place banners in the header and footer templates.     * 'header' and 'footer' category types are used to place banners in the header and footer templates.
     * 'block' category types are used to place banners in left or right blocks.     * 'block' category types are used to place banners in left or right blocks.
Line 47: Line 43:
  
 ====Categories==== ====Categories====
-Categories indicate the placement of the banners.  Three categories are provided at installation and may not be deleted: +The glFusion "AdBlock" feature is used to place banners in your site. The Banner plugin uses Categories to indicate which banners may be placed in the different possible ad blocks. 
-^Category^Description^ + 
-|Header|Replaces {banner_header} in the site template with the banner ad.  Requires "The banner is displayed with the template" to be enabled in the plugin configuration.| +The administrator may disable the default categories or create other categories to have ads appear in blocks or embedded in other content. 
-|Footer|Replaces {banner_footer} in the site template with the banner ad.  Requires "The banner is displayed with the template" to be enabled in the plugin configuration.| + 
-|Block|Places the banner in the Banner and the Random Banner blocks These blocks are created but not enabled during installation.| +Plugins that return template names that can display an ad block are shown on the Category edit screen. Some, like a Header, will logically only display one ad while others may display multiple ads interspersed with the content.  
-The administrator may disable the default categories or create other categories to have ads appear in blocks or embedded in other content.  Other category types may be used for additional blocks or with autotagsfor example.  The Header and Footer categories are fixed in their purpose.+ 
 +==Category ID== 
 +A unique identifier for the category, may be anything 
 +   
 +==Category Name== 
 +The display name for the category 
 +   
 +==Category Type== 
 +Deprecated, unused beginning with plugin version 0.3.0 
 +   
 +==Category Description== 
 +This is just for you notes and is not displayed anywhere. 
 +   
 +==Topic== 
 +Select a topic, or "All", where ads in this category should appear 
 +   
 +==Max Image Width and Height== 
 +Enter the maximum image size that can be uploaded for this category. This is to ensure that uploaded images conform to the spaces where banners will be placed. 
 +   
 +==Enabled== 
 +Enable or disable this category. 
 +   
 +==Centerblock== 
 +Indicate if this category is used as a Centerblock on the home page 
 + 
 +===Template Support=== 
 +==Enabled== 
 +Each template name must be enabled. If this box is unchecked, the template variable will not be set
 + 
 +==Position== 
 +For locations that allow multiple placements, select the position of the ad. For example, select "1" to have the banner appear after the first item, "2" to have it appear after the second, etc
 + 
 +==Show Once?== 
 +If this box is checked, then a banner on a list-type page will appear only once according to the Position. If left unchecked, then the Position is used to determine multiple placements, e.g. placing a banner after every 2nd item
 + 
 +==Show In Content?== 
 +Check this box to have the banner also shown in the main content area, such as the story body, if supported by the content type. 
 + 
 +=== Examples === 
 +To have a banner show only in the story index after every third story: 
 +  * Template: article 
 +  * Enabled: Checked 
 +  * Position: 3 
 +  * Show Once: Unchecked 
 +  * Show in Content: Unchecked 
 + 
 +To have the banner also be displayed in the story contentcheck "Show In Content" 
 + 
 +To display a banner only in the story content page and not in the index: 
 +  * Template: article 
 +  * Enabled: Checked 
 +  * Position: 0 (This disables the list display) 
 +  * Show Once: n/a 
 +  * Show in Content: Checked 
 + 
 +To display a banner once in the article index, between the first and second listing: 
 +  * Template: article 
 +  * Enabled: Checked 
 +  * Position: 1 
 +  * Show Once: Checked 
 +  * Show in Content: Unchecked 
  
 One or more categories may also be selected to appear in the Centerblock.  Refer to the [[#Centerblock Options]] for help with this configuration. One or more categories may also be selected to appear in the Centerblock.  Refer to the [[#Centerblock Options]] for help with this configuration.
Line 65: Line 122:
 ====Banners==== ====Banners====
 ===Header and Footer Banners=== ===Header and Footer Banners===
-Banners under the "Header" and "Footer" categories (or any category of type "header" or "footer") are automatically placed in the glFusion template, replacing the variables {banner_header} and {banner_footer}, respectively.  Most likely you'll want to add {banner_header} in the header.thtml file and {banner_footer} in footer.thtml, but the plugin actually has no knowledge of where the banners are placed. 
- 
 Also, if you **do** create Header or Footer banners, but do **not** implement the template variables, you'll need to turn off "Show Banners in Templates" in the plugin online configuration.  Since the plugin has no way of knowing whether the template variables are actually defined, the impression count will quickly become inaccurate as the plugin thinks that it is constantly displaying banners when it isn't. Also, if you **do** create Header or Footer banners, but do **not** implement the template variables, you'll need to turn off "Show Banners in Templates" in the plugin online configuration.  Since the plugin has no way of knowing whether the template variables are actually defined, the impression count will quickly become inaccurate as the plugin thinks that it is constantly displaying banners when it isn't.
  
Line 241: Line 296:
     * {{:glfusion:glbanner:category.class.php.gz|}}     * {{:glfusion:glbanner:category.class.php.gz|}}
  
-===== License =====+====Version 0.1.1==== 
 +One of the changes is to the glFusion-style date fields in the banner form.  A misplaced parentheses causes an error if you use 24-hour time.
  
 +Around line 1175 of banner.class.php, replace this:
 +<code php>if ($_CONF['hour_mode'] == 24) {
 +    $T->set_var('start_hour_options',
 +        COM_getHourFormOptions(date('H', $startdt, 24)));
 +    $T->set_var('end_hour_options',
 +        COM_getHourFormOptions(date('H', $enddt, 24)));
 +} else {</code>
 +with this:
 +<code php> if ($_CONF['hour_mode'] == 24) {
 +    $T->set_var('start_hour_options',
 +        COM_getHourFormOptions(date('H', $startdt), 24));
 +    $T->set_var('end_hour_options',
 +        COM_getHourFormOptions(date('H', $enddt), 24));
 +} else {</code>
 +See that one of the closing parentheses is moved from the end of the COM_getHourFormOptions lines to right after the date variable name.
 +
 +
 +===== License =====
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
  
Logged in as: Guest (anonymous)
glfusion/glbanner/start.txt · Last modified: 2020/08/31 18:52 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3