Create a FREE account or Login
As a guest, you don't have access to our FULL navigation system.
Author
Message
PoPoutdoor Wizard Joined: Jan 20, 2006 Posts: 118
Posted: Tue Feb 19, 2008 11:43 am Post subject: Upgrade instructions (0.5.10 to 0.5.11)
0.5.10 to 0.5.11 core upgrade(g2image, url_rewrite, lightbox), with bug fix and customization.
Note: If you have "Gallery Profile Mod / All Gallery Links In Profile Mod", don't use this upgrade instruction!
Step 1: Gallery Theme Mods
Follows instructions from gallery2_mods.txt , skip [ DIY ] and [ COPY ] part.
Step 2: Upgrade Mods
Code: › #
#-----[ DIY INSTRUCTIONS ]------------------------
#
delete language/{installed_lang}/lang_g2image.php
#
#-----[ COPY ]----------------------------------
#
copy phpBB2/lang_convert.class to lang_convert.class
copy phpBB2/admin/gallery2_export.php to admin/gallery2_export.php
copy phpBB2/g2image/g2image.php to g2image/g2image.php
copy phpBB2/g2image/gettext.inc to g2image/gettext.inc
copy phpBB2/g2image/gettext.php to g2image/gettext.php
copy phpBB2/g2image/init.php to g2image/init.php
copy phpBB2/g2image/streams.php to g2image/streams.php
copy phpBB2/g2image/css/dtree.css to g2image/css/dtree.css
copy phpBB2/g2image/css/g2image.css to g2image/css/g2image.css
copy phpBB2/g2image/css/lightbox.css to g2image/css/lightbox.css
copy phpBB2/g2image/images/ to g2image/images/
copy phpBB2/g2image/img to g2image/img
copy phpBB2/g2image/jscripts/dtree.js to g2image/jscripts/dtree.js
copy phpBB2/g2image/jscripts/effects.js to g2image/jscripts/effects.js
copy phpBB2/g2image/jscripts/functions.js to g2image/jscripts/functions.js
copy phpBB2/g2image/jscripts/lightbox.js to g2image/jscripts/lightbox.js
copy phpBB2/g2image/jscripts/prototype.js to g2image/jscripts/prototype.js
copy phpBB2/g2image/jscripts/scriptaculous.js to g2image/jscripts/scriptaculous.js
copy phpBB2/g2image/langs/ to g2image/langs/
copy phpBB2/language/lang_english/lang_gallery2.php to language/lang_english/lang_gallery2.php
#
#-----[ OPEN ]----------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]----------------------------------
#
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
#-----[ BEFORE, ADD ]-----------------------------
#
// g2image - G2 url rewrite support(for [img]...[/img] tags)
$text = preg_replace('((\?)(g2_GALLERYSID=[a-f0-9]+|g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT))', '', $text);
#
#-----[ FIND ]----------------------------------
#
global $phpEx;
$g2img_baseurl = str_replace(array('.', '?'), array('\.', '\?'), $_SERVER['HTTP_HOST'] . substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1) . 'gallery2.' . $phpEx . '?g2_view=core.DownloadItem');
$text = preg_replace('#\[img\]((http|https)://)(' . $g2img_baseurl . '\&\;g2_itemId=[0-9]+)\[/img\]#sie', "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
#-----[ REPLACE WITH ]----------------------------
#
// g2image code..
if (strpos($text, 'core.DownloadItem')) {
global $phpEx, $db;
$sql = 'SELECT g2Uri FROM ' . GALLERY2_TABLE . ' LIMIT 1';
$row = $db->sql_fetchrow($db->sql_query($sql));
$row['g2Uri'] = strtolower($row['g2Uri']);
$host = strtolower($_SERVER['HTTP_HOST']);
$g2Uri = (strstr($row['g2Uri'], $host)) ? $row['g2Uri'] : $host . $row['g2Uri'];
$g2Uri = (strstr($g2Uri, '://')) ? substr($g2Uri, strpos($g2Uri, '://') + 3) : $g2Uri;
$g2img_baseurl = str_replace(array('.', '?'), array('\.', '\?'), $g2Uri . 'main.' . $phpEx . '?g2_view=core.DownloadItem');
$text = preg_replace('((\&\;)(g2_GALLERYSID=[a-f0-9]+|g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT))', '', $text);
$text = preg_replace('#\[img\]((http|https)://)(' . $g2img_baseurl . '\&\;g2_itemId=[0-9]+)\[/img\]#sie', "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
}
#
#-----[ OPEN ]------------------------------------
#
g2image/g2image.php
#
#-----[ FIND ]------------------------------------
#
require_once('init.php');
session_start();
#
#-----[ REPLACE WITH ]----------------------------
#
session_start();
require_once('init.php');
#
#-----[ OPEN ]------------------------------------
#
admin/admin_gallery2.php
#
#-----[ FIND ]------------------------------------
#
$currentIntegrationVersion = '0.5.10';
#
#-----[ REPLACE WITH ]----------------------------
#
$currentIntegrationVersion = '0.5.11';
#
#-----[ OPEN ]------------------------------------
#
g2helper.inc
#
#-----[ FIND ]------------------------------------
#
$this->_createUser($userdata['user_id'], $userdata['user_level'], array(
#
#-----[ BEFORE, ADD ]-----------------------------
#
require('./lang_convert.class');
$lang_convert = new langConvert();
#
#-----[ FIND ]------------------------------------
#
'email' => $userdata['user_email'],
#
#-----[ AFTER, ADD ]------------------------------
#
'language' => $lang_convert->convert($userdata['user_lang']),
#
#-----[ FIND ]------------------------------------
#
function _utf8Translate($value) {
#
#-----[ BEFORE, ADD ]-----------------------------
#
function fetchPluginStatus($pluginType, $pluginName) {
$this->_initAdmin();
$pluginStatus = GalleryCoreApi::fetchPluginStatus($pluginType);
$this->done();
return ($pluginStatus[1][$pluginName]['active'] == 1) ? true : false;
}
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------
#
# EoM
Step 3: Lightbox Mods (this mod only add lightbox features to viewtopic page)
Code: › #
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');
#
#-----[ BEFORE, ADD ]-----------------------------------
#
if (defined('LBURL')) {
$template->assign_block_vars('switch_enable_lightbox', array());
}
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);
#
#-----[ AFTER, ADD ]------------------------------------
#
$bbcode_tpl['lburl'] = str_replace('{LBURL}', '\\1', $bbcode_tpl['lburl']);
$bbcode_tpl['lburl'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['lburl']);
#
#-----[ FIND ]------------------------------------------
#
$text = preg_replace($patterns, $replacements, $text);
// Remove our padding from the string..
#
#-----[ BEFORE, ADD ]-----------------------------------
#
if (strpos($text, 'lburl') && !defined('LBURL')) {
define('LBURL', true);
}
#
#-----[ FIND ]------------------------------------------
#
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];
#
#-----[ AFTER, ADD ]------------------------------------
#
// g2image [lburl=xxxx://www.phpbb.com]phpBB[/lburl] code..
$patterns[] = "#\[lburl=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/lburl\]#is";
$replacements[] = $bbcode_tpl['lburl'];
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<table width="100%" cellspacing="2" cellpadding="2" border="0">
#
#-----[ BEFORE, ADD ]-----------------------------------
#
<!-- BEGIN switch_enable_lightbox -->
<script type="text/javascript" src="./g2image/jscripts/prototype.js"></script>
<script type="text/javascript" src="./g2image/jscripts/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="./g2image/jscripts/lightbox.js"></script>
<link rel="stylesheet" href="./g2image/css/lightbox.css" type="text/css" media="screen" />
<!-- END switch_enable_lightbox -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Step 4: Remove Lightbox features from g2image popup window(also remove code that not working on phpbb2)
Code: › #
#-----[ OPEN ]----------------------------------
#
g2image/g2image.php
#
#-----[ FIND ]----------------------------------
#
if ($g2ic_options['wpg2_valid']) echo g2ic_make_html_wpg2_album_insert_button();
if ($g2ic_options['drupal_g2_filter']) echo g2ic_make_html_drupal_album_insert_button();
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
//if ($g2ic_options['wpg2_valid']) echo g2ic_make_html_wpg2_album_insert_button();
//if ($g2ic_options['drupal_g2_filter']) echo g2ic_make_html_drupal_album_insert_button();
#
#-----[ FIND ]----------------------------------
#
// If using the WPG2 or Drupal Gallery Module append '(HTML)' to the end of the universal messages
if ($g2ic_options['wpg2_valid'] || $g2ic_options['drupal_g2_filter']) {
foreach($message as $key => $text) {
$message[$key] = $text . ' (' . T_('HTML') . ')';
}
}
// These are CMS-specific image insertion options
$message['wpg2_image'] = T_('WPG2 tag of image');
$message['drupal_g2_filter'] = T_('Drupal Gallery2 Module filter tag');
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
// If using the WPG2 or Drupal Gallery Module append '(HTML)' to the end of the universal messages
if ($g2ic_options['wpg2_valid'] || $g2ic_options['drupal_g2_filter']) {
foreach($message as $key => $text) {
$message[$key] = $text . ' (' . T_('HTML') . ')';
}
}
// These are CMS-specific image insertion options
$message['wpg2_image'] = T_('WPG2 tag of image');
$message['drupal_g2_filter'] = T_('Drupal Gallery2 Module filter tag');
*/
#
#-----[ FIND ]----------------------------------
#
// If using the WPG2 or Drupal Gallery Module append their array to the beginning of the universal array
if ($g2ic_options['wpg2_valid']) {
$imginsert_selectoptions = array(
'wpg2_image' => array(
'text' => $message['wpg2_image'] ),
) + $imginsert_selectoptions;
}
if($g2ic_options['drupal_g2_filter']) {
$imginsert_selectoptions = array(
'drupal_g2_filter' => array(
'text' => $message['drupal_g2_filter'] ),
) + $imginsert_selectoptions;
}
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
// If using the WPG2 or Drupal Gallery Module append their array to the beginning of the universal array
if ($g2ic_options['wpg2_valid']) {
$imginsert_selectoptions = array(
'wpg2_image' => array(
'text' => $message['wpg2_image'] ),
) + $imginsert_selectoptions;
}
if($g2ic_options['drupal_g2_filter']) {
$imginsert_selectoptions = array(
'drupal_g2_filter' => array(
'text' => $message['drupal_g2_filter'] ),
) + $imginsert_selectoptions;
}
*/
#
#-----[ FIND ]----------------------------------
#
// Is this a TinyMCE window?
if(isset($_REQUEST['g2ic_tinymce'])){
$g2ic_options['tinymce'] = $_REQUEST['g2ic_tinymce'];
$_SESSION['g2ic_tinymce'] = $_REQUEST['g2ic_tinymce'];
}
else if (isset($_SESSION['g2ic_tinymce']))
$g2ic_options['tinymce'] = $_SESSION['g2ic_tinymce'];
else $g2ic_options['tinymce'] = 0;
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
// Is this a TinyMCE window?
if(isset($_REQUEST['g2ic_tinymce'])){
$g2ic_options['tinymce'] = $_REQUEST['g2ic_tinymce'];
$_SESSION['g2ic_tinymce'] = $_REQUEST['g2ic_tinymce'];
}
else if (isset($_SESSION['g2ic_tinymce']))
$g2ic_options['tinymce'] = $_SESSION['g2ic_tinymce'];
else $g2ic_options['tinymce'] = 0;
*/
#
#-----[ FIND ]----------------------------------
#
$html = '<div class="about_button">' . "\n"
. ' <input type="button" onclick="alert(\'' . T_('Gallery2 Image Chooser') . '\n' . T_('Version') . ' ' . $version
. '\n' . T_('Documentation:') . ' http://g2image.steffensenfamily.com/\')" '
. 'value="' . T_('About G2Image') . '"/>' . "\n"
. ' <input type="hidden" name="current_album" value="' . $g2ic_options['current_album'] . '">' . "\n"
. ' <input type="hidden" name="album_name" value="' . $g2ic_album_info['title'] . '" />' . "\n"
. ' <input type="hidden" name="album_url" value="' . $g2ic_album_info['url'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_page" value="' . $g2ic_options['current_page'] . '" />' . "\n"
. ' <input type="hidden" name="class_mode" value="' . $g2ic_options['class_mode'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_form" value="' . $g2ic_options['form'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_field" value="' . $g2ic_options['field'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_wpg2_valid" value="' . $g2ic_options['wpg2_valid'] . '" />' . "\n"
. ' <input type="hidden" name="drupal_g2_filter" value="' . $g2ic_options['drupal_g2_filter'] . '" />' . "\n"
. ' <input type="hidden" name="drupal_filter_prefix" value="' . $g2ic_options['drupal_g2_filter_prefix'] . '" />' . "\n"
. '</div>' . "\n";
#
#-----[ REPLACE WITH ]----------------------------
#
# (delete code block within '/*' and '*/')
// Removed for phpBB2
/*
$html = '<div class="about_button">' . "\n"
. ' <input type="button" onclick="alert(\'' . T_('Gallery2 Image Chooser') . '\n' . T_('Version') . ' ' . $version
. '\n' . T_('Documentation:') . ' http://g2image.steffensenfamily.com/\')" '
. 'value="' . T_('About G2Image') . '"/>' . "\n"
. ' <input type="hidden" name="current_album" value="' . $g2ic_options['current_album'] . '">' . "\n"
. ' <input type="hidden" name="album_name" value="' . $g2ic_album_info['title'] . '" />' . "\n"
. ' <input type="hidden" name="album_url" value="' . $g2ic_album_info['url'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_page" value="' . $g2ic_options['current_page'] . '" />' . "\n"
. ' <input type="hidden" name="class_mode" value="' . $g2ic_options['class_mode'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_form" value="' . $g2ic_options['form'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_field" value="' . $g2ic_options['field'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_wpg2_valid" value="' . $g2ic_options['wpg2_valid'] . '" />' . "\n"
. ' <input type="hidden" name="drupal_g2_filter" value="' . $g2ic_options['drupal_g2_filter'] . '" />' . "\n"
. ' <input type="hidden" name="drupal_filter_prefix" value="' . $g2ic_options['drupal_g2_filter_prefix'] . '" />' . "\n"
. '</div>' . "\n";
*/
$html = '<div class="about_button">' . "\n"
. ' <input type="button" onclick="alert(\'' . T_('Gallery2 Image Chooser') . '\n' . T_('Version') . ' ' . $version
. '\n' . T_('Documentation:') . ' http://g2image.steffensenfamily.com/\')" '
. 'value="' . T_('About G2Image') . '"/>' . "\n"
. ' <input type="hidden" name="current_album" value="' . $g2ic_options['current_album'] . '">' . "\n"
. ' <input type="hidden" name="album_name" value="' . $g2ic_album_info['title'] . '" />' . "\n"
. ' <input type="hidden" name="album_url" value="' . $g2ic_album_info['url'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_page" value="' . $g2ic_options['current_page'] . '" />' . "\n"
. ' <input type="hidden" name="class_mode" value="' . $g2ic_options['class_mode'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_form" value="' . $g2ic_options['form'] . '" />' . "\n"
. ' <input type="hidden" name="g2ic_field" value="' . $g2ic_options['field'] . '" />' . "\n"
. '</div>' . "\n";
#
#-----[ FIND ]----------------------------------
#
. ' d = new dTree("d");' . "\n";
#
#-----[ REPLACE WITH ]----------------------------
#
# (This fix the javascript warning undeclared variable message)
. ' var d = new dTree("d");' . "\n";
#
#-----[ FIND ]----------------------------------
#
/**
* Creates the alignment selection HTML
*
* @return string $html The alignment selection HTML
*/
function g2ic_make_html_alignment_select(){
GLOBAL $g2ic_options;
// array for output
$align_options = array('none' => array('text' => T_('None')),
'g2image_normal' => array('text' => T_('Normal')),
'g2image_float_left' => array('text' => T_('Float Left')),
'g2image_float_right' => array('text' => T_('Float Right')),
'g2image_centered' => array('text' => T_('Centered')));
if ($g2ic_options['custom_class_1'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_1'] => array('text' => $g2ic_options['custom_class_1'])));
}
if ($g2ic_options['custom_class_2'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_2'] => array('text' => $g2ic_options['custom_class_2'])));
}
if ($g2ic_options['custom_class_3'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_3'] => array('text' => $g2ic_options['custom_class_3'])));
}
if ($g2ic_options['custom_class_4'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_4'] => array('text' => $g2ic_options['custom_class_4'])));
}
$align_options[$g2ic_options['default_alignment']]['selected'] = TRUE;
$html = g2ic_make_html_select('alignment',$align_options);
return $html;
}
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
/**
* Creates the alignment selection HTML
*
* @return string $html The alignment selection HTML
*/
// Removed for phpBB2
/*
function g2ic_make_html_alignment_select(){
GLOBAL $g2ic_options;
// array for output
$align_options = array('none' => array('text' => T_('None')),
'g2image_normal' => array('text' => T_('Normal')),
'g2image_float_left' => array('text' => T_('Float Left')),
'g2image_float_right' => array('text' => T_('Float Right')),
'g2image_centered' => array('text' => T_('Centered')));
if ($g2ic_options['custom_class_1'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_1'] => array('text' => $g2ic_options['custom_class_1'])));
}
if ($g2ic_options['custom_class_2'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_2'] => array('text' => $g2ic_options['custom_class_2'])));
}
if ($g2ic_options['custom_class_3'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_3'] => array('text' => $g2ic_options['custom_class_3'])));
}
if ($g2ic_options['custom_class_4'] != 'not_used'){
$align_options = array_merge($align_options, array($g2ic_options['custom_class_4'] => array('text' => $g2ic_options['custom_class_4'])));
}
$align_options[$g2ic_options['default_alignment']]['selected'] = TRUE;
$html = g2ic_make_html_select('alignment',$align_options);
return $html;
}
*/
#
#-----[ FIND ]----------------------------------
#
. ' </div>' . "\n"
// "LightBox Group" textbox
. ' <div name="lightbox_group_textbox"';
if ($g2ic_options['default_action'] == 'thumbnail_lightbox'){
$html .= ' class="displayed_textbox"';
}
else {
$html .= 'class="hidden_textbox"';
}
$html .= '>' . "\n"
. ' <label for="lightbox_group">' . T_('LightBox Group (Leave blank to not group with other images)') . '<br /></label>' . "\n"
. ' <input type="text" name="lightbox_group" size="84" maxlength="150" value="g2image" />' . "\n"
. ' <br />' . "\n"
. ' <br />' . "\n"
. ' </div>' . "\n";
#
#-----[ REPLACE WITH ]----------------------------
#
# (delete code block within '/*' and '*/')
/* Removed for phpBB2
. ' </div>' . "\n"
// "LightBox Group" textbox
. ' <div name="lightbox_group_textbox"';
if ($g2ic_options['default_action'] == 'thumbnail_lightbox'){
$html .= ' class="displayed_textbox"';
}
else {
$html .= 'class="hidden_textbox"';
}
$html .= '>' . "\n"
. ' <label for="lightbox_group">' . T_('LightBox Group (Leave blank to not group with other images)') . '<br /></label>' . "\n"
. ' <input type="text" name="lightbox_group" size="84" maxlength="150" value="g2image" />' . "\n"
. ' <br />' . "\n"
. ' <br />' . "\n"
. ' </div>' . "\n";
*/
. ' </div>' . "\n";
#
#-----[ FIND ]----------------------------------
#
// WPG2 tag "size" box.
if ($g2ic_options['wpg2_valid']) {
GalleryCoreApi::requireOnce('modules/imageblock/module.inc');
GalleryCoreApi::requireOnce('modules/core/classes/GalleryRepositoryUtilities.class');
$plugin = new ImageBlockModule;
$version = $plugin->getVersion();
$version_comparison = GalleryRepositoryUtilities::compareRevisions($version,'1.0.9');
if ($version_comparison != 'older') {
$html .= ' <div name="wpg2_tag_size_textbox"';
if ($g2ic_options['default_action'] == 'wpg2_image'){
$html .= ' class="displayed_textbox"';
}
else {
$html .= 'class="hidden_textbox"';
}
$html .= '>' . "\n"
. ' <label for="wpg2_tag_size">' . T_('WPG2 tag "size" attribute (Leave blank for the default size of: ') . $g2ic_options['wpg2_tag_size']. 'px)' . '<br /></label>' . "\n"
. ' <input type="text" name="wpg2_tag_size" size="84" maxlength="150" value="" />' . "\n"
. ' <br />' . "\n"
. ' <br />' . "\n"
. ' </div>' . "\n";
}
else {
$html .= ' <input type="hidden" name="wpg2_tag_size" value="" />' . "\n";
}
}
// Drupal G2 Filter "exactsize" attribute box.
if ($g2ic_options['drupal_g2_filter']) {
GalleryCoreApi::requireOnce('modules/imageblock/module.inc');
GalleryCoreApi::requireOnce('modules/core/classes/GalleryRepositoryUtilities.class');
$plugin = new ImageBlockModule;
$version = $plugin->getVersion();
$version_comparison = GalleryRepositoryUtilities::compareRevisions($version,'1.0.9');
if ($version_comparison != 'older') {
$html .= ' <div name="drupal_exactsize_textbox"';
if ($g2ic_options['default_action'] == 'drupal_g2_filter'){
$html .= ' class="displayed_textbox"';
}
else {
$html .= 'class="hidden_textbox"';
}
$html .= '>' . "\n"
. ' <label for="drupal_exactsize">' . T_('Drupal G2 Filter "exactsize" attribute (Leave blank for no exactsize attribute)') . '<br /></label>' . "\n"
. ' <input type="text" name="drupal_exactsize" size="84" maxlength="150" value="" />' . "\n"
. ' <br />' . "\n"
. ' <br />' . "\n"
. ' </div>' . "\n";
}
else {
$html .= ' <input type="hidden" name="drupal_exactsize" value="" />' . "\n";
}
}
// Alignment selection
$html .= ' <label for="alignment">' . T_('G2Image Alignment Class') . '</label>' . "\n"
. g2ic_make_html_alignment_select()
. " </fieldset>\n\n";
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
// WPG2 tag "size" box.
if ($g2ic_options['wpg2_valid']) {
GalleryCoreApi::requireOnce('modules/imageblock/module.inc');
GalleryCoreApi::requireOnce('modules/core/classes/GalleryRepositoryUtilities.class');
$plugin = new ImageBlockModule;
$version = $plugin->getVersion();
$version_comparison = GalleryRepositoryUtilities::compareRevisions($version,'1.0.9');
if ($version_comparison != 'older') {
$html .= ' <div name="wpg2_tag_size_textbox"';
if ($g2ic_options['default_action'] == 'wpg2_image'){
$html .= ' class="displayed_textbox"';
}
else {
$html .= 'class="hidden_textbox"';
}
$html .= '>' . "\n"
. ' <label for="wpg2_tag_size">' . T_('WPG2 tag "size" attribute (Leave blank for the default size of: ') . $g2ic_options['wpg2_tag_size']. 'px)' . '<br /></label>' . "\n"
. ' <input type="text" name="wpg2_tag_size" size="84" maxlength="150" value="" />' . "\n"
. ' <br />' . "\n"
. ' <br />' . "\n"
. ' </div>' . "\n";
}
else {
$html .= ' <input type="hidden" name="wpg2_tag_size" value="" />' . "\n";
}
}
// Drupal G2 Filter "exactsize" attribute box.
if ($g2ic_options['drupal_g2_filter']) {
GalleryCoreApi::requireOnce('modules/imageblock/module.inc');
GalleryCoreApi::requireOnce('modules/core/classes/GalleryRepositoryUtilities.class');
$plugin = new ImageBlockModule;
$version = $plugin->getVersion();
$version_comparison = GalleryRepositoryUtilities::compareRevisions($version,'1.0.9');
if ($version_comparison != 'older') {
$html .= ' <div name="drupal_exactsize_textbox"';
if ($g2ic_options['default_action'] == 'drupal_g2_filter'){
$html .= ' class="displayed_textbox"';
}
else {
$html .= 'class="hidden_textbox"';
}
$html .= '>' . "\n"
. ' <label for="drupal_exactsize">' . T_('Drupal G2 Filter "exactsize" attribute (Leave blank for no exactsize attribute)') . '<br /></label>' . "\n"
. ' <input type="text" name="drupal_exactsize" size="84" maxlength="150" value="" />' . "\n"
. ' <br />' . "\n"
. ' <br />' . "\n"
. ' </div>' . "\n";
}
else {
$html .= ' <input type="hidden" name="drupal_exactsize" value="" />' . "\n";
}
}
// Alignment selection
$html .= ' <label for="alignment">' . T_('G2Image Alignment Class') . '</label>' . "\n"
. g2ic_make_html_alignment_select()
. " </fieldset>\n\n";
*/
#
#-----[ FIND ]----------------------------------
#
/**
* Creates the HTML for inserting an album Drupal Filter Tag
*
* @return string $html The HTML for for inserting an album Drupal Filter Tag
*/
function g2ic_make_html_drupal_album_insert_button(){
GLOBAL $g2ic_options, $g2ic_album_info, $g2ic_gallery_items;
$html = '';
// Create the form
$html .= "<div>\n"
. " <fieldset>\n"
. ' <legend>' . T_('Insert a Drupal G2 Filter tag for the current album:') . ' ' . $g2ic_album_info['title'] . '</legend>' . "\n";
if (empty($g2ic_gallery_items)) {
$html .= ' ' . T_('G2Image Alignment Class') . ' ' . "\n"
. g2ic_make_html_alignment_select()
. ' <br />' . "\n";
}
// "Insert" button
$html .= " <input type='button'\n"
. " onclick='insertDrupalFilter()'\n"
. ' value="' . T_('Insert') . '"' . "\n"
. " />\n";
if (!empty($g2ic_gallery_items)) {
$html .= ' ' . T_('Set the Alignment Class in "Insertion Options" below') . ' ' . "\n";
}
$html .= ' <input type="hidden" name="drupal_image_id" value="' . $g2ic_options['current_album'] . '" />' . "\n"
. " </fieldset>\n"
. "</div>\n\n";
return $html;
}
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
/**
* Creates the HTML for inserting an album Drupal Filter Tag
*
* @return string $html The HTML for for inserting an album Drupal Filter Tag
*/
// Removed for phpBB2
/*
function g2ic_make_html_drupal_album_insert_button(){
GLOBAL $g2ic_options, $g2ic_album_info, $g2ic_gallery_items;
$html = '';
// Create the form
$html .= "<div>\n"
. " <fieldset>\n"
. ' <legend>' . T_('Insert a Drupal G2 Filter tag for the current album:') . ' ' . $g2ic_album_info['title'] . '</legend>' . "\n";
if (empty($g2ic_gallery_items)) {
$html .= ' ' . T_('G2Image Alignment Class') . ' ' . "\n"
. g2ic_make_html_alignment_select()
. ' <br />' . "\n";
}
// "Insert" button
$html .= " <input type='button'\n"
. " onclick='insertDrupalFilter()'\n"
. ' value="' . T_('Insert') . '"' . "\n"
. " />\n";
if (!empty($g2ic_gallery_items)) {
$html .= ' ' . T_('Set the Alignment Class in "Insertion Options" below') . ' ' . "\n";
}
$html .= ' <input type="hidden" name="drupal_image_id" value="' . $g2ic_options['current_album'] . '" />' . "\n"
. " </fieldset>\n"
. "</div>\n\n";
return $html;
}
*/
#
#-----[ FIND ]------------------------------------------
#
$html = '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"
. '<head>' . "\n"
. ' <title>' . T_('Gallery2 Image Chooser') . '</title>' . "\n"
. ' <link rel="stylesheet" href="css/g2image.css" type="text/css" />' . "\n"
. ' <link rel="stylesheet" href="css/dtree.css" type="text/css" />' . "\n"
. ' <link rel="stylesheet" href="css/lightbox.css" type="text/css" />' . "\n"
. ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n";
if($g2ic_options['tinymce'] && $g2ic_options['wpg2_valid']) {
$html .= " <script language='javascript' type='text/javascript' src='../../../../wp-includes/js/tinymce/tiny_mce_popup.js'></script>\n";
}
elseif($g2ic_options['tinymce'] && !$g2ic_options['wpg2_valid']) {
$html .= " <script language='javascript' type='text/javascript' src='../../tiny_mce_popup.js'></script>\n";
}
$html .= ' <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/dtree.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/prototype.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/scriptaculous.js?load=effects"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/lightbox.js"></script>' . "\n"
. '</head>' . "\n\n"
. '<body id="g2image">' . "\n\n"
. ' <form method="post">' . "\n";
#
#-----[ REPLACE WITH ]----------------------------
#
# (delete code block within '/*' and '*/')
/* Removed for phpBB2
$html = '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"
. '<head>' . "\n"
. ' <title>' . T_('Gallery2 Image Chooser') . '</title>' . "\n"
. ' <link rel="stylesheet" href="css/g2image.css" type="text/css" />' . "\n"
. ' <link rel="stylesheet" href="css/dtree.css" type="text/css" />' . "\n"
. ' <link rel="stylesheet" href="css/lightbox.css" type="text/css" />' . "\n"
. ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n";
if($g2ic_options['tinymce'] && $g2ic_options['wpg2_valid']) {
$html .= " <script language='javascript' type='text/javascript' src='../../../../wp-includes/js/tinymce/tiny_mce_popup.js'></script>\n";
}
elseif($g2ic_options['tinymce'] && !$g2ic_options['wpg2_valid']) {
$html .= " <script language='javascript' type='text/javascript' src='../../tiny_mce_popup.js'></script>\n";
}
$html .= ' <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/dtree.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/prototype.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/scriptaculous.js?load=effects"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/lightbox.js"></script>' . "\n"
. '</head>' . "\n\n"
. '<body id="g2image">' . "\n\n"
. ' <form method="post">' . "\n";
*/
$html = '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n"
. '<head>' . "\n"
. ' <title>' . T_('Gallery2 Image Chooser') . '</title>' . "\n"
. ' <link rel="stylesheet" href="css/g2image.css" type="text/css" />' . "\n"
. ' <link rel="stylesheet" href="css/dtree.css" type="text/css" />' . "\n"
. ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n";
$html .= ' <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>' . "\n"
. ' <script language="javascript" type="text/javascript" src="jscripts/dtree.js"></script>' . "\n"
. '</head>' . "\n\n"
. '<body id="g2image">' . "\n\n"
. ' <form method="post">' . "\n";
#
#-----[ FIND ]------------------------------------------
#
/**
* Creates the HTML for inserting an album WPG2 Tag
*
* @return string $html The HTML for for inserting an album WPG2 Tag
*/
function g2ic_make_html_wpg2_album_insert_button(){
GLOBAL $g2ic_options, $g2ic_gallery_items;
$html = '';
$album_info = g2ic_get_item_info($g2ic_options['current_album']);
// Create the form
$html .= "<div>\n"
. " <fieldset>\n"
. ' <legend>' . T_('Insert a WPG2 tag for the current album:') . ' ' . $album_info['title'] . '</legend>' . "\n";
if (empty($g2ic_gallery_items)) {
$html .= ' ' . T_('G2Image Alignment Class') . ' ' . "\n"
. g2ic_make_html_alignment_select()
. ' <br />' . "\n";
}
// "Insert" button
$html .= ' <input type="button"' . "\n"
. ' onclick="insertWpg2Tag()"' . "\n"
. ' value="' . T_('Insert') . '"' . "\n"
. ' />' . "\n";
if (!empty($g2ic_gallery_items)) {
$html .= ' ' . T_('Set the Alignment Class in "Insertion Options" below') . ' ' . "\n";
}
$html .= ' <input type="hidden" name="wpg2_id" value="' . $g2ic_options['current_album'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_summary" value="' . $album_info['summary'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_thumbnail" value="' . $album_info['thumbnail_src'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_thumbw" value="' . $album_info['thumbnail_width'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_thumbh" value="' . $album_info['thumbnail_height'] . '" />' . "\n"
. ' </fieldset>' . "\n"
. '</div>' . "\n\n";
return $html;
}
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
/**
* Creates the HTML for inserting an album WPG2 Tag
*
* @return string $html The HTML for for inserting an album WPG2 Tag
*/
// Removed for phpBB2
/*
function g2ic_make_html_wpg2_album_insert_button(){
GLOBAL $g2ic_options, $g2ic_gallery_items;
$html = '';
$album_info = g2ic_get_item_info($g2ic_options['current_album']);
// Create the form
$html .= "<div>\n"
. " <fieldset>\n"
. ' <legend>' . T_('Insert a WPG2 tag for the current album:') . ' ' . $album_info['title'] . '</legend>' . "\n";
if (empty($g2ic_gallery_items)) {
$html .= ' ' . T_('G2Image Alignment Class') . ' ' . "\n"
. g2ic_make_html_alignment_select()
. ' <br />' . "\n";
}
// "Insert" button
$html .= ' <input type="button"' . "\n"
. ' onclick="insertWpg2Tag()"' . "\n"
. ' value="' . T_('Insert') . '"' . "\n"
. ' />' . "\n";
if (!empty($g2ic_gallery_items)) {
$html .= ' ' . T_('Set the Alignment Class in "Insertion Options" below') . ' ' . "\n";
}
$html .= ' <input type="hidden" name="wpg2_id" value="' . $g2ic_options['current_album'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_summary" value="' . $album_info['summary'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_thumbnail" value="' . $album_info['thumbnail_src'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_thumbw" value="' . $album_info['thumbnail_width'] . '" />' . "\n"
. ' <input type="hidden" name="wpg2_thumbh" value="' . $album_info['thumbnail_height'] . '" />' . "\n"
. ' </fieldset>' . "\n"
. '</div>' . "\n\n";
return $html;
}
*/
#
#-----[ OPEN ]------------------------------------------
#
g2image/init.php
#
#-----[ FIND ]------------------------------------------
#
// 'link_image', 'link_album', 'drupal_g2_filter', 'thumbnail_lightbox',
// 'fullsize_image', and 'fullsize_only'.
#
#-----[ REPLACE WITH ]-------------------------------
#
// 'link_image', 'link_album', 'thumbnail_lightbox', 'fullsize_image',
// and 'fullsize_only'.
#
#-----[ OPEN ]------------------------------------------
#
g2image/jscripts/functions.js
#
#-----[ FIND ]------------------------------------------
#
if (obj.imginsert.value == 'thumbnail_lightbox')
document.getElementsByName('lightbox_group_textbox')[0].className = 'displayed_textbox';
else
document.getElementsByName('lightbox_group_textbox')[0].className = 'hidden_textbox';
if (obj.g2ic_wpg2_valid.value == true) {
if (obj.imginsert.value == 'wpg2_image')
document.getElementsByName('wpg2_tag_size_textbox')[0].className = 'displayed_textbox';
else
document.getElementsByName('wpg2_tag_size_textbox')[0].className = 'hidden_textbox';
}
if (obj.drupal_g2_filter.value == true) {
if (obj.imginsert.value == 'drupal_g2_filter')
document.getElementsByName('drupal_exactsize_textbox')[0].className = 'displayed_textbox';
else
document.getElementsByName('drupal_exactsize_textbox')[0].className = 'hidden_textbox';
}
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
if (obj.imginsert.value == 'thumbnail_lightbox')
document.getElementsByName('lightbox_group_textbox')[0].className = 'displayed_textbox';
else
document.getElementsByName('lightbox_group_textbox')[0].className = 'hidden_textbox';
if (obj.g2ic_wpg2_valid.value == true) {
if (obj.imginsert.value == 'wpg2_image')
document.getElementsByName('wpg2_tag_size_textbox')[0].className = 'displayed_textbox';
else
document.getElementsByName('wpg2_tag_size_textbox')[0].className = 'hidden_textbox';
}
if (obj.drupal_g2_filter.value == true) {
if (obj.imginsert.value == 'drupal_g2_filter')
document.getElementsByName('drupal_exactsize_textbox')[0].className = 'displayed_textbox';
else
document.getElementsByName('drupal_exactsize_textbox')[0].className = 'hidden_textbox';
}
*/
#
#-----[ FIND ]------------------------------------------
#
if(window.tinyMCE)
window.opener.tinyMCE.execCommand("mceInsertContent",true,html);
else if (window.opener.FCK)
window.opener.FCK.InsertHtml(html);
else
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
if(window.tinyMCE)
window.opener.tinyMCE.execCommand("mceInsertContent",true,html);
else if (window.opener.FCK)
window.opener.FCK.InsertHtml(html);
else
*/
#
#-----[ FIND ]------------------------------------------
#
function insertWpg2Tag(){
var obj = document.forms[0];
var htmlCode = '';
if (obj.alignment.value != 'none'){
htmlCode += '<div class="' + obj.alignment.value + '">';
}
if(window.tinyMCE) {
htmlCode += '<img src="' + obj.wpg2_thumbnail.value
+ '" alt="' + obj.wpg2_id.value
+ '" title="' + obj.wpg2_id.value
+ '" width="' + obj.wpg2_thumbw.value + '" height="' + obj.wpg2_thumbh.value
+ '" id="mce_plugin_g2image_wpg2" />';
}
else {
htmlCode += '<wpg2>' + obj.wpg2_id.value + '</wpg2>';
}
if (obj.alignment.value != 'none'){
htmlCode += '</div>';
}
insertHtml(htmlCode,obj);
}
function insertDrupalFilter(){
var obj = document.forms[0];
var htmlCode = '';
htmlCode += '[' + obj.drupal_filter_prefix.value + ':' + obj.drupal_image_id.value;
if (obj.alignment.value != 'none'){
htmlCode += ' class=' + obj.alignment.value;
}
htmlCode += ']';
insertHtml(htmlCode,obj);
}
#
#-----[ REPLACE WITH ]----------------------------
#
# or delete
// Removed for phpBB2
/*
function insertWpg2Tag(){
var obj = document.forms[0];
var htmlCode = '';
if (obj.alignment.value != 'none'){
htmlCode += '<div class="' + obj.alignment.value + '">';
}
if(window.tinyMCE) {
htmlCode += '<img src="' + obj.wpg2_thumbnail.value
+ '" alt="' + obj.wpg2_id.value
+ '" title="' + obj.wpg2_id.value
+ '" width="' + obj.wpg2_thumbw.value + '" height="' + obj.wpg2_thumbh.value
+ '" id="mce_plugin_g2image_wpg2" />';
}
else {
htmlCode += '<wpg2>' + obj.wpg2_id.value + '</wpg2>';
}
if (obj.alignment.value != 'none'){
htmlCode += '</div>';
}
insertHtml(htmlCode,obj);
}
function insertDrupalFilter(){
var obj = document.forms[0];
var htmlCode = '';
htmlCode += '[' + obj.drupal_filter_prefix.value + ':' + obj.drupal_image_id.value;
if (obj.alignment.value != 'none'){
htmlCode += ' class=' + obj.alignment.value;
}
htmlCode += ']';
insertHtml(htmlCode,obj);
}
*/
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Step 5: Lightbox display - language neutal mod (optional)
Code: › #
#-----[ OPEN ]----------------------------------
#
g2image/css/lightbox.css
#
#-----[ FIND ]----------------------------------
#
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
prevlabel.gif
#
#-----[ REPLACE WITH ]----------------------------
#
prev.gif
#
#-----[ FIND ]----------------------------------
#
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
nextlabel.gif
#
#-----[ REPLACE WITH ]----------------------------
#
next.gif
#
#-----[ FIND ]----------------------------------
#
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; }
#
#-----[ REPLACE WITH ]----------------------------
#
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 5px; }
#imageData #bottomNavClose{ width: 26px; float: right; margin-bottom: 9px; }
#
#-----[ OPEN ]----------------------------------
#
g2image/jscripts/lightbox.js
#
#-----[ FIND ]----------------------------------
#
var fileBottomNavCloseImage = "images/closelabel.gif";
#
#-----[ REPLACE WITH ]----------------------------
#
var fileBottomNavCloseImage = "images/close.gif";
#
#-----[ FIND ]----------------------------------
#
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
#
#-----[ REPLACE WITH ]----------------------------
#
Element.setInnerHTML( 'numberDisplay', eval(activeImage + 1) + " - " + imageArray.length);
#
#-----[ DIY INSTRUCTIONS ]------------------------
#
# optional
delete g2image/images/prevlabel.gif
delete g2image/images/nextlabel.gif
delete g2image/images/closelabel.gif
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Bug fix summary:
Code: › #
#-----[ OPEN ]------------------------------------------
#
g2image/jscripts/lightbox.js
#
#-----[ FIND ]------------------------------------------
#
var fileLoadingImage = "images/loading.gif";
var fileBottomNavCloseImage = "images/closelabel.gif";
#
#-----[ REPLACE WITH ]-------------------------------
#
var fileLoadingImage = "./g2image/images/loading.gif";
var fileBottomNavCloseImage = "./g2image/images/closelabel.gif";
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_gallery2.php
#
#-----[ FIND ]------------------------------------------
#
$sql = 'INSERT INTO ' . GALLERY2_TABLE . " (fullPath, embedUri, g2Uri, activeAdminId, utf8_translate) VALUES ('$fullPath', '$embedUri', '$g2Uri', $activeAdminId, $utf8)";
#
#-----[ REPLACE WITH ]-------------------------------
#
$sql = 'INSERT INTO ' . GALLERY2_TABLE . " (fullPath, embedUri, g2Uri, activeAdminId, utf8_translate, exportData) VALUES ('$fullPath', '$embedUri', '$g2Uri', $activeAdminId, $utf8, '')";
#
#-----[ OPEN ]----------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]----------------------------------
#
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
#-----[ BEFORE, ADD ]-----------------------------
#
// g2image - G2 url rewrite support(for [img]...[/img] tags)
$text = preg_replace('((\?)(g2_GALLERYSID=[a-f0-9]+|g2_GALLERYSID=TMP_SESSION_ID_DI_NOISSES_PMT))', '', $text);
#
#-----[ OPEN ]------------------------------------
#
g2image/g2image.php
#
#-----[ FIND ]------------------------------------
#
require_once('init.php');
session_start();
#
#-----[ REPLACE WITH ]----------------------------
#
session_start();
require_once('init.php');
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Since phpBB2 will be retired by 2009, I'm not going to work on following mods.
Coming soon...
Upgrade instructions for:
1. All Gallery Links In Profile Mod
2. Gallery Profile Mod Last edited by PoPoutdoor on Fri Apr 25, 2008 1:39 am; edited 8 times in total
Back to top
AdBot
Post subject: Upgrade instructions (0.5.10 to 0.5.11)
Back to top
PoPoutdoor Wizard Joined: Jan 20, 2006 Posts: 118
Posted: Mon Mar 03, 2008 3:10 pm Post subject: Re: Request Upgrade instructions (0.5.10 to 0.5.11)
Last weekend, I spare some time working on the 0.5.11 package... very disappointed!
1. Package doesn't have ALL the files for a new installation.
2. Mod instructions incorrect at somewhere (I can't recall all the details after fixing my site for the upgrade).
3. integration_mods.txt, includes/usercp_viewprofile.php code generate errors on
Code: › }
}
$db->sql_freeresult($result);
if (!empty($profiledata['link']))
{
$gallery_uri = append_sid("gallery2.$phpEx?g2_view=core.ShowItem&g2_itemId=" . $profiledata['user_gallery']);
Comment Line $db->sql_freeresult($result); fix the error.
4. Missing mod instructions for templates
IMHO, this package should be mark as beta.
Edit: I can't post my upgrade instructions! Message like "html not allow..." block the posting...
Back to top
jettyrat Moderator Joined: Nov 28, 2005 Posts: 1139
Posted: Mon Mar 03, 2008 5:19 pm Post subject: Re: Request Upgrade instructions (0.5.10 to 0.5.11)
@1. Which files? I just took a look at the package and everything seems to be there.
@2. We can't fix it if we don't know where the problem is!
@3. It looks like I made the sql query simpler and the freeresult won't work any longer. My bad
@4. template_mods.txt is there. The readme needs fixed because it says subsilver_mods.txt instead.
Put your fixes in a 'code' bbcode tag to post them.
I see a couple minor issues - nothing more
Also note that with the final release of phpbb3, I won't be doing much development on this integration any longer. I don't even have phpbb2 installed on my test machines any more.
Back to top
PoPoutdoor Wizard Joined: Jan 20, 2006 Posts: 118
Posted: Tue Mar 04, 2008 2:04 pm Post subject: Re: Request Upgrade instructions (0.5.10 to 0.5.11)
jettyrat:
Relax, man!
First of all, many thanks for the integration package for phpbb2.
The program code quality been good till 0.5.10. For 0.5.11. As you said, you don't have phpbb2 installed... so, not much actual tests leading to unexpected errors. That's the fact and I don't mean to blame anyone involved developing this package.
For software, most people agrees those lack of tests should be in alpha/beta state, no offense.
My personal site heavy modded, and I don't have the last package code.
If I got the 0.5.10 package(where can I download this?), I can try my best to create 0.5.10 to 0.5.11 upgrade instructions. May discover some minor errors for the 0.5.11 package too.
BTW, text already in [code] tags, but the site security code stops the posting, maybe catch on the template instruction lines
Back to top
jettyrat Moderator Joined: Nov 28, 2005 Posts: 1139
Posted: Tue Mar 04, 2008 5:01 pm Post subject: Re: Request Upgrade instructions (0.5.10 to 0.5.11)
No problems! The code was tested when it was written. Nothing has been reported since then, so I don't have phpbb2 installed after that, but I will install it once again with the newest version of phpbb2 and go through it one more time.
So far I only have one issue with freeresult and a typo in the readme. If there are more you can't post, feel free to email them to me- jettyrat_at_jettyfishing_dot_com.
Back to top
PoPoutdoor Wizard Joined: Jan 20, 2006 Posts: 118
Posted: Wed Mar 05, 2008 1:40 pm Post subject: Re: Request Upgrade instructions (0.5.10 to 0.5.11)
jettyrat,
I got the 0.5.10 package now.
I'll setup my Linux workstation with fresh phpbb2 (2.0.23) and Gallery 2.2.4 this weekend.
After 0.5.10 installed and works, I can work on the 0.5.10 to 0.5.11 upgrade instructions.
Hope I can do something useful for the integration package users.
Back to top
PoPoutdoor Wizard Joined: Jan 20, 2006 Posts: 118
Posted: Tue Mar 11, 2008 4:15 pm Post subject: Re: Upgrade instructions (0.5.10 to 0.5.11)
Upgrade instruction updated at first post.
Note: Instructions ONLY do upgrade as stated. If you have "user gallery / gallery link in profile" mod, don't use this!
Back to top
jettyrat Moderator Joined: Nov 28, 2005 Posts: 1139
Posted: Thu Mar 13, 2008 9:07 am&n