summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThilo Wawrzik2007-09-12 14:11:11 (GMT)
committer Thilo Wawrzik2007-09-12 14:11:11 (GMT)
commit5ad14ca1eec59fc877f5ba60ac1760a015b2ec16 (patch)
tree7fea5e509641404318b038d76ff10fb4c4441539
parentcb505168305fbeeda9ae80871175ab203a6e45f3 (diff)
- task: replace the previous broken patch
-rw-r--r--gallery_settings.inc31
1 files changed, 15 insertions, 16 deletions
diff --git a/gallery_settings.inc b/gallery_settings.inc
index 901af6a..7d0ce84 100644
--- a/gallery_settings.inc
+++ b/gallery_settings.inc
@@ -863,29 +863,27 @@ function _gallery_settings_g2image() {
\'TinyMCE\' mode the g2image button can be used in the TinyMCE toolbar. Note that the
TinyMCE version will NOT work wih Safari - use the standalone version instead.'),
);
-
- $options = array(
- t('Show on every page except the listed pages.'),
- t('Show on only the listed pages.')
- );
- $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are
- '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page.",
- array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
-
+
$form['g2image']['gallery_g2image_only_listed_pages'] = array(
'#type' => 'radios',
'#title' => t('Show g2image link on specific pages (Standalone mode only)'),
'#default_value' => variable_get('gallery_g2image_only_listed_pages', 1),
- '#options' => $options,
+ '#options' => array(
+ t('Show on every page except the listed pages.'),
+ t('Show on only the listed pages.')
+ )
);
-
+
+ require_once(drupal_get_path('module', 'gallery') .'/gallery_help.inc');
$form['g2image']['gallery_g2image_std_pages'] = array(
'#type' => 'textarea',
'#title' => t('Pages (Standalone mode only)'),
'#default_value' => variable_get('gallery_g2image_std_pages', gallery_help('admin/settings/gallery_g2image#pages')),
- '#description' => $description
+ '#description' => t('Enter one page per line as Drupal paths. The \'*\' character is a wildcard. Example paths are
+ \'%blog\' for the blog page and %blog-wildcard for every personal blog. %front is the front page.',
+ array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'))
);
-
+
$form['g2image']['gallery_g2image_sortby'] = array(
'#type' => 'select',
'#title' => t('Default Sort Order'),
@@ -955,8 +953,10 @@ function _gallery_settings_g2image() {
// Merge in custom class options
$gallery_g2image_custom_class = array_filter(variable_get('gallery_g2image_custom_class', array()));
- $css_options = array_merge($css_options, $gallery_g2image_custom_class);
-
+ foreach ($gallery_g2image_custom_class as $key => $value) {
+ $css_options[$value] = $value;
+ }
+
$form['g2image']['gallery_g2image_default_alignment'] = array(
'#type' => 'select',
'#title' => t('Default Alignment'),
@@ -966,7 +966,6 @@ function _gallery_settings_g2image() {
);
$form['g2image']['gallery_g2image_custom_class'] = array('#tree' => TRUE);
-
for ($i=1; $i<=4; $i++) {
$form['g2image']['gallery_g2image_custom_class'][$i] = array(
'#type' => 'textfield',