Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 230
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 195
Total: 195

Author Topic: Just some minor code errors and fixes for Gallery Pro 2.5  (Read 5242 times)

0 Members and 2 Guests are viewing this topic.

Offline treasurenet

  • Member
  • *
  • Posts: 42
    • View Profile
Just some minor code errors and fixes for Gallery Pro 2.5
« on: July 26, 2009, 02:54:09 am »
1. lightbox not working.
Cause: incorrect url to lightbox javascript files.

Fix....

In Gallery2.php  find....

Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_path'] . 'css/lightbox.css" type="text/css" media="screen" />';
   
Replace with....

Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_url'] . 'css/lightbox.css" type="text/css" media="screen" />';
   
      

In Gallery.php  find....   
      
Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_path'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_path']. 'css/lightbox.css" type="text/css" media="screen" />';

Replace with....

Code: [Select]
// Using Lighbox
if ($modSettings['gallery_set_nohighslide'] == 2)
$context['html_headers'] .= '<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/prototype.js"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="' . $modSettings['gallery_url'] . 'js/lightbox.js"></script>
<link rel="stylesheet" href="' . $modSettings['gallery_url']. 'css/lightbox.css" type="text/css" media="screen" />';

2. invalid html code
align=top" should be valign="top"

Fix...

Go to line 1490 of Gallery.template.php

find...

Code: [Select]
'?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] . '</a><a href="', $scripturl, '?action=gallery;sa=myimages;u=' . $context['gallery_pic']['ID_MEMBER'] . '"><img src="'.$settings['images_url'].'/filter.gif" align=top" style="margin: 0 1ex;" alt="" /></a>&nbsp;';
replace with....

Code: [Select]
'?action=profile;u=' . $context['gallery_pic']['ID_MEMBER'] . '">'  . $context['gallery_pic']['realName'] . '</a><a href="', $scripturl, '?action=gallery;sa=myimages;u=' . $context['gallery_pic']['ID_MEMBER'] . '"><img src="'.$settings['images_url'].'/filter.gif" valign="top" style="margin: 0 1ex;" alt="" /></a>&nbsp;';
3. invalid html code....
closing tag for input form missing.....

Fix - go to line 1876 of Gallery.template.php

find....
Code: [Select]
if ($modSettings['gallery_set_showcode_bbc_image'])
echo '<tr><td width="30%">', $txt['gallery_txt_bbcimage'], '</td><td> <input type="text" value="[img]' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '[/img]" size="50"></td></tr>';

if ($modSettings['gallery_set_showcode_directlink'])
echo '<tr><td width="30%">', $txt['gallery_txt_directlink'], '</td><td> <input type="text" value="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" size="50"></td></tr>';

if ($modSettings['gallery_set_showcode_htmllink'])
echo '<tr><td width="30%">', $txt['gallery_set_showcode_htmllink'], '</td><td> <input type="text" value="<img src=&#34;' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '&#34; />" size="50"></td></tr>';

replace with....
Code: [Select]
if ($modSettings['gallery_set_showcode_bbc_image'])
echo '<tr><td width="30%">', $txt['gallery_txt_bbcimage'], '</td><td> <input type="text" value="[img]' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '[/img]" size="50" /></td></tr>';

if ($modSettings['gallery_set_showcode_directlink'])
echo '<tr><td width="30%">', $txt['gallery_txt_directlink'], '</td><td> <input type="text" value="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" size="50" /></td></tr>';

if ($modSettings['gallery_set_showcode_htmllink'])
echo '<tr><td width="30%">', $txt['gallery_set_showcode_htmllink'], '</td><td> <input type="text" value="<img src=&#34;' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '&#34; />" size="50" /></td></tr>';

4. Missing alt tags

There are several not mentioned here, but go to line 1372 in Gallery.template.php and find.....

Code: [Select]
if ($modSettings['gallery_make_medium'] == 0 || $context['gallery_pic']['mediumfilename'] == '')
echo '<img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" />';
else
echo '<a href="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['mediumfilename']  . '" /></a>';
}
else if ($modSettings['gallery_set_nohighslide'] == 2)
{
// Lightbox
if ($modSettings['gallery_make_medium'] == 0 || $context['gallery_pic']['mediumfilename'] == '')
echo '<a href="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '" rel="lightbox" title="' . $context['gallery_pic']['description'] . '"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" /></a>';
else
echo '<a href="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '" rel="lightbox" title="' . $context['gallery_pic']['description'] . '"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['mediumfilename']  . '" /></a>';

and replace with....  

Code: [Select]
if ($modSettings['gallery_make_medium'] == 0 || $context['gallery_pic']['mediumfilename'] == '')
echo '<img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="" />';
else
echo '<a href="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['mediumfilename']  . '" alt="" /></a>';
}
else if ($modSettings['gallery_set_nohighslide'] == 2)
{
// Lightbox
if ($modSettings['gallery_make_medium'] == 0 || $context['gallery_pic']['mediumfilename'] == '')
echo '<a href="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '" rel="lightbox" title="' . $context['gallery_pic']['description'] . '"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="" /></a>';
else
echo '<a href="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '" rel="lightbox" title="' . $context['gallery_pic']['description'] . '"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['mediumfilename']  . '" alt="" /></a>';


« Last Edit: July 26, 2009, 04:07:04 am by treasurenet »
Using SMF 1.1.10, Gallery Pro 2.5

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Just some minor code errors and fixes for Gallery Pro 2.5
« Reply #1 on: July 26, 2009, 08:58:55 am »
Fixed all for next release
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3847 Views
Last post November 08, 2007, 10:36:47 am
by rockskullz
4 Replies
14746 Views
Last post December 04, 2007, 09:27:54 pm
by SMFHacks
0 Replies
3818 Views
Last post January 29, 2009, 06:15:54 am
by cepsi
2 Replies
6016 Views
Last post May 19, 2009, 10:01:04 pm
by william777
1 Replies
3131 Views
Last post September 15, 2017, 12:40:15 pm
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal