Easy RSS feed Easy RSS feed
 

News:

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

Main Menu

Easy RSS feed

Started by flaquito, May 17, 2007, 09:27:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flaquito

Easy_RSS
Written by: Brent Gerig

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 and Dutch are included at this time)

Installation:
Just use the plugin manager to upload the zip file, then click the 'i' to install it.
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.0.1

  • Fixed a bug that caused the Yahoo! button to not display
  • Removed clear.gif and referenced images/spacer.gif instead

Ver 1.1

  • Fixed "The selected album/file does not exist !" error when displaying user galleries
  • Removed RSS feed display on categories, since the rss.php file does not yet correctly support categories


[Edit GauGau 2010-03-05]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_easy-rss_v1.3.zip/download
[/Edit]

ComputerLady

This sounds to be exactly what I've been looking for, and I feared I might have to tackle writing the plug-in myself! (Not sure I was up to the job!) Okay, downloading to install on my test setup before committing to my live sites. Anyone else doing testing?

flaquito

Great! I hope it does what you need it to. Let me know how works out, and if there's anything that needs to be clarified or changed.

-Brent

MarkP

Installed it and don't see anything. Infact I don't even see the plugin in the plugin area after install either

flaquito

Well that's odd. Just to be absolutely sure, I completely deleted the plugin from my gallery, re-downloaded the file from this thread, and uploaded and installed it. It worked just fine. Can you open the zip file and make sure you have a good download? The md5sum (as of ver 1.0, just in case I post an update in the future) should be 9a207fe2c55102aa6f5b5ea79bdfcbb1 and it should have the following files:

Easy_RSS/lang/english.php
Easy_RSS/codebase.php
Easy_RSS/rss.php
Easy_RSS/configuration.php
Easy_RSS/rss.gif
Easy_RSS/include/init.inc.php
Easy_RSS/clear.gif

MarkP

Yep everything is there.

MarkP

Had to go into php my admin to remove the plugin it does not show up in the plugin list. Might be because of some other plugin I use these plugins:

Installed Plugins 
Name Stats v1.1    
Author Frantz
Description Displays gallery stats by date. (adapted from Nibblers mod's)
   
      
Name Gallery Directory v1.1    
Author wirewolf at Academy Photo Gallery
inspired by Frantz's Photo Summary v1.0 plugin inspired from fotofreek's mod
Description Add a menu link to a Bulleted Category Directory Page with link to each photo under their respective Albums
   
      
Name File replacer v1.0    
Author Nibbler
Description Allows files to be replaced by a replacement file. Enhanced to work together with the modpack (watermarking, minithumbs, thumb cropping, thumb sharpening, backup orig file) 01-14-2007 Stramm.
   
      
Name Photo Summary v2.0    
Author Frantz inspired from fotofreek's mod and wirewolf's preview css window popup
Description Add a menu link to a photo summary page with link to each photo with preview image popup
   
      
Name Pic Poster v1.0    
Author Stramm stramm@gmx.net stramm.st.funpic.org
Description Displays the name of the uploader above the intermediate image on your Coppermine Photo Gallery.
   
      
Name Update History v2.0    
Author Frantz
Description Displays last updates from the gallery. (adapted from Nibblers mod)
admin page for plugin settings and archive link

MarkP

Ok I moved the priority up to 0 and it is working now.

flaquito

Quote from: MarkP on May 18, 2007, 06:03:57 AM
Ok I moved the priority up to 0 and it is working now.
Interesting. Thanks for testing that. If you don't mind doing just a bit more testing, I'd be curious to know which plugin it's compatible with. Maybe I can fix that.

Also, I just finished up a slightly updated version (v1.0.1) that fixes a bug that I completely missed in displaying the Yahoo! button. I'll attach it to my initial post as soon as I can figure out how to edit that post. I can't find a modify button anywhere, and I haven't been around the forums long enough to know if that's been disabled or something.

flaquito

#9
Well, until I can modify my initial post, here's version 1.0.1. md5sum is f8699f6bd19e420b019203635d113fc0.

This fixes the problem with the Yahoo! button not displaying, plus it removes my clear.gif and uses the already-existing spacer.gif.

Edit: Deleted attachment. Please see initial post for most recent version.

MarkP

I have removed it. The plugin breaks the link in the user files. After installing this plugin I get this error when opening user galleries:

The selected album/file does not exist !

gallery/plugins/Easy_RSS/codebase.php - Line: 263

Hein Traag

Quote from: flaquito on May 18, 2007, 06:38:01 AM
Well, until I can modify my initial post, here's version 1.0.1. md5sum is f8699f6bd19e420b019203635d113fc0.

This fixes the problem with the Yahoo! button not displaying, plus it removes my clear.gif and uses the already-existing spacer.gif.

Flaquito, next time remember to also update the first post with the new version of the plugin zip file  ;)

