Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Easy RSS feed for cpg1.5.x  (Read 10171 times)

0 Members and 1 Guest are viewing this topic.

hobert

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 29
Easy RSS feed for cpg1.5.x
« on: August 24, 2010, 02:55:29 PM »

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.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Easy RSS feed for cpg1.5.x
« Reply #1 on: January 23, 2011, 01:01:22 PM »

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?
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Easy RSS feed for cpg1.5.x
« Reply #2 on: January 23, 2011, 02:21:10 PM »

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
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Easy RSS feed for cpg1.5.x
« Reply #3 on: January 25, 2011, 02:24:19 AM »

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
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Easy RSS feed for cpg1.5.x
« Reply #4 on: June 28, 2011, 08:44:31 PM »

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.
Logged

hobert

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 29
Re: Easy RSS feed for cpg1.5.x
« Reply #5 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!
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Easy RSS feed for cpg1.5.x
« Reply #6 on: June 29, 2011, 12:00:42 AM »

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
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Easy RSS feed for cpg1.5.x
« Reply #7 on: June 29, 2011, 09:54:56 AM »

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?
Logged

hobert

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 29
Ways to get random pictures
« Reply #8 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)

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.
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Ways to get random pictures
« Reply #9 on: June 29, 2011, 09:15:34 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
Logged

ff

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
Re: Easy RSS feed for cpg1.5.x
« Reply #10 on: July 05, 2011, 09:31:21 AM »

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

mel45

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Easy RSS feed for cpg1.5.x
« Reply #11 on: October 08, 2011, 11:56:26 AM »

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
Logged

hobert

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 29
Re: Easy RSS feed for cpg1.5.x
« Reply #12 on: October 11, 2011, 01:59:51 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?
Logged

mitko

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 112
    • World of Lighthouses
Re: Easy RSS feed for cpg1.5.x
« Reply #13 on: November 09, 2011, 11:37:54 AM »

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

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 29
Re: Easy RSS feed for cpg1.5.x
« Reply #14 on: November 09, 2011, 06:25:42 PM »

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]
    Logged

    mitko

    • Coppermine frequent poster
    • ***
    • Country: 00
    • Offline Offline
    • Gender: Male
    • Posts: 112
      • World of Lighthouses
    Re: Easy RSS feed for cpg1.5.x
    « Reply #15 on: November 09, 2011, 07:03:59 PM »

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

    nickelas

    • Coppermine frequent poster
    • ***
    • Offline Offline
    • Posts: 112
    Re: Easy RSS feed for cpg1.5.x
    « Reply #16 on: November 22, 2011, 10:28:29 AM »

    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
    Logged
    Human

    bg62

    • Coppermine novice
    • *
    • Country: fr
    • Offline Offline
    • Gender: Male
    • Posts: 46
    • le 'www' est fait aussi pour communiquer, partager
      • fonds d'écran gratuits
    Re: Easy RSS feed for cpg1.5.x
    « Reply #17 on: January 25, 2017, 07:53:02 PM »

    Confirmed. Everything is ok with new version, thank you very much!
    pour moi aussi = grand merci !
    ;)
    Logged
    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 ?
    Pages: [1]   Go Up
     

    Page created in 0.094 seconds with 21 queries.