DIY Themes Forums  

Go Back   DIY Themes Forums > Thesis Theme > Thesis Feature Requests
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-31-2008, 05:03 AM
Junior Member
 
Join Date: Jul 2008
Posts: 3
Default Captions for Multimedia Box

I would love it if I could specify image captions for the multimedia box on the Thesis Options page.

I'm using the image rotator to display images from my work, and it would be great if I could have a short caption that is integrated with the frame and changes with the image to explain what each image is.

See http://grandall.org to see what I mean.
Reply With Quote
  #2 (permalink)  
Old 08-01-2008, 12:08 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

grandall: I see that you're already using the ALT tags for random images; you can make them your captions if you're willing to modify a core file.

Open lib/functions/multimedia_box_functions.php and find this:

Code:
    echo '<img ' . $images[$random_image]['class'] . 'src="' . $images[$random_image]['url'] . '" alt="' . $images[$random_image]['alt'] . '" />' . "\n";
In a new line after it, add this:
Code:
    echo '<p style="text-align: center; font-size: 0.786em;">' . $images[$random_image]['alt'] . '</p>' . "\n";
The included style is just a suggestion; feel free to adjust it to suit your needs.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #3 (permalink)  
Old 08-01-2008, 07:42 PM
Junior Member
 
Join Date: Jul 2008
Posts: 3
Default

That worked beautifully, thanks!

Of course, I'd still like to see it added as a feature so I don't have to tweak any core files.
Reply With Quote
  #4 (permalink)  
Old 08-02-2008, 03:40 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

grandall: That's entirely up to Chris, but I'm glad that the posted code works for you!
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #5 (permalink)  
Old 09-09-2008, 10:36 PM
Junior Member
 
Join Date: Jul 2008
Posts: 4
Default alt text for files in rotator folder

So I can't believe that I don't know the answer to this, but how are you adding alt text to each image? I would normally insert it in the html when I embed an image in a page, but it seems like what you're saying is that you've saved each image with an embedded alt text attribute...Is that true? If so, how?

Thanks much - I know this is off-topic for Thesis, but I want to use this caption technique but can't figure out where to put the alt-text. . .

Thanks!
Reply With Quote
  #6 (permalink)  
Old 09-10-2008, 03:11 AM
Junior Member
 
Join Date: Apr 2008
Posts: 22
Default Amazon store

Grandall, how did you incorporate Amazon store directly into your blog? Looks great!
__________________
Cottage Home and Garden

Thesis Blog: Swan Journal for Women
Reply With Quote
  #7 (permalink)  
Old 09-15-2008, 10:33 AM
Junior Member
 
Join Date: Aug 2008
Posts: 13
Default

Could we go even further with this? The photos I've put in my rotator are from Flickr. I'd love to be able to display the photo in the rotator, and have a caption below it linking to the original Flickr photo page.

Ideas, anyone?
Reply With Quote
  #8 (permalink)  
Old 10-13-2008, 07:26 PM
Junior Member
 
Join Date: Aug 2008
Posts: 29
Default

I had it working in THesis 1.1 but now the captions are gone. What happened? I don't see where to add that code in the lib/functions/multimedia_box_functions.php. What up?

Last edited by sister : 10-13-2008 at 08:23 PM.
Reply With Quote
  #9 (permalink)  
Old 10-15-2008, 07:43 PM
Junior Member
 
Join Date: Aug 2008
Posts: 29
Default Thesis 1.2: captions for photos in Rotator

Can you tell me the Thesis 1.2 solution for adding Captions to photos in the Rotator?
Reply With Quote
  #10 (permalink)  
Old 10-16-2008, 09:36 PM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

Editing core files is in no way encouraged at this point, though if you want to brave it, open up /lib/functions/multimedia_box_functions.php and find this:

PHP Code:
if ($image_alt_tags[$random_image])
        
$images[$random_image]['alt'] = $image_alt_tags[$random_image]; 
Replace it with this:

PHP Code:
if ($image_alt_tags[$random_image]) {
        
$images[$random_image]['alt'] = $image_alt_tags[$random_image];
        
$caption '<p style="text-align: center; font-size: 0.786em;">' $images[$random_image]['alt'] . '</p>' "\n";
    } 
Then this:

PHP Code:
echo $link_before $img $link_after
with this:

PHP Code:
echo $link_before $img $link_after $caption
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:00 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0