You are here

function ad_embed_help in Advertisement 5.2

Same name and namespace in other branches
  1. 5 embed/ad_embed.module \ad_embed_help()
  2. 6.3 embed/ad_embed.module \ad_embed_help()
  3. 6 embed/ad_embed.module \ad_embed_help()
  4. 6.2 embed/ad_embed.module \ad_embed_help()
  5. 7 embed/ad_embed.module \ad_embed_help()

Implementation of hook_help().

File

embed/ad_embed.module, line 14
Embed ads in content.

Code

function ad_embed_help($path) {
  switch ($path) {
    case 'admin/help#ad_embed':
      $output = '<p>' . t('The ad_embed module uses the ad module to replace special tags with random advertisements, or to automatically insert ads after a number of paragraphs in your content.  The module allows you to specify which ad group to select ads from and how many ads to display.  Instead of selecting ads from ad groups, it also allows you to specify individual ads by their node id.') . '</p>';
      $output .= '<p><b>' . t('Replace tags:') . '</b><br />';
      $output .= t('Content must have been created by a user with <em>embed ads in content</em> permissions for tags to be replaced.  The ad_embed module supports two different types of tags.  One uses double brackets, looking like <em>[[ad]]</em>, the other uses an html comment, looking like <em>&lt;!--ad--&gt;</em>.  Individual parameters are then separated by the | (pipe) character.  For individual parameters with multiple values, the values are separated by commas.') . '</p>';
      $output .= '<p>' . t('Using html comments has the advantage that if you decide to disable the ad_embed module, the ads will simply disappear (as they will be html coments.  The downside to using html comments is that you need to configure your Input Filter to not filter them out.  Using brackets can be simpler to get working.') . '</p>';
      $output .= '<p><em>' . t('Parameters:') . '</em><br />';
      $output .= t('The following parameters can be used within embedded advertisement tages:') . '</p>';
      $output .= '<ul>';
      $output .= '  <li>' . t('<em>groups</em>: specify which group to select random ads from.');
      $output .= '  <li>' . t('<em>quantity</em>: specify how many ads to display at once.');
      $output .= '  <li>' . t('<em>hostid</em>: specify a unqiue when logging views and clicks.  (This is primarily intended for use when hosting ads on remote websites.)');
      $output .= '  <li>' . t('<em>nids</em>: a list of ads from which to select from.  If <em>nids</em> is specified, the <em>groups</em> parameter will be ignored.');
      $output .= '</ul></p>';
      $output .= '<p><em>' . t('Examples:') . '</em><br />';
      $output .= t('The following examples should help you to understand how to embed ads within your content.');
      $output .= '<ul>';
      $output .= '  <li>' . t('<em>[[ad]]</em><br />This will display one random ad from ads that are not assigned to any group.') . '</li>';
      $output .= '  <li>' . t('<em>&lt;!--ad--&gt;</em><br />This will display one random ad from ads that are not assigned to any group.') . '</li>';
      $output .= '  <li>' . t('<em>[[ad|quantity=2]]</em><br />This will display two random ads from ads that are not assigned to any group.') . '</li>';
      $output .= '  <li>' . t('<em>[[ad|group=23]]</em><br />This will display one random ad from the group with a tid of 23.') . '</li>';
      $output .= '  <li>' . t('<em>&lt!--ad|nids=1,13,42,76|quantity=4]]</em><br />This will display all four listed ads in a random order.') . '</li>';
      $output .= '</ul>';
      $output .= '<p><b>' . t('Automatically embedding ads:') . '</b><br />';
      $output .= '<p>' . t('You can enable the functionality to automatically embed ads in your content at <em>administer >> ads >> settings >> embed ads</em>.  On this configuration page, you can choose which content types should contain automatically embedded ads, after which paragraph the ad should appear, and from which ad group the advertisement should be selected.') . '</p>';
      break;
  }
  return $output;
}