Online Documentation
Complete documentation can be found on the wiki.
Settings
Directory Settings
"URI of Gallery2" is the URI of the Gallery2 standalone location. Path from docroot to the directory main.php is located. Protocol / host name are both optional. Examples: /gallery2/, /sub/gallery2/, http://photos.example.com/,
www.example.com/photos/main.php
"Location of Gallery2" is the path of your gallery2 installation, either absolute (starts with "/") or relative to your Drupal installation directory. Normally this is auto-detected, but in case this fails you can turn off auto-detection and manually enter a value.
"Embed URI" is the URI needed to access Gallery2 through Drupal. This will end in \'?q=gallery\' (non-clean URLs) or \'gallery\' (clean URLs). Normally this is auto-detected, but in case this fails you can turn off auto-detection and manually enter a value.
Some examples:
Example 1: If your directory structure and website structure is
- Drupal dir: /var/www/web/html/
- Gallery dir: /var/www/web/html/gallery2/
- Website URL: http://www.example.com
- Standalone Gallery2 URL: http://www.example.com/gallery2/
- Then
- "URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"
- "Location of Gallery2" = "gallery2/" or "/var/www/web/html/gallery2/"
- "Embed URI" = "?q=gallery" or "http://www.example.com/?q=gallery"
Example 2: If your directory structure and website structure is
- Drupal dir: /var/www/web/html/drupal/
- Gallery dir: /var/www/web/html/gallery2/
- Website URL: http://www.example.com/drupal
- Standalone Gallery2 URL: http://www.example.com/gallery2/
- Then
- "URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"
- "Location of Gallery2" = "../gallery2/" or "/var/www/web/html/gallery2/"
- "Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"
Example 3: If your directory structure and website structure is
- Drupal dir: /var/www/web/html/drupal/
- Gallery dir: /var/www/web/html/someotherdir/gallery2/
- Website URL: http://www.example.com/
- Standalone Gallery2 URL: http://www.anotherexample.com/gallery2/
- Then
- "URI of Gallery2" = "http://www.anotherexample.com/gallery2/"
- "Location of Gallery2" = "/var/www/web/html/someotherdir/gallery2/"
- "Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"
Full Name settings
Drupal does not have in-built support for full names but Gallery 2 does. If you would like full names in both then you can install profile.module in Drupal and define a "full name" field. Include the name of that field here. You can enable/disable this functionality at will, but it may leave some users with different full names in their Drupal and Gallery users, so it is not recommended.
Search settings
You can select how many items are returned per Gallery2 module. You can also specify whether thumbnails should be returned, and if so, how they should be formatted.
Error Logging settings
You can choose whether errors occuring in this module are logged in the watchdog, displayed in the browser, or both.
');
$output .= _gallery_g2image_help();
return $output;
case 'admin/settings/gallery':
return t('');
/* Used in the default value for the pages list in g2image settings */
case 'admin/settings/gallery_g2image#pages':
return "node/*\ncomment/*";
}
}
function gallery_filter_short_tip_translated() {
return t('You may link to Gallery2 items on this site using a special syntax.', array ('@explanation-url' => url('filter/tips', NULL, 'filter-gallery-0')));
}
function gallery_filter_long_tip_translated() {
$prefix = variable_get("gallery_filter_prefix", "G2");
return t('
Gallery2 Filter:
You can link to items in your embedded Gallery2 using a special code. This code will be replaced by a thumbnail image that is linked to the actual item in your Gallery.
Syntax:
['. $prefix .':item_id n=number type=type size=number class=name frame=name album_frame=name item_frame=name]
- item_id (required): This is the item ID from Gallery2. If you look at the URL of the item, this is the last number. Note that if the item_id is a single photo, n must be 1.
- n (suggested): This is the number of photos you want the block to show. It will override whatever is set in the defaults (initially 1). Note: this will change past instances where you did not set n -- the reason for its suggested use.
- type: The default type of gallery block. Any of the following may be used: randomImage, recentImage, viewedImage, randomAlbum, recentAlbum, viewedAlbum, dailyImage, weeklyImage, monthlyImage, dailyAlbum, weeklyAlbum, monthlyAlbum, specificItem. Note that for n=1, selectedItem is automatically chosen regardless of this parameter.
- class: The block that Gallery2 returns is wrapped in a DIV so additional styling can be done. The classes for this DIV are located in g2_filter.css. Included with the module are "left", "right", and "nowrap". These position the image block to the left or right or on a line all its own with the text not wrapping. You can also add your own class(es) to the CSS file and they will automatically be available.
- size: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio. This option (for Gallery2.2 and above) will use the gallery image that is closest in size, and so may end up using a smaller image and expanding it (lower quality). If so, use "exactsize". For Gallery2.1, if you want your size to be bigger than
the thumbnail size for that image as defined in your Gallery2, you must select "Full Size" in
the gallery settings page (but note that the full image will be returned and then resized by the
browser, so it may take a while to download).
- exactsize: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio. This option always ensures that the image is scaled
from a larger image and so image quality is maintained. This only works for Gallery2.2 and above.
- frame/album_frame/item_frame: You can use just "frame" to assign a frame to the thumbnail regardless of whether it\'s for an album or a single item. Using aframe will only affect albums and iframe will only affect single items. Frames included with the default Gallery 2 install are: bamboo, book, brand , dots, flicking, gold, gold2, polaroid, polaroids, shadow, shells, slide, solid, notebook, wood.
');
}
function _gallery_g2image_help() {
return t('
Gallery Image Assist (g2image)
Support for g2image in either Standalone or TinyMCE is available to simplify adding images already in your Gallery2 albums into your Drupal nodes.
Caution: By default, Drupal uses the \'Filtered HTML\' input format for adding content to the site and the default settings cause the <img> tags added by g2image to be removed. Check the TinyMCE documentation for instructions on how to avoid this.
');
}
?>