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

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : December 02, 2008, 07:43:00 am
+  RSGallery2 Support Forums
|-+  RSGallery2
| |-+  General discussion (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  Is there a way to have description NOT also appear in alt text?
Advanced search
  « previous next »
Pages 1
Author
Topic: Is there a way to have description NOT also appear in alt text?  (Read 3310 times)
« on: May 05, 2008, 02:59:27 pm »
jsperl Offline
Newbie
*
Posts: 4



But still appear on the image display page?  Here is an example of one of mine:

http://76.12.14.108/index.php/component/option,com_rsgallery2/Itemid,88/id,200/page,inline/

The problem is that when hovering over the image or thumbnails you get a really ugly scene with the alt text pop-ups showing all the content in all the raw html glory.

The best of both worlds would be the ability to specify the alt text separately, as I don't really want to leave those blank either.  Any way to do that?

eta: I'm using 1.14.3 Alpha - SVN 649
Logged
 
Reply #1
« on: May 05, 2008, 03:38:47 pm »
jsperl Offline
Newbie
*
Posts: 4



Ok...I found a solution.

As I thought about it more, what I really wanted was not so much a way to enter the alt text separately (which would mean more manual labor), but I wanted the alt text to use my already existing titles rather that my descriptions.  Which as it turns out is very simple...here is how, for anyone else that might be interested:

For the thumbs: 

1.  Open thumbs_table.php (or thumbs_float.php depending on which one you're using).

2.  Look for

   <img src="<?php echo $thumb->url();?>" alt="<?php echo htmlspecialchars(stripslashes($item->descr), ENT_QUOTES); ?>"/>

Change  $item->descr   to  $item->title   


For the main image box:

1.  Open display.class.php

2.  Look for

   $this->_showImageBox( $item->name, $item->title );      In this case you'll see this line in 3 clauses corresponding to the choice of no pop-up, normal pop-ups, or lightbox.  Edit all 3 or just the one that applies to your choice.

3.  Again, change $item->descr   to  $item->title

Voila! Nice, clean alt text pop-ups!


 

Logged
 
Reply #2
« on: June 09, 2008, 02:15:59 pm »
Tanya C Offline
Newbie
*
Posts: 32



this is great my friend, thanks for sharing Smiley Kiss

« Last Edit: June 09, 2008, 02:31:58 pm by Tanya C » Logged
 
Reply #3
« on: August 31, 2008, 12:46:44 pm »
Viquiw Offline
Newbie
*
Posts: 5



 Cheesy Thank you  - this was really helpful!
Logged
 
Print  Pages 1
« previous next »
Jump to: