You are here

function shadowbox_help in Shadowbox 5

Same name and namespace in other branches
  1. 8 shadowbox.module \shadowbox_help()
  2. 5.2 shadowbox.module \shadowbox_help()
  3. 6.4 shadowbox.module \shadowbox_help()
  4. 6 shadowbox.module \shadowbox_help()
  5. 6.2 shadowbox.module \shadowbox_help()
  6. 6.3 shadowbox.module \shadowbox_help()
  7. 7.4 shadowbox.module \shadowbox_help()
  8. 7.3 shadowbox.module \shadowbox_help()

Implementation of hook_help().

File

./shadowbox.module, line 12
Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.

Code

function shadowbox_help($section) {
  switch ($section) {
    case 'admin/help#shadowbox':
      $output = '<p>' . t('Shadowbox is a modal media viewer application akin to !lightbox_project and !thickbox_project. You can use it to display images, movies, and other web content in a window that is overlaid on top of the originating page.', array(
        '!lightbox_project' => l('lightbox2', 'http://drupal.org/project/lightbox2', array(), NULL, NULL, TRUE),
        '!thickbox_project' => l('thickbox', 'http://drupal.org/project/thickbox', array(), NULL, NULL, TRUE),
      )) . '</p>';
      $output .= '<h3>' . t('From the author of Shadowbox:') . '</h3>';
      $output .= '<blockquote>' . t('Shadowbox is a cross-browser, cross-platform, cleanly-coded and fully-documented media viewer application written entirely in JavaScript. Using Shadowbox, website authors can display a wide assortment of media in all major browsers without navigating away from the linking page.') . '</blockquote>';
      $output .= '<p>' . t('This module provides integration with imagefield 2, imagecache 2 and views. It has !global_settings that work on a site-wide basis. Future versions of this module will integrate with image, emfield and other media modules.', array(
        '!global_settings' => l('global settings', 'admin/settings/shadowbox'),
      )) . '</p>';
      $output .= '<h3>' . t('Usage:') . '</h3>';
      $output .= '<p>' . t('Integration with Imagefield, Imagecache and Views is provided so the usual options are available. To manually enable Shadowbox for a link you must add a <strong><code>rel</code></strong> attribute with a value of <strong><code>shadowbox</code></strong> (for compatibility with lightbox you can also use a value of <strong><code>lightbox</code></strong>).') . '</p>';
      $output .= '<strong>' . t('Single image:') . '</strong>';
      $output .= '<p>' . t('The important thing to note here is the <code>rel</code> attribute. This tells Shadowbox you wish to activate it for this link. The <code>title</code> attribute is optional and can be used to give a caption to the instance.') . '</p>';
      $output .= '<p>' . t('<code><pre>&lt;a href=&quot;/files/image1.jpg&quot; rel=&quot;shadowbox&quot; title=&quot;Caption&quot;&gt;Image&lt;/a&gt;</pre></code>') . '</p>';
      $output .= '<strong>' . t('Multiple instances (gallery mode):') . '</strong>';
      $output .= '<p>' . t('Media can be grouped into a gallery using <code>shadowbox[name]</code> where <code>name</code> is any name you wish to apply. The value of <code>[name]</code> is only used internally by Shadowbox and won\'t be shown to the user.') . '</p>';
      $output .= '<p>' . t('<code><pre>&lt;a href=&quot;/files/image1.jpg&quot; rel=&quot;shadowbox[gallery]&quot; title=&quot;Caption 1&quot;&gt;Image&lt;/a&gt;
&lt;a href=&quot;/files/image2.jpg&quot; rel=&quot;shadowbox[gallery]&quot; title=&quot;Caption 2&quot;&gt;Image&lt;/a&gt;
&lt;a href=&quot;/files/image3.jpg&quot; rel=&quot;shadowbox[gallery]&quot; title=&quot;Caption 3&quot;&gt;Image&lt;/a&gt;</pre></code>') . '</p>';
      $output .= '<strong>' . t('External URL:') . '</strong>';
      $output .= '<p>' . t('A powerful feature of Shadowbox is the ability to open web pages directly on top of the current page. Try out the example and see how the site still functions as normal on top of the originating page.') . '</p>';
      $output .= '<p>' . t('<code><pre>&lt;a href=&quot;http://google.com&quot; rel=&quot;shadowbox&quot; title=&quot;Google&quot;&gt;Google&lt;/a&gt;</pre></code>') . '<p>';
      $output .= '<h3>' . t('Advanced usage:') . '</h3>';
      $output .= '<p>' . t('Shadowbox allows you to specify options on a per-instance basis by using a JSON-formatted parameter. More information on this feature can be found on the !shadowbox_usage', array(
        '!shadowbox_usage' => l('Shadowbox usage page', 'http://mjijackson.com/shadowbox/doc/usage.html#markup', array(), NULL, NULL, TRUE),
      )) . '</p>';
      return $output;
    case 'admin/settings/shadowbox':
      return '<p>' . t('This page provides access to the Shadowbox settings. The settings work globally so any changes made here will affect Shadowbox for the entire site.') . '</p>';
  }
}