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] 2 3 4 5 ... 7   Go Down

Author Topic: Easy RSS feed  (Read 131813 times)

0 Members and 1 Guest are viewing this topic.

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Easy RSS feed
« on: May 17, 2007, 09:27:32 pm »

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]
« Last Edit: March 05, 2010, 09:02:31 am by Joachim Müller »
Logged

ComputerLady

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 23
    • Design COMP
Re: Easy RSS feed
« Reply #1 on: May 17, 2007, 11:33:37 pm »

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

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #2 on: May 18, 2007, 01:26:50 am »

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
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Easy RSS feed
« Reply #3 on: May 18, 2007, 05:16:37 am »

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

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #4 on: May 18, 2007, 05:39:59 am »

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
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Easy RSS feed
« Reply #5 on: May 18, 2007, 05:51:14 am »

Yep everything is there.
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Easy RSS feed
« Reply #6 on: May 18, 2007, 05:57:06 am »

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
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Easy RSS feed
« Reply #7 on: May 18, 2007, 06:03:57 am »

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

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #8 on: May 18, 2007, 06:14:56 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.
Logged

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #9 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.

Edit: Deleted attachment. Please see initial post for most recent version.
« Last Edit: May 18, 2007, 08:47:32 am by flaquito »
Logged

MarkP

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Easy RSS feed
« Reply #10 on: May 18, 2007, 06:41:57 am »

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
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Easy RSS feed
« Reply #11 on: May 18, 2007, 07:47:32 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
Logged

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #12 on: May 18, 2007, 07:52:10 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.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Easy RSS feed
« Reply #13 on: May 18, 2007, 07:55:06 am »

My bad, your correct.

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

Good work!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Easy RSS feed
« Reply #14 on: May 18, 2007, 08:25:24 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
Logged

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #15 on: May 18, 2007, 08:39:35 am »

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.

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. :)
« Last Edit: May 18, 2007, 08:49:11 am by flaquito »
Logged

Pakistani1

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Easy RSS feed
« Reply #16 on: May 29, 2007, 10:59:56 am »

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

kevFISH

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
  • Technical micro-user!
    • Poor Knights Diving Liveaboard
Re: Easy RSS feed
« Reply #17 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:
Logged

flaquito

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 9
Re: Easy RSS feed
« Reply #18 on: May 30, 2007, 03:01:20 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.

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

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: Easy RSS feed
« Reply #19 on: June 01, 2007, 09:34:38 am »

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:
Code: [Select]
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
Logged
Pages: [1] 2 3 4 5 ... 7   Go Up
 

Page created in 0.027 seconds with 21 queries.