General Configuration

From G2Image

Jump to: navigation, search

Contents

[edit] Configuration Settings Available in g2image/config.php

[edit] Valid Image Extensions - $g2ic_image_ext_regex (Not used in v2.2 or above)

  • Change the extensions inside the parentheses to define "valid" image extensions.
$g2ic_image_ext_regex = '@(jpg|jpeg|png|gif|bmp|svg)$@i';

[edit] Gallery2 Path - $g2ic_gallery2_path

  • If $g2ic_use_full_path is set to FALSE (default setting - in Embedded Configuration), then $g2ic_gallery2_path is the path from your web root directory to your Gallery2 directory.
    • Example: If your Gallery2 homepage is www.domain.com/gallery2/main.php, then g2ic_gallery2_path is "gallery2/".
  • If $g2ic_use_full_path is set to TRUE, then $g2ic_gallery2_path is the full directory path to your Gallery2 directory.
    • Example: /usr/username/public_html/gallery2/
  • Make sure you include the trailing forward slash.
$g2ic_gallery2_path = "gallery2/";

[edit] Language - $g2ic_language

  • Set the language for the main g2image popup window.
    • There must be a corresponding xx.php file in the g2image/langs/ directory.
    • If there is not a corresponding xx.php file, en.php will be loaded.
  • See the Internationalization/Languages Page for more information.
$g2ic_language = 'en';

[edit] Images per page - $g2ic_images_per_page

  • Change this for more/fewer images per page.
$g2ic_images_per_page = 15;

[edit] Display Thumbnails Only or Thumbnails with Filenames - $g2ic_display_filenames

  • This sets the default view.
    • If set to TRUE, titles and filenames will be displayed.
    • If set to FALSE, the thumbnails will be displayed in a table style.
$g2ic_display_filenames = FALSE;

[edit] Default CSS Class - $g2ic_default_alignment

  • This sets the default alignment option.
    • Valid options are
      • 'none'
      • 'g2image_normal'
      • 'g2image_float_left'
      • 'g2image_float_right'
      • 'g2image_centered'
      • one of the class names entered in the custom classes below
    • Using 'none' will result in inserting an img tag with no class attribute.
  • See the Installation - CSS for alignment options section for information on implementing the necessary CSS to support this option.
$g2ic_default_alignment = 'none';

[edit] Custom CSS Classes - $g2ic_custom_class_1

  • You can define up to four custom class names for your img tag.
  • If these are set to anything other than 'not_used', they will be available under the alignment/class selector.
  • You can make it the default class by entering it in $g2ic_default_alignment above.
$g2ic_custom_class_1 = 'not_used';
$g2ic_custom_class_2 = 'not_used';
$g2ic_custom_class_3 = 'not_used';
$g2ic_custom_class_4 = 'not_used';

[edit] Default Custom URL - $g2ic_custom_url

  • This sets the default URL for the Custom URL option.
$g2ic_custom_url = 'http://';

[edit] CSS Class Mode - $g2ic_class_mode

  • Change this to determine where the alignment class will be inserted.
    • Valid options are
      • 'img' to have it inserted as <img class=...>
      • 'div' to have it inserted as
        <img ...>.
    • If you choose 'div', you will have to manually delete any
      tags manually after deleting images from the TinyMCE window.
    • This setting will not affect <wpg2> tags, which are always wrapped with a
      tag, if using g2image alignment classes for the <wpg2> tags.
$g2ic_class_mode = 'img';

[edit] Effect of Clicking on an Image - $g2ic_click_mode (Not used in v3.0 or above)

  • Change this to change the default settings for the "Results of clicking on an image:" option.
    • Valid settings are
      • 'one_click_insert'
      • 'show_advanced_options'.
$g2ic_click_mode = 'one_click_insert';

[edit] Allow Users to Change "Click Mode" - $g2ic_click_mode_variable (Not used in v3.0 or above)

  • Change this to determine if the user will have the option to determine the settings for the the "Results of clicking on an image:" option.
    • Set this to FALSE to prevent users from being able to change the settings.
$g2ic_click_mode_variable = TRUE;

[edit] Default "How to Insert" Option - $g2ic_default_action

  • Change this to change the default "How to Insert" option.
    • Valid options are
      • 'thumbnail_image'
      • 'thumbnail_album'
      • 'thumbnail_lightbox' (Only available in versions 2.2 and higher)
      • 'thumbnail_custom_url'
      • 'thumbnail_only'
      • 'fullsize_image' (Only available in versions 2.2 and higher)
      • 'fullsize_only' (Only available in versions 2.2 and higher)
      • 'link_image'
      • 'link_parent'
      • 'drupal_g2_filter'.
$g2ic_default_action = 'thumbnail_image';

[edit] Image Sort Order - $g2ic_sortby

  • Change this to change the default sort order.
    • Valid options are
      • 'title_asc' (Gallery2 title, ascending)
      • 'title_desc'
      • 'name_asc' (Filename, ascending) (Not available in versions 2.2 and higher)
      • 'name_desc' (Not available in versions 2.2 and higher)
      • 'orig_time_desc' (Origination time, newest first) (Only available in versions 2.2 and higher)
      • 'orig_time_asc' (Origination time, oldest first) (Only available in versions 2.2 and higher)
      • 'mtime_desc' (Modification time, newest first)
      • 'mtime_asc' (Modification time, oldest first)
$g2ic_sortby = 'title_asc';

[edit] EMBEDDED MODE OPERATIONS

[edit] DRUPAL GALLERY2 FILTER OPERATIONS

[edit] Drupal G2 Filter - $g2ic_drupal_g2_filter

  • If you are using Drupal and have the Gallery2 Filter module activated, you can insert a G2 Filter in the simplest format: [G2:itemid].
    • If you want to make this the default action, set $g2ic_default_action to 'drupal_g2_filter'.
    • Set this to TRUE to enable.
$g2ic_drupal_g2_filter = FALSE;

[edit] Drupal G2 Filter Prefix - $g2ic_drupal_g2_filter_prefix

  • Set the Drupal G2 Filter prefix here
$g2ic_drupal_g2_filter_prefix = G2;

Retrieved from "http://g2image.steffensenfamily.com/index.php?title=General_Configuration"
Views
Personal tools
download
G2Image
Platforms
Support
Developers
Demos
Toolbox