Commit 04b696f5 authored by kiz_0987's avatar kiz_0987

Syncing HEAD with DRUPAL-5.

parent 0eb7e5c4
......@@ -9,7 +9,7 @@ Requirements
Gallery2.1 (or above) installed and working (see http://gallery.menalto.com)
Image Block module installed and activated in Gallery2
Image Frame module installed and activated in Gallery2
Drupal 4.7
Drupal 5.x
gallery.module
Note that this module does not provide any photo/album functions itelf, but uses
......@@ -18,7 +18,7 @@ Gallery2 (http://gallery.menalto.com) to provide this functionality.
Installation Instructions
-------------------------
1. Install Gallery 2.1 and Drupal 4.7 (see their respective installation
1. Install Gallery 2.1 and Drupal 5.x (see their respective installation
documents).
***Warning*** - Do not name your Gallery2 directory "gallery", call it something else
......
......@@ -13,7 +13,7 @@ Note that you will need to download and install Gallery2
Requirements
------------
* Gallery 2.1 or above (with ImageBlock and ImageFrame modules installed and activated)
* Drupal 4.7
* Drupal 5.x
For installation instructions please see INSTALL.txt
......
......@@ -26,11 +26,17 @@ function gallery_menu($may_cache) {
'access' => user_access('administer users'),
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/gallery',
'title' => t('gallery'),
'description' => t('Settings for embedded Gallery2.'),
'callback' => 'drupal_get_form',
'callback arguments' => 'gallery_admin_settings',
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
} else {
// Add head info here so that it is included once only per page
// May need modification once the merits/issues of theme_add_style are fully known
// See http://drupal.org/node/60096
theme_add_style(drupal_get_path('module', 'gallery') .'/drupal_g2.css');
drupal_add_css(drupal_get_path('module', 'gallery') .'/drupal_g2.css', 'module', 'all');
}
return $items;
}
......@@ -47,10 +53,10 @@ function gallery_help($section) {
/**
* Implementation of hook_settings
*/
function gallery_settings() {
function gallery_admin_settings() {
$path = drupal_get_path('module', 'gallery');
require_once($path . '/gallery_settings.inc');
return _gallery_settings();
return system_settings_form(_gallery_settings());
}
/**
......
......@@ -124,7 +124,7 @@ function gallery_get_language($user) {
// Added depdev patch for language support (http://drupal.org/node/32374)
// without i18 part (I seem to remember a Rewrite issue with it
// Added test for no user language defined
if (($user->uid==0 || !($user->language)) && module_exist('locale')) {
if (($user->uid==0 || !($user->language)) && module_exists('locale')) {
// This is a visitor and locale module is enabled
// Get drupal's default language
$result = db_query('SELECT locale, name FROM {locales_meta} WHERE isdefault = 1');
......
......@@ -195,7 +195,7 @@ function gallery_filter_process($text) {
if ($g2_head) {
gallery_set_html_head(implode("\n", array_unique($g2_head)));
}
theme_add_style(drupal_get_path('module', 'gallery') .'/gallery_filter.css');
drupal_add_css(drupal_get_path('module', 'gallery') .'/gallery_filter.css', 'module', 'all');
}
return $text . "<br class=\"giImageBlock-clear-both\" />";;
}
......
......@@ -12,8 +12,8 @@
function _gallery_help($section) {
switch($section) {
case 'admin/modules#description':
return t('Integration with Gallery2.1 (%gallery_url)', array('%gallery_url' => 'http://gallery.menalto.com/'));
case 'admin/settings/modules#description':
return t('Integration with Gallery2.1 and above (%gallery_url)', array('%gallery_url' => 'http://gallery.menalto.com/'));
case 'filter#short-tip' :
return gallery_filter_short_tip_translated();
case 'filter#long-tip' :
......@@ -25,7 +25,8 @@ function _gallery_help($section) {
array ('%filters' => url('admin/filters')));
case 'admin/help#gallery':
$output = t('
<p></p>
<h3>Online Documentation</h3>
<p>Complete documentation can be found on the <a href="http://drupal.galleryembedded.com">wiki</a>.</p>
<h3>Settings</h3>
<h4>Directory Settings</h4>
<p>"URI of Gallery2" is the URI of the Gallery2 standalone location. Path from docroot to the directory main.php is located.
......
......@@ -81,7 +81,7 @@ function _gallery_settings() {
); */
// Fullname settings
if (module_exist('profile')) {
if (module_exists('profile')) {
$form['fullname'] = array(
'#type' => 'fieldset',
'#title' => t('Full Name settings'),
......@@ -778,7 +778,7 @@ function _gallery_links_settings() {
/**
* Validate the gallery form settings
*/
function gallery_settings_form_validate($form_id, &$form) {
function gallery_admin_settings_validate($form_id, &$form) {
global $form_values;
include_once(drupal_get_path('module', 'gallery') . '/G2EmbedDiscoveryUtilities.class');
include_once(drupal_get_path('module', 'gallery') . '/G2EmbedTestUtilities.class');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment