RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : November 23, 2008, 07:11:09 am
+  RSGallery2 Support Forums
|-+  Developers corner
| |-+  Nightly Builds for RSGallery2 Legacy, J1.5 or J1.0 - Now Reopened! (Moderators: Daniel Tulp, Chef Groovy)
| | |-+  [NOT A BUG][SVN-514] HTML in image description displays in image alt tag
Advanced search
  « previous next »
Pages 1
Author
Topic: [NOT A BUG][SVN-514] HTML in image description displays in image alt tag  (Read 4886 times)
« on: December 08, 2007, 08:01:09 am »
hyphenated Offline
Newbie
*
Posts: 21

View Profile

Mouse over Becky's Bridal image in gallery located here:

http://get-hyphenated.com/test_site/index.php?option=com_rsgallery2&Itemid=27&gid=1

Joomla version - 1.0.13 Stable
PHP version - 4.4.4
Front Error Displays fine in the backend
« Last Edit: December 12, 2007, 10:21:22 am by Ronald Smit » Logged
 
Reply #1
« on: December 08, 2007, 11:19:23 am »
Etienne Offline
Newbie
*
Posts: 20

View Profile Email

Hi

I've got the same problem. Additional information:

Using IE6 mouseover results in html etc as above
Using FF2.0.0.11 no alt info is displayed on mouseover.
Using Opera9.1 the actual address to the image file is displayed on mouseover.

Regards
Etienne
Logged
 
Reply #2
« on: December 11, 2007, 09:09:19 am »
hyphenated Offline
Newbie
*
Posts: 21

View Profile

hi, has anyone got any suggestions?
Logged
 
Reply #3
« on: December 11, 2007, 11:19:21 am »
john Offline
Dev Team
Sr. Member
*
Posts: 464

View Profile

Hello all.

this is a normal behavior.


The image's description is added to the alt tag of the thumb displayed.

To remove that behavior remove the alt tag in the corresponding template.

Example for semantic template using float to display thumbs:

in file "templates/semantic/html/thumbs_float.php" change line 20 from:
Code:
<img alt="<?php echo htmlspecialchars(stripslashes($item->descr), ENT_QUOTES); ?>" src="<?php echo $thumb->url(); ?>" />

to:

Code:
<img alt="" src="<?php echo $thumb->url(); ?>" />

john
Logged
 
Reply #4
« on: December 11, 2007, 11:56:28 am »
hyphenated Offline
Newbie
*
Posts: 21

View Profile

I do not particularly want to lose the description in the alt.  I just don't want the html coding displaying in the alt.  Anyway around losing the alt altogether?

Could we display the title in the alt instead?  How?
« Last Edit: December 11, 2007, 12:03:15 pm by hyphenated » Logged
 
Reply #5
« on: December 11, 2007, 12:29:01 pm »
Ronald Smit Offline
Administrator
Hero Member
*****
Posts: 1214

View Profile WWW Email

Guys,
This is the result of the broken tooltip in J10, something todo because we are trying to use J15 libraries.

We'll see if we can fix this.

Cheers,


Logged

Ronald Smit
RSGallery2 Developer
FAQ|Known issues
 
Reply #6
« on: December 11, 2007, 02:20:48 pm »
Etienne Offline
Newbie
*
Posts: 20

View Profile Email

Hi

Ok, making changes to the file "templates/semantic/html/thumbs_float.php" made no difference to my display. I even deleted the line completely and the alt was still displaying. Decided I need to look elsewhere. This is what I've done now (I'm using the semantic template):

in templates/meta/display.class.php line 895
           
Quote
<img id="thumb1" src="<?php waterMarker::showMarkedImage($name);?>" alt="<?php echo htmlspecialchars(stripslashes($descr), ENT_QUOTES); ?>" border="0"  />
            <?php
        } else {
            ?>
            <img id="thumb1" src="<?php echo imgUtils::getImgDisplay($name); ?>" alt="<?php echo htmlspecialchars(stripslashes($descr), ENT_QUOTES); ?>" border="0"  />
I replaced the $descr with $name. This displays the image name as alt.

I'm do not know much about php but my logic says $title should display the image title in the alt tag but for some reason this does not work.
Logged
 
Reply #7
« on: December 11, 2007, 02:38:38 pm »
Etienne Offline
Newbie
*
Posts: 20

View Profile Email

Hi again

The above post refers to the alt tag for the 'big' image. To get the alt tag for the thumbnail to display the title of the image edit the following:

In templates/semantic/html/thumbs_table.php in line 21
Quote
<img alt="<?php echo htmlspecialchars(stripslashes($item->descr), ENT_QUOTES); ?>" src="<?php echo $thumb->url(); ?>" />
change descr to title.
Logged
 
Reply #8
« on: December 11, 2007, 07:40:46 pm »
hyphenated Offline
Newbie
*
Posts: 21

View Profile

Etienne - Your logical fix sounds wonderful.  I hope to test it in the morning.  I must also say thank you for your time in finding the solution.  I really appreciate your efforts!

Thank You Very Much,
hyphenated
Logged
 
Reply #9
« on: December 12, 2007, 10:22:06 am »
Ronald Smit Offline
Administrator
Hero Member
*****
Posts: 1214

View Profile WWW Email

Guys,

I stand corrected! This is not a bug. I mixed this up with a backend problem.

Cheers,

Logged

Ronald Smit
RSGallery2 Developer
FAQ|Known issues
 
Reply #10
« on: December 14, 2007, 10:09:06 am »
hyphenated Offline
Newbie
*
Posts: 21

View Profile

Etienne's solution worked.  Follow the instructions above to fix your galleries.  The fix has not been applied to any of the nightly builds thus far.

Thank You again Etienne !
Logged
 
Reply #11
« on: December 14, 2007, 04:18:46 pm »
vanessa Offline
Newbie
*
Posts: 1

View Profile

Really need to apply this fix but cannot find the file"templates/meta/display.class.php" anywhere?

Please point me in the right direction. Have also searched all the RS2Gallery files and folders for the code <img alt="<?php echo htmlspecialchars(stripslashes($item->descr), ENT_QUOTES); ?>" src="<?php echo $thumb->url(); ?>" /> and can't find it anywhere - are there 2 different rsgallery2's? I'm using one for Joomla!

Thanks

V
Logged
 
Reply #12
« on: December 19, 2007, 03:12:26 pm »
Etienne Offline
Newbie
*
Posts: 20

View Profile Email

Hi Vanessa

Don't quite know why your search is unsuccessful. Anyway the full path should be:

root/components/com_rsgallery2/templates/meta/display.class.php

Hope that helps

Etienne
Logged
 
Print  Pages 1
« previous next »
Jump to: