You are here

function shadowbox_help in Shadowbox 6

Same name and namespace in other branches
  1. 8 shadowbox.module \shadowbox_help()
  2. 5.2 shadowbox.module \shadowbox_help()
  3. 5 shadowbox.module \shadowbox_help()
  4. 6.4 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 11
Shadowbox, a JavaScript media viewer application for displaying content in a modal dialog.

Code

function shadowbox_help($path, $arg) {
  switch ($path) {
    case 'admin/help#shadowbox':
      $output = '<p>' . t('Shadowbox is a modal media viewer application akin to <a href="!lightbox_project">Lightbox2</a> and <a href="!thickbox_project">Thickbox</a>. 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(
        '!thickbox_project' => url('http://drupal.org/project/thickbox', array(
          'absolute' => TRUE,
        )),
        '!lightbox_project' => url('http://drupal.org/project/lightbox2', array(
          'absolute' => TRUE,
        )),
      )) . '</p>';
      $output .= '<strong>' . t('From the author of Shadowbox:') . '</strong>';
      $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 currently provides only the most basic of functionality. It has <a href="!shadowbox_settings">global settings</a> that work on a site-wide basis. This means if you change a setting it will apply to all the Shadowboxes on your site.', array(
        '!shadowbox_settings' => url('admin/settings/shadowbox'),
      )) . '</p>';
      $output .= '<p>' . t('Future versions of this module will integrate with imagefield, imagecache and other important Drupal image modules and provide more options for configuring Shadowbox on a per-instance basis.') . '</p>';
      $output .= '<h3>' . t('Usage:') . '</h3>';
      $output .= '<p>' . t('Currently, to activate Shadowbox for a link, you must manually inject the required attribute. Depending on your needs you may need to do this on the theming layer. To open any link in shadowbox you need to 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 <a href="!shadowbox_usage">Shadowbox usage page</a>.', array(
        '!shadowbox_usage' => url('http://mjijackson.com/shadowbox/doc/usage.html#markup', array(
          'absolute' => TRUE,
        )),
      )) . '</p>';
      return $output;
    case 'admin/settings/shadowbox':
      return t('<p>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>');
  }
}