Easy RSS feed for cpg1.5.x Easy RSS feed for cpg1.5.x
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Easy RSS feed for cpg1.5.x

Started by hobert, August 24, 2010, 02:55:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hobert

Easy_RSS
Written by: Brent Gerig
Ported to 1.5 by: Kevin Robnett

(Adapted to cpg 1.5xx from the cpg 1.4.xx version.)

This is the first plugin I've written, so it may not be perfect. However, I've tested it as much as I could and it seems to work well. I'd love feedback and bug reports, and I'll do what I can to continue developing it.

Summary:
This plugin adds an RSS feed of the most recent uploads to a gallery. It is based on the rss.php written by Tarique Sani and modified by versus7 (See original thread at http://forum.coppermine-gallery.net/index.php?topic=11081.0).

The RSS feed will always show last updates for the portion of the gallery where the link is obtained. For example, the RSS link in a particular album will show updates to that album, but the RSS link in a user gallery will show recent updates to that user's gallery only.

Features:

  • Inserts RSS feed links in all gallery pages that display thumbnails.
  • Shows updates specific to:

    • Entire gallery
    • Albums
    • User galleries
    • Random
  • Configurable on install to:

    • Use either the image title or caption for the RSS item title (Default: title)
    • Include any number of items in the feed (Default: 10)
  • Also configurable is what RSS links to include. These are:

    • RSS link tag in the HTML head
    • RSS icon with direct link to feed in the gallery footer
    • "Add to Google" button in the gallery footer
    • "Add to My Yahoo!" button in the gallery footer
  • Respects private albums (This is a modification to the original rss.php, so anyone that had trouble with the original file may want to try this plugin)
  • Multi-language support (English, German and Dutch are included at this time)

Installation:
Copy the folder to your plugin folder and use the plugin manager to install it.
To change configuration options, please uninstall and reinstall the plugin.
Note: Installing this plugin will copy the rss.php file to your root Coppermine folder. If the file already exists, it will not be overwritten, but the plugin will probably not work correctly. There's probably a way to do this without copying it, but I was having path problems.

Changes

Ver 1.5.0

  • Superglobals rewritten to use the new code sanitization in 1.5.

uk_martin

Hi

I've installed this plugin. It can be seen here - http://brummiesfans.com/gallery/displayimage-172-4151-_newport_v_brummies_08_jpg_.html#top_display_media

The RSS feed that is generated when clicking on the RSS button in the footer, does not work. It generates a page with what ought to be the right URL, but the content is "404" - http://www.brummiesfans.com/photos/rss.php?album=172

You will notice that I am using the Search Engine Friendly URLs plugin as well, however I did try uninstalling this plugin to see if the RSS feed would work - and it still didn't.

Any idea how this can be resolved?

uk_martin

Scrap that last post of mine. I made a config change that now makes it work, HOWEVER I have noticed something else that could do with rectifying.

http://www.brummiesfans.com/gallery/rss.php?album=lastup

You will notice that there are some missing thumbnails. The links are to WMV files. Is there any way of the RSS file creating a dummy thumbnail for video files, just so that it doesn't look like there is something missing?

Thanks

Martin

uk_martin

Just thought, in the event of a default thumbnail for a WMV (or other video file) not being able to be used, can the RSS feed be filtered so that only certain file types are on the feed? (e.g. JPG PNG GIF only?) It would be a great bonus for those of us who upload still images and videos.

Thanks

Martin

ff

I've been using this plugin with an edited rss.php for framechannel to be used with my Kodak W1020 digital frame.
Framechannel.com stopped their services and I've changed the settings to my own rss-feed to be included at the frame.

I'm just missing two things.
- A fresh feed every 15 minutes (just add <ttl>15</ttl>) ?

- Random images from all albums and not only the last 100 from last-up, or random images from the choosen album.

Is there a way to enable those options?

My current rss.php is included.

hobert

Well, each time the rss.php is read by whatever program/browser/etc, a new page is created, reading the current information of the gallery.

That said, if the program/browser/etc is configured to check a RSS feed for a ttl specification, having that on your page will tell the program/browser/etc at what point it should check for new information instead of using the cached file.  Having a ttl of 15 means it should check every 15 minutes (or if it's been longer than 15 minutes since the last check).  Is that how often you add new photos to your gallery?  If not, maybe you want to use a higher number (like 60, 360 or 1440?) or leave blank.  I know I can get a lot of hits just from a few peoples' feedreaders and over time, that adds up.

As far as adding it, you'll either need to uninstall the module, edit the plugins/easy_rss/rss.php and then reinstall it, or directly modify the rss.php in your gallery directory (which means if you have to uninstall it later, and reinstall it, your changes are lost).  In both cases, simply add <ttl>15</ttl> after the <description> line and before the <generator> line.

Now, your second part.  As far as I know, the rss.php should read from the current album you are looking at and pulling a feed for that album (last, random or a specific album), but it looks like it's not working on mine.  I'll look into it and see if I can figure out what's going wrong.  If you want to make a permenant change to the entire gallery, you'll need to edit the codebase.php in the plugins/easy_rss folder (search for =lastup for where to change).

Hope this helps!

ff

Quote from: hobert on June 28, 2011, 11:53:32 PM
Well, each time the rss.php is read by whatever program/browser/etc, a new page is created, reading the current information of the gallery.

That said, if the program/browser/etc is configured to check a RSS feed for a ttl specification, having that on your page will tell the program/browser/etc at what point it should check for new information instead of using the cached file.  Having a ttl of 15 means it should check every 15 minutes (or if it's been longer than 15 minutes since the last check).  Is that how often you add new photos to your gallery?  If not, maybe you want to use a higher number (like 60, 360 or 1440?) or leave blank.  I know I can get a lot of hits just from a few peoples' feedreaders and over time, that adds up.

As far as adding it, you'll either need to uninstall the module, edit the plugins/easy_rss/rss.php and then reinstall it, or directly modify the rss.php in your gallery directory (which means if you have to uninstall it later, and reinstall it, your changes are lost).  In both cases, simply add <ttl>15</ttl> after the <description> line and before the <generator> line.

Now, your second part.  As far as I know, the rss.php should read from the current album you are looking at and pulling a feed for that album (last, random or a specific album), but it looks like it's not working on mine.  I'll look into it and see if I can figure out what's going wrong.  If you want to make a permenant change to the entire gallery, you'll need to edit the codebase.php in the plugins/easy_rss folder (search for =lastup for where to change).

Hope this helps!

The feed is currently working for my frame (http://www.ff.fm/fotoalbum/rss.php).
I get the images included in this feed.

If the feed is randomized (100 images from all public albums), the 15 minutes TTL would give my frame 100 new images each 15 minutes.
That's why I put my TTL low.

It midnight here, but if you want some more information about my set-up just yell and I'll look at it tomorrow (uhm, this) morning

ff

Hobert, I somehow can't send PM's anymore.

The RSS-feed is normally only visible for me. It wasn't open for the world.
The frame depends on RSS-feeds to show the images and I don't know how slider mod or cpmFetch do this. BTW are they already available for 1.5?

hobert

Yes, I use this slider mod with my 1.5.12 gallery (http://forum.coppermine-gallery.net/index.php/topic,41197.0.html)

cpmFetch has it's own sub-board (http://forum.coppermine-gallery.net/index.php/board,57.0.html), but I haven't used it in years, so I don't know where it stands.

As the random gallery seems to have been dropped from CPG (if it ever existed, I am just finding things that are now broke when album=random), I don't think any generic rss feed code will work.

Please note, when visiting your gallery, the rss icon is plainly visible in the footer, as well as the rss feed icon on my broswer being active.  This is because you are using the mod and it's assumed to be public.  If you want a private rss feed, this is not the mod for you.

ff

Quote from: hobert on June 29, 2011, 08:37:56 PM
Yes, I use this slider mod with my 1.5.12 gallery (http://forum.coppermine-gallery.net/index.php/topic,41197.0.html)

I'll go and check this one.

Quote
Please note, when visiting your gallery, the rss icon is plainly visible in the footer, as well as the rss feed icon on my broswer being active.  This is because you are using the mod and it's assumed to be public.  If you want a private rss feed, this is not the mod for you.

That's correct. I need the correct URL myself to insert into my frame. After it is working, it will be disabled.
Just a few people check this site, family and friends (less than 10 ppl ;)). And from those just 1 knows what RSS is :D

ff

I was using the slider mod in 1.4, but couldn't get it to work in 1.5.
How did you do that?

mel45

Hi,
I have installed Easy RSS into my coppermine gallery seems to be feeding OK but is not showing thumbnail images.
Here is the feed link       http://www.x-pozd.com/rss.php

can you please help

Thanks in advance

hobert

Quote from: mel45 on October 08, 2011, 11:56:26 AM
Here is the feed link       http://www.x-pozd.com/rss.php

The link above sends you to a blank page (no body) and after visiting your main site, I can find no hint there is an rss feed.  Did you disable the mod?

mitko

Hi Hobert!

Looks like "number of files" parameter in the settings doesn't work. I tried to set it to 20 or 50 but anyway always get only 10 - see http://www.lightphotos.net/photos/rss.php?album=lastup

hobert

Release of version 1.5.1

    Changelog
    • Fixed problem where number of files was ignoring what you entered in the setting when installing.

    Note: To update your existing rss feed, uninstall the plugin, upload the new files, and then reinstall the plugin.[/list]

    mitko

    Confirmed. Everything is ok with new version, thank you very much!

    nickelas

    Thanks for this plugin.
    I found two things that can be improved:
    - swedish characters don't work
    - it does not respect permissions, pictures set to not be visible by all are included in the feed
    Human

    bg62

    Quote from: mitko on November 09, 2011, 06:03:59 PM
    Confirmed. Everything is ok with new version, thank you very much!
    pour moi aussi = grand merci !
    ;)
    Mes principaux sites >>> Fonds d'écran / référencer votre site / Longue traîne ... :)     le 'www' est fait aussi pour communiquer, partager et échanger, non ?