#64498 - Added support for specific album in image block and grid image block. Thanks...
[project/gallery.git] / gallery_help.inc
c15e9178 1<?php
2// $Id$
5 * gallery.module : gallery_help.inc
6 * Help info
7 */
10 * Implementation of hook_help
11 */
12function _gallery_help($section) {
14 switch($section) {
15 case 'admin/modules#description':
16 return t('Integration with Gallery2.1 (%gallery_url)', array('%gallery_url' => 'http://gallery.menalto.com/'));
17 case 'filter#short-tip' :\r
18 return gallery_filter_short_tip_translated();\r
19 case 'filter#long-tip' :\r
20 return gallery_filter_long_tip_translated();
21 case 'admin/help#gallery_filter' :\r
22 return t('<p>Used to add image blocks from your embedded Gallery 2 to a node\r
23 like a blog entry or a story. To enable this feature and learn the proper syntax,\r
24 visit the <a href="%filters">filters configuration screen</a>.</p>',
25 array ('%filters' => url('admin/filters')));\r
26 case 'admin/help#gallery':
27 $output = t('
28 <p></p>
29 <h3>Settings</h3>
30 <h4>Directory Settings</h4>
31 <p>"URI of Gallery2" is the URI of the Gallery2 standalone location. Path from docroot to the directory main.php is located.
32 Protocol / host name are both optional. Examples: /gallery2/, /sub/gallery2/, http://photos.example.com/,
33 www.example.com/photos/main.php</p>
34 <p>"Location of Gallery2" is the path of your gallery2 installation,
35 either absolute (starts with "/") or
36 relative to your Drupal installation directory. Normally this is auto-detected, but in case
37 this fails you can turn off auto-detection and manually enter a value.</p>
38 <p>"Embed URI" is the URI needed to access Gallery2 through Drupal. This will end in
39 \'?q=gallery\' (non-clean URLs) or \'gallery\' (clean URLs). Normally this is auto-detected,
40 but in case this fails you can turn off auto-detection and manually enter a value.</p>
41 <p>Some examples:</p>
42 <p>Example 1: If your directory structure and website structure is
43 <ul>
44 <li>Drupal dir: /var/www/web/html/</li>
45 <li>Gallery dir: /var/www/web/html/gallery2/</li>
46 <li>Website URL: http://www.example.com</li>
47 <li>Standalone Gallery2 URL: http://www.example.com/gallery2/</li>
48 <li>Then<ul>
49 <li>"URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"</li>
50 <li>"Location of Gallery2" = "gallery2/" or "/var/www/web/html/gallery2/"</li>
51 <li>"Embed URI" = "?q=gallery" or "http://www.example.com/?q=gallery"</li>
52 </ul>
53 </ul>
54 </p><p>Example 2: If your directory structure and website structure is
55 <ul>
56 <li>Drupal dir: /var/www/web/html/drupal/</li>
57 <li>Gallery dir: /var/www/web/html/gallery2/</li>
58 <li>Website URL: http://www.example.com/drupal</li>
59 <li>Standalone Gallery2 URL: http://www.example.com/gallery2/</li>
60 <li>Then<ul>
61 <li>"URI of Gallery2" = "/gallery2/" or "http://www.example.com/gallery2/"</li>
62 <li>"Location of Gallery2" = "../gallery2/" or "/var/www/web/html/gallery2/"</li>
63 <li>"Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"</li>
64 </ul>
65 </ul>
66 </p><p>Example 3: If your directory structure and website structure is
67 <ul>
68 <li>Drupal dir: /var/www/web/html/drupal/</li>
69 <li>Gallery dir: /var/www/web/html/someotherdir/gallery2/</li>
70 <li>Website URL: http://www.example.com/</li>
71 <li>Standalone Gallery2 URL: http://www.anotherexample.com/gallery2/</li>
72 <li>Then<ul>
73 <li>"URI of Gallery2" = "http://www.anotherexample.com/gallery2/"</li>
74 <li>"Location of Gallery2" = "/var/www/web/html/someotherdir/gallery2/"</li>
75 <li>"Embed URI" = "/drupal/?q=gallery" or "http://www.example.com/drupal/?q=gallery"</li>
76 </ul>
77 </ul>
78 </p>
79 <h4>Full Name settings</h4>
80 <p>Drupal does not have in-built support for full names but Gallery 2 does. If you would like
81 full names in both then you can install profile.module in Drupal and define a "full name" field.
82 Include the name of that field here. You can enable/disable this functionality at will, but it
83 may leave some users with different full names in their Drupal and Gallery users, so it is not
84 recommended.</p>
85 <h4>Search settings</h4>
86 <p>You can select how many items are returned per Gallery2 module. You can also specify
87 whether thumbnails should be returned, and if so, how they should be formatted.</p>
88 <h4>Error Logging settings</h4>
89 <p>You can choose whether errors occuring in this module are logged in the watchdog,
90 displayed in the browser, or both.</p>
91 ');
92 $output .= _gallery_g2image_help();
93 return $output;
94 case 'admin/settings/gallery':
95 return t('');
96 case 'admin/settings/gallery_g2image#pages':
97 return "node/*\ncomment/*";
98 }
101function gallery_filter_short_tip_translated() {\r
102 return t('You may link to Gallery2 items on this site <a href="%explanation-url">using a special syntax</a>.', array ('%explanation-url' => url('filter/tips', NULL, 'filter-gallery-0')));\r
105function gallery_filter_long_tip_translated() {\r
106 $prefix = variable_get("gallery_filter_prefix", "G2");\r
108 $output = "";\r
109 $output .= '<p><strong>Gallery2 Filter:</strong><p>You can link to items in your ';\r
110 $output .= 'embedded Gallery2 using a special code. ';\r
111 $output .= 'This code will be replaced by a thumbnail image that is ';\r
112 $output .= 'linked to the actual item in your Gallery. </p>';\r
113 $output .= '<p><em>Syntax:</em></p>';\r
114 $output .= '<blockquote><code>';\r
115 $output .= '['.$prefix.':<em>item_id</em> n=<em>number</em> type=<em>type</em> size=<em>number</em> class=<em>name</em> frame=<em>name</em> album_frame=<em>name</em> item_frame=<em>name</em>]';\r
116 $output .= '</code></blockquote>';\r
118 $output .= '<ul><li>item_id (required): This is the item ID from Gallery2. ';\r
119 $output .= 'If you look at the URL of the item, this is the last number. '.'<em>Note that if the item_id is a single photo, n must be 1.</em></li> ';\r
121 $output .= '<li>n (suggested): This is the number of photos you want the block to show. ';\r
122 $output .= '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.</li> ';\r
124 $output .= '<li>type: The default type of gallery block. Any of the following may be used: ';\r
125 $output .= '<em>randomImage, recentImage, viewedImage, randomAlbum, recentAlbum, viewedAlbum, dailyImage, '.'weeklyImage, monthlyImage, dailyAlbum, weeklyAlbum, monthlyAlbum, specificItem . </em> '.'Note that for n=1, selectedItem is automatically chosen regardless of this parameter.</li> ';\r
127 $output .= '<li>class: The block that Gallery2 returns is wrapped in a DIV so additional styling can be done. ';\r
128 $output .= 'The classes for this DIV are located in g2_filter.css. Included with the module ';\r
129 $output .= 'are "left", "right", and "nowrap". These position the image block to the left or ';\r
130 $output .= 'right or on a line all its own with the text not wrapping. You can also add your ';\r
131 $output .= 'own class(es) to the CSS file and they will automatically be available.</li> ';\r
133 $output .= '<li>size: The length of the longest side for the thumbnail. ';\r
134 $output .= 'The other side is determined automatically to keep the same aspect ratio.</li> ';\r
136 $output .= '<li>frame/album_frame/item_frame: You can use just "frame" to assign a frame ';\r
137 $output .= 'to the thumbnail regardless of whether it\'s for an album or a single item. ';\r
138 $output .= 'Using aframe will only affect albums and iframe will only affect single items. ';\r
139 $output .= 'Frames included with the default Gallery 2 install are: ';\r
140 $output .= 'bamboo, book, brand , dots, flicking, gold, gold2, polaroid, polaroids, shadow, ';\r
141 $output .= 'shells, slide, solid, notebook, wood.</li></p>';\r
143 return t($output);\r
147function _gallery_g2image_help() {
148 $output = '<h3>Gallery Image Assist (g2image)</h3>';
149 $output .= '<p>Support for <a href=\'http://g2image.steffensenfamily.com\'>g2image</a> in either Standalone or TinyMCE is available to simplify ';
150 $output .= 'adding images already in your Gallery2 albums into your Drupal nodes.</p>';
151 $output .= '<p>Caution: By default, Drupal uses the \'Filtered HTML\' input format for adding
152content to the site and the default settings cause the &lt;img&gt; tags added by g2image to be removed. Check the TinyMCE documentation for instructions on how to avoid this.</p>';
154 return t($output);