DISQUS

jon madison: Gallery-RSS Wordpress Plugin

  • joy · 4 years ago
    saweet! You are a genius. That's why I love you:) A mad genius, but a genius none the less:)

    Take and shower and hurry up, we've got places to go, people to see!!!!!
  • phi · 4 years ago
    Interesting piece of code.. I cant however get it to work.. Im sure im calling it the wrong way from inside the index.php - any directions how to do this?
  • jon · 4 years ago
    Hi! Assuming you've set it up according to the "INSTALL" instructions in the source code, and have activated the plugin in your Plugins section in Admin, here is how i am calling it in my template to display in the sidebar on the front page:


    <li>
    < ?php echo gallery_rss(4,"",0,0.50,"div"); ?>;
    < /></li>
    on, and one i need to add to the instructions! Thanks for the checking this out, and your swift feedback!
  • jaibharat · 4 years ago
    Hi,
    I'm trying to get this work. In my wp-sidebar template i'm calling < ?php echo gallery_rss(4, '', 0, 1.0); ?> < />. But always width and height are zero. I think because you are calling $rss->image and I don't find any "image" element in rss generated by "gallery". Element < pb : thumb > and height attributes. Shouldn't we read those values instead. Am I making any sense ? Please let me know where I'm going wrong.
  • jaibharat · 4 years ago
    I mean Element <h;pb:thumb height="113" width="144">
  • jaibharat · 4 years ago
    My bad. I created an album, but didn't add any photo. So if the recent album is empty, "gallery" with not generate "image" element. Now I could get it to work. Can please let me know if there Is a way to read attributes with magpie rss ?
  • jon · 4 years ago
    You know, jaibharat--if i find out how to use attributes--i would be set, as I would rather use the width and height on each of the photo tags, instead of the initial image tag. That was my original desire, but I found no way to use attributes with Magpie RSS.

    Looking at the magpie RSS website, it appears that attributes are not currently supported. From the TODO section:


    Improve support for modules that rely on attributes


    j.
  • jaibharat · 4 years ago
    Thank Jon. I implemented a temporary hack. I posted the details here.
  • Tara · 4 years ago
    holy cow... I think you read my mind. I was talking about something like this over pizza the other day and then poof! you did it. Awesome. I'll be playing with it soon :D
  • jon · 4 years ago
    Tara, the trick was, you talked about it over pizza. me and pizza are like this:-)

    Jaibharat, thanks for the hacks! I'm going to wait until Magpie properly implements attributes (hopefully you've contacted them with your changes!) before updating the plugin.

    thanks again!

    j.
  • Ryan Parman · 4 years ago
    I'd suggest checking out 2 projects:

    Simple PHP Gallery (with built-in support for Wordpress)
    http://www.relativelyabsolute.com/spg/

    SimplePie (a super-simple RSS parser)
    http://www.skyzyx.com/projects/simplepie/
  • Luc-Marie · 4 years ago
    I agree with Ryan Simple Php Gallery will be fine. No need of special extension activated on the server except GD 2 functions which is current.
    (excuse my poor english)
  • jon · 4 years ago
    I am sure it would be fine. I would say for "most" people, something simple is the way to go.

    For my purposes, menalto gallery works perfectly as well.

    Particularly since I am familiar with it (always a top consideration)

    Gallery will allow me to allow friends to place their photos up as well.

    and there exists an iPhoto to Gallery plugin.

    Wait a second--why are we discussing the merits of gallery software? I just wrote a plugin that serves *my* purposes. :)
  • Sandra · 4 years ago
    This looks pretty cool. What am I doing wrong if the photos that show up aren't the most recently added ones? They seem to just be random photos.
  • jon · 4 years ago
    you know what, sandra, this is a function of the actual gallery rss module. the way it updates is interesting. basically any little thing you'd do to a gallery makes the rss file itself show an update (if someone leaves a comment, you rename a gallery, etc.) -- i think it'd be better if there existed an RSS that was triggered *only* by picture updates...i'm looking into this, as i look to make some enhancements to the plugin...

    if you happen to come across a module for gallery 1 that allows custom RSS feeds, you should be able to point to one of them in the plugin and it'll read that instead (although there's no guarantee that the format of said RSS would match the "standard" rss.php that comes with gallery).

    hope this helps!
  • Sandra · 4 years ago
    I found someone who had done a Gallery rss.php file which sorts by most recent photo added, at least now that I'm using it seems to work that way with your plugin. Here is the link:
    http://www.bovine.net/~jlawson/gallery/rss2.phps

    I saved that file as rss.php in my Gallery install directory.

    I've only got one actual size thumbnail showing with "ul" layout because with four thumbs and the "div" layout the rest of my sidebar kept getting thrown off whack... if I knew more about css it probably would be really easy to fix... but for now I'm happy with at least the one "most recently added" photo showing up.

    Thanks again.
  • jon · 4 years ago
    I'm actually having some issues with the display of multiple thumbnails under certain situations as well (that's why i'm only showing the ul view right now on my front page)--i need to build up my css chops. i'm showing two in "ul" mode--the only issue i have with the "recently updated photo", is that my portrait pictures get squished, because the plugin reads the first values for the width and height, as opposed to each image, because of a Magpie limitation--however, see comment #8 for a hack to Magpie and this plugin to get it to work properly.
  • Sandra · 4 years ago
    Sorry to bother you again... but do you ever get the following error when your page loads?
    "Warning: MagpieRSS: Failed to fetch http://www.stewartville.org/gallery/rss.php. (HTTP Response: ) in /home/.ike/stewartville/stewartville.org/news/wp-content/plugins/magpierss/rss_fetch.inc on line 239
    Warning: Invalid argument supplied for foreach() in /home/.ike/stewartville/stewartville.org/news/wp-content/plugins/gallery_rss.php on line 128"

    I've looked online a bit, like Magpie FAQ, etc. and it seems like if it can't access the rss.php, then there should be a way to have the cache loaded rather than report the error. I thought I'd followed suggestions to avoid it correctly, but I still get the error quite frequently when my page loads. A refresh usually fixes it, but not always.
  • jon · 4 years ago
    Since the first release, i haven't had any errors actually *using* the plugin (i've had aesthetic issues, that we've discussed above :)

    i'll have to look into this as well.

    when you say

    I thought I’d followed suggestions to avoid it correctly


    you did this by modifying the php code?

    i'm not familiar with what the Magpie folk say to do to avoid it, so i'll have to look it up--i'll let you know.

    j.
  • h0bbel · 4 years ago
    Just wanted to let you know that the next version of Gallery 1.x (Gallery 1.5) will allow you to have an rss feed for each seperate album, so you could limit the output from your great plugin to one album only.
  • jonmadison · 4 years ago
    this is great news. i'm curious about (and have been at least researching) gallery 2, because i like it a bit more so far. i'm hoping that the RSS support will be available there as well, as opposed to hooking into the API to do what this plugin does.

    thanks again for letting me know!

    j.
  • LaRosa · 4 years ago
    very nice plugin Jon. i was able to get this working with MovableType pretty easily.

    check my blog @ UrbanWordz.com. My gallery is small right now as i just installed it.

    lj.
  • Adam · 4 years ago
    Hi, just discovered your excellent plugin, but is it me or does it only display one image from each album? When I point it this feed (http://hosted.gothikon.com/jmax/gallery/rss.php) from a gallery with only one album it only displays one image. However if I point it to my own gallery RSS feed (http://pictures.gothikon.com/rss.php) which has multiple albums it displays the number of images I request.
  • jon · 4 years ago
    The plugin displays whatever the RSS for gallery will give you. If i recall correctly, gallery 1.5 will have more robust RSS support, but for now, I believe gallery only gives you the album highlight images that were last updated.

    j.
  • AdamW · 4 years ago
    Jon,
    I'm getting the exact same error message that Sandra reported. Could this be an issue with the way Gallery's rss is configured? There are a few options in the gallery config, but I don't know too much about that stuff. How do you have your gallery rss options set up? FWIW, I'm using gallery 1.4.4-pl6.
    Thanks!
  • AdamW · 4 years ago
    Nevermind about my last comment. Turns out that if the cache hasn't been initialized, it'll throw that error. I loaded my gallery rss feed in an rss reader, and after that it works. My next question: How do I get the side by side setup? When I first saw this the other day, your Last Updates was showing 4 thumbnails in a 2x2 matrix (table?). How do I do this? If it's css trickery, then can you help me out with that, as I'm a total css novice? Thanks again!
  • AdamW · 4 years ago
    Okay, another issue: it seems that the plugin is setting the height/width of all the thumbnails to that of the first. (View my website to see what I mean). Looking at the code, it seems that it should be setting these attributes individually, but it obviously isn't. I really want to make this plugin work, but I can't go live until I iron out these wrinkles.
    Thanks again, Jon.
  • jon · 4 years ago
    hey adam, see above for jaibharat's issue--it's a limitation of magpie. jai has a patch to my code to give you what you're looking for. i won't have support in this one until magpie is upgraded to do what jai has it doing. :)

    thanks!

    j.
  • Colin · 4 years ago
    nice plugin. I have only just begun to tinker with it. but, I noticed that you weren't properly closing the img tags, which caused some problems for me until I fixed it.
  • jon · 4 years ago
    interesting. is this the new version? or the one available from the wordpress plugins site? the one you can download correctly is constanstly in flux...i say this because there are quite a few people using this plugin, and this is the first i've heard of this...as a matter of fact, i'm looking at my source and i don't see it, help a brother out! thanks.

    j.
  • Colin · 4 years ago
    Well, I very well could be wrong (I am harldy a PHP or HTML expert), but shouldn't:
    alt=\"$title\"> (line 157)

    be:

    alt=\"$title\" />

    The same with line 143.

    And, this is the version marked current release on this page.
    Again, nice job with the plugin... I am diggin' it thus far.
  • AlberTUX · 4 years ago
    hey bro, grat plugin!, now, just wondering, hos often does it refreshes with the rss???

    thanks!!
  • Sam Stevens · 4 years ago
    Hello Jon--

    I've been using your Gallery RSS for a few months now--thank you!

    I just upgraded my gallery to G2. As you probably know, RSS support was dropped for G2.0, though there is a module in beta available here:

    http://cvs.sourceforge.net/viewcvs.py/gallery-c...

    I have this module installed and it's generating feeds. The feed URL however is much longer and more complex than G1.5's simple blahblah/rss.php URL. I've pumped this 4 line URL into $gallery_rss_url in your plugin and uploaded the file. Unfortunately, no images are displayed. i can't tell if this is a problem with the G2 RSS module, or if it's an incompatibility with your Gallery RSS plugin.

    Any plans to support G2 with your plugin?

    cheers
    SAM :)
  • jon · 4 years ago
    unfortunately, i've been using flickr since :-o, and have no plans on updating the code currently; but anyone's welcome to take it on!

    j.
  • Christian · 3 years ago
    The download links
    http://blog.isaidjon.com/dl/gallery_rss_0.3.zip
    http://blog.isaidjon.com/dl/gallery_rss.phps
    are broken

    and the bottom of your page reads
    Possibly Related Posts

    Fatal error: Call to undefined function: related_posts() in /home/.dahlidryer/jmm/blog.isaidjon.com/wp-content/themes/smbro6/sidebar.php on line 11
  • jon · 3 years ago
    good looking out. i've fixed the latter; and need to restore the former. should be up tonight!

    thaks again,

    j.
  • Cari · 3 years ago
    Eagerly awaiting the update on the download links :) Have heard wonderful things about this plug-in.
  • Web Directory · 3 years ago
    Thank Jon,
    Interesting piece of code.
  • Zachrana Dat · 3 years ago
    Thanks for your code,we try it now :-)
  • 0dot · 3 years ago
    thanks
  • Portraits from photos · 3 years ago
    Hi Jon - this Gallery-RSS plugin is a great idea. Now its time to try it out. I'll let you know how it goes - thank you for sharing.