Options

Caption in RSS feeds

westiswestis Registered Users Posts: 34 Big grins
Hi,

I'm using the WP-Smugmug plugin to include thumbs from a gallery RSS feed in a WordPress post. How can I have the captions included? That is, not as alt text for the link and the image, as it is now, but as a text that can be shown together with the image?

I've made a test post here: http://www.danielwestergren.se/2006/12/31/test/

The code on a page where the author of the WP-Smugmug plugin is using the plugin there is also some <span> tags and the caption included.

By the way, if I use the Atom feed there is no link for the image, so the alt text shows instead.

Educate me! :D

Btw, my SmugMug page is http://westis.smugmug.com

Thanks!

Comments

  • Options
    ockabewisockabewis Registered Users Posts: 5 Beginner grinner
    edited January 23, 2007
    westis wrote:
    Hi,

    I'm using the WP-Smugmug plugin to include thumbs from a gallery RSS feed in a WordPress post. How can I have the captions included? That is, not as alt text for the link and the image, as it is now, but as a text that can be shown together with the image?
    Though you will need to play around with the CSS options for the plugin to get the text to appear how you want, the quick answer for this is to add the following line:
    $new_content .= $item["title"];
    
    after
    $new_content .= ' title="' .  $item["title"]  . '" target="_blank">[IMG]%27%20.%20$item%5B[/IMG]';
    
    in the wp-smugmup.php plugin file. This should be line 108 in the file (at least for me it was).

    BTW - The "target="_blank" is something I added as well so my smugmug gallery opens in a new window instead of taking people away from my site.

    And finally - I just found out about SmugMug yesterday via TechCrunch, so I have just started checking out the service as well as this plugin for Wordpress.
  • Options
    ockabewisockabewis Registered Users Posts: 5 Beginner grinner
    edited January 23, 2007
    You can see it in action here:
    http://www.thebarkersworld.com/scotland/#more-35

    If you like it and want to know what changes I made inside the plugin options, let me know...
    ockabewis wrote:
    Though you will need to play around with the CSS options for the plugin to get the text to appear how you want, the quick answer for this is to add the following line:
    $new_content .= $item["title"];
    
    after
    $new_content .= ' title="' .  $item["title"]  . '" target="_blank">[IMG]%27%20.%20$item%5B[/IMG]';
    
    in the wp-smugmup.php plugin file. This should be line 108 in the file (at least for me it was).

    BTW - The "target="_blank" is something I added as well so my smugmug gallery opens in a new window instead of taking people away from my site.

    And finally - I just found out about SmugMug yesterday via TechCrunch, so I have just started checking out the service as well as this plugin for Wordpress.
  • Options
    areyoubgareyoubg Registered Users Posts: 7 Beginner grinner
    edited January 24, 2007
    CSS showing up in your example?
    ockabewis wrote:
    Though you will need to play around with the CSS options for the plugin to get the text to appear how you want, the quick answer for this is to add the following line:
    $new_content .= $item["title"];
    
    Sweet, sweet, VERY SWEETthumb.gif

    Couple of challenging questions for ya,though:
    1. Where's the example on your site? Not seeing anything other than the YouTube and Flicker stuffs feeding in.
    2. Was hoping to see the demo on your site to check your code to see if the CSS file was being called in. Not seeming to get it to feed into the site I am currently working on (http://lakecountyhistory.org/2007/01/17/testing-gallery-insert/)
    Thanks for the post. It is most helpful to what I am trying to do with this client site.
  • Options
    ockabewisockabewis Registered Users Posts: 5 Beginner grinner
    edited January 24, 2007
    Here's where I have it tested right now:
    http://www.thebarkersworld.com/posts/Scotland

    I added this in the WP-SmugMug options:

    In the "HTML Before Each Image", I added this at the end:
    div class="towsm_caption_text
    
    In the "HTML After Each Image", I added another one of these at the end:
    /div
    
    In the "CSS" area, I added this:
    #towsm_rss .towsm_caption_text {
            text-align: center;
            font-size: 0.8em;
        }
    
    You can play with that to adjust how you want the text to display.

    Bear in mind, I am no guru, but I can usually hack my way through to get what I want. :D
    areyoubg wrote:
    Sweet, sweet, VERY SWEETthumb.gif

    Couple of challenging questions for ya,though:
    1. Where's the example on your site? Not seeing anything other than the YouTube and Flicker stuffs feeding in.
    2. Was hoping to see the demo on your site to check your code to see if the CSS file was being called in. Not seeming to get it to feed into the site I am currently working on (http://lakecountyhistory.org/2007/01/17/testing-gallery-insert/)
    Thanks for the post. It is most helpful to what I am trying to do with this client site.
  • Options
    areyoubgareyoubg Registered Users Posts: 7 Beginner grinner
    edited January 25, 2007
    Nice country
    Good to see how it works for you.

    Unfortunately, something in my theme (I think) is preventing me from actually seeing the CSS stylesheet from being applied to the images on the page. Hmmm, I wonder if it has anything to do with the fact that I am using the plugin in a post vs. a page. Will have to check that out.

    Thanks!
  • Options
    ockabewisockabewis Registered Users Posts: 5 Beginner grinner
    edited January 25, 2007
    Dunno...
    I am using the plugin on a page as well. All I did was put what text I wanted in the Post field in Wordpress and them put wp-smugmug as the key in the custom field and put this link for the value:

    http://ockabewis.smugmug.com/hack/feed.mg?Type=gallery&Data=2381048&format=rss200

    Dunno why it's not showing up when viewing the source on your page...ne_nau.gif
    areyoubg wrote:
    Good to see how it works for you.

    Unfortunately, something in my theme (I think) is preventing me from actually seeing the CSS stylesheet from being applied to the images on the page. Hmmm, I wonder if it has anything to do with the fact that I am using the plugin in a post vs. a page. Will have to check that out.

    Thanks!
Sign In or Register to comment.