Hein

flaquito

Quote from: Hein on May 18, 2007, 07:47:32 AM
Flaquito, next time remember to also update the first post with the new version of the plugin zip file  ;)

Hein

I'd love to, but like I said in my previous posts, unless I'm missing something I don't have the ability to edit my previous posts. In the meantime, thanks for adding the file -- you can go ahead and remove the first version, too.

Hein Traag

My bad, your correct.

Added dutch.php zipped to this post for future release of this plugin.

Good work!

Joachim Müller

Quote from: flaquito on May 18, 2007, 07:52:10 AM
I'd love to, but like I said in my previous posts, unless I'm missing something I don't have the ability to edit my previous posts.
Thanks for your contribution. Regular users can't edit their postings, because of abuse of this feature in the past. I have added you to the contributor group, you should now be able to edit your postings accordingly. Moving thread to plugin contributions.

Great work

Joachim

flaquito

#15
Well, after looking at it more carefully, it appears that the original rss.php file that I used was much more broken than I thought, and doesn't currently support categories. So, at least for now, categories don't have the ability to have rss feeds. This most recent version has those changes, and also fixes the user gallery error that Mark was having. In addition, it now has Dutch support included (thanks, Hein!). Newest version and list of changes/fixes is in the first post.

Quote from: GauGau on May 18, 2007, 08:25:24 AM
Thanks for your contribution. Regular users can't edit their postings, because of abuse of this feature in the past. I have added you to the contributor group, you should now be able to edit your postings accordingly. Moving thread to plugin contributions.

Great work

Joachim

Thanks, Joachim. That makes things so much easier. I promise I won't abuse it. :)

Pakistani1

how can i display the rss.php in a html block of mxbb portal .. ?

kevFISH

Thanks for that :)
Searched for 'rss' found this thread, downloaded file, installed it, all works fine and good to go.

Wish life was always this easy :lol:

flaquito

Quote from: Pakistani1 on May 29, 2007, 10:59:56 AM
how can i display the rss.php in a html block of mxbb portal .. ?

Well, I don't know anything about mxbb or its coppermine integration, but if you can add code to it, you can reference http://www.yoursite.com/your_cpg/rss.php directly. Assuming that you have access on the php side of things to an album variable, you can call something like rss.php?album=$album. Feel free to PM me and I'll help out more if I can.

Quote from: kevFISH on May 30, 2007, 01:18:28 AM
Thanks for that :)
Searched for 'rss' found this thread, downloaded file, installed it, all works fine and good to go.

Wish life was always this easy :lol:

I'm glad it's working so well for you. Thanks for the feedback!

Tranz

Thanks for this plugin, flaquito. I don't know if it's a universal issue or not, but the feed wouldn't validate with encoding 'iso-8859-1'. Since Coppermine uses utf, perhaps the plugin should use it, too, since some of the entered text gets affected by changing to a different character encoding.

This was what I changed in rss.php:
header ("content-type: text/xml; charset=utf-8");
//maybe you must change the encoding to iso-8859-1.
$rssHeader = <<<EOT
<?xml version="1.0" encoding="utf-8"?>


I made additional changes to the rss file so that it is compatible with Google Screensaver, which was requested in another thread: http://forum.coppermine-gallery.net/index.php?topic=44162.msg210132#msg210132