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   Go Down

Author Topic: Media RSS plugin with Cooliris support  (Read 11903 times)

0 Members and 1 Guest are viewing this topic.

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Media RSS plugin with Cooliris support
« on: September 15, 2010, 08:54:36 pm »

I wanted to have a full screen slideshow option in my gallery and decided to leverage Cooliris, a very nice media browser, which can be installed as a web browser extension. This simple coppermine 1.5.x plugin adds media rss feeds to the gallery, allowing browsing with Cooliris and possibly other use cases as well.

What it does:
  • creates media rss feed and adds a media rss link to album thumbnails page
  • adds a cooliris link next to sorting options on album thumbnails page

Issues/Limitations
  • meta albums not supported
  • ignores permissions (intended for public galleries)
  • cooliris icon does not appear on thumbnails, because a link to media rss is added to head after the page is loaded. I don't know how to do that properly without modifying coppermine core code. A cooliris link is added instead.

Requirements
  • Coppermine 1.5.x (tested with 1.5.8 )
  • DomDocument library for PHP

Demo
http://www.marek-paterczyk.waw.pl/gallery/thumbnails.php?album=36 (click the cooliris link, follow steps on screen to install Cooliris, then click the cooliris link again)

Hope you'll like it :)
Logged

nickelas

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 112
Re: Media RSS plugin with Cooliris support
« Reply #1 on: September 19, 2010, 08:24:57 pm »

I like it!
Would be great if meta-albums would be supported sometime in the future
Thank you for the plugin
Logged
Human

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #2 on: September 19, 2010, 08:50:42 pm »

Thanks! I'll add meta albums support if I ever figure out how ;)
Logged

nickelas

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 112
Re: Media RSS plugin with Cooliris support
« Reply #3 on: September 19, 2010, 09:19:20 pm »

Great!
One question, any way of changing the order of the images? Mine seems to be ordered older -> newer and I would like it the other way
Logged
Human

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #4 on: September 19, 2010, 09:39:11 pm »

You can change sorting order by applying the following patch:
Code: [Select]
--- a/gallery/plugins/mediarss/album_feed.php
+++ b/gallery/plugins/mediarss/album_feed.php
@@ -15,11 +15,11 @@ header('Content-type: application/rss+xml');
 $aid = $superCage->get->getInt('aid');
 if  ($aid > 0)
 {
-       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES']." WHERE aid = $aid;";
+       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES']." WHERE aid = $aid ORDER BY ctime DESC;";
 }
 else
 {
-       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES'].";";
+       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES']." ORDER BY ctime DESC;";
 }
 
 $result = cpg_db_query($query);
Logged

nickelas

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 112
Re: Media RSS plugin with Cooliris support
« Reply #5 on: September 20, 2010, 09:33:31 am »

Thanks
Logged
Human

ppeter

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Re: Media RSS plugin with Cooliris support
« Reply #6 on: September 26, 2010, 04:13:40 pm »

hi!

i need an absolut link image.xml for using it in slideshow pro, any info how i get the media rss .xml info?

or is is the hole link

:)
peter
Logged

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #7 on: September 27, 2010, 01:31:51 pm »

Hi Peter

Open an album and click the feed icon on the right side of the url bar. E.g. http://www.marek-paterczyk.waw.pl/gallery/index.php?file=mediarss/album_feed&aid=36

Regards
Marek
Logged

ppeter

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Re: Media RSS plugin with Cooliris support
« Reply #8 on: September 27, 2010, 02:24:29 pm »

hi!

is this the access to the hole album on my gallery
feed://www.lfsstainz.at/gallery1/index.php?file=mediarss/album_feed
:)
peter
Logged

ppeter

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Logged

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Logged

ppeter

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 36
Re: Media RSS plugin with Cooliris support
« Reply #11 on: September 27, 2010, 09:28:21 pm »

thank you
Logged

Plappermaul

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Media RSS plugin with Cooliris support
« Reply #12 on: October 14, 2010, 12:02:40 am »

Hello,

i have changed the $query in top of the album_feed.php. Now it will display meta albums too.


Logged

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #13 on: October 14, 2010, 10:12:50 pm »

i have changed the $query in top of the album_feed.php. Now it will display meta albums too.

Interesting. I applied the patch, but I don't see how I can generate a feed for meta albums. Could you provide some instructions?

Thanks
Marek
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Media RSS plugin with Cooliris support
« Reply #14 on: January 23, 2011, 11:43:48 am »

You can change sorting order by applying the following patch:
Code: [Select]
--- a/gallery/plugins/mediarss/album_feed.php
+++ b/gallery/plugins/mediarss/album_feed.php
@@ -15,11 +15,11 @@ header('Content-type: application/rss+xml');
 $aid = $superCage->get->getInt('aid');
 if  ($aid > 0)
 {
-       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES']." WHERE aid = $aid;";
+       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES']." WHERE aid = $aid ORDER BY ctime DESC;";
 }
 else
 {
-       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES'].";";
+       $query = "SELECT pid, title, caption, filepath, filename FROM ".$CONFIG['TABLE_PICTURES']." ORDER BY ctime DESC;";
 }
 
 $result = cpg_db_query($query);

For simple people like me, can you please explain WHERE you apply this patch please, as I too would like to have newest photos first.

Thanks

Martin
Logged

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #15 on: January 23, 2011, 12:11:18 pm »

For simple people like me, can you please explain WHERE you apply this patch please, as I too would like to have newest photos first.

Thanks

Martin

Automated way to apply a patch:
1) Save the patch as a text file named patch.txt in your gallery root.
2) Change directory to your gallery root.
3) Execute: patch -i patch.txt -p2 -l

Manual way to apply the patch:
Edit <gallery root>/plugins/mediarss/album_feed.php. Replace lines marked with - with lines marked with +, as indicated in the patch.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Media RSS plugin with Cooliris support
« Reply #16 on: January 23, 2011, 12:32:05 pm »

Thanks for the quick reply.

I now get - http://www.brummiesfans.com/gallery/index.php?file=mediarss/album_feed

There are no thumbnails in that feed, so when the CoolIris block on my site - www.brummiesfans.com  picks up on this, it just displays grey rectangles, where the thumbnails should go.

Is there a way to get this to produce a feed that looks like my "old" feed - http://www.brummiesfans.com/gallery1/rss.php

I would like to deactivate my old gallery and run the feed from the new one (/gallery1 is the "old" gallery) but I need the thumbs to be fed into CoolIris first.

Thanks

Martin
Logged

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #17 on: January 23, 2011, 12:37:37 pm »

Hm, is your site_url configured correctly? It's used by the plugin to create urls.
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Media RSS plugin with Cooliris support
« Reply #18 on: January 23, 2011, 12:50:47 pm »

Hm, is your site_url configured correctly? It's used by the plugin to create urls.

Which configurations need to be checked? The gallery functions perfectly in all other respects.

The one other plugin which may affect the URL's is the Search Engine Friendly URLs plugin, but I've uninstalled that, tried again, and the results are no different. (I've reinstalled it again since)

Thanks for your attention to this, I hope that it won't need to be a big fix to sort this out.

Martin
Logged

paterczm

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 21
Re: Media RSS plugin with Cooliris support
« Reply #19 on: January 23, 2011, 01:01:40 pm »

Which configurations need to be checked? The gallery functions perfectly in all other respects.

The one other plugin which may affect the URL's is the Search Engine Friendly URLs plugin, but I've uninstalled that, tried again, and the results are no different. (I've reinstalled it again since)

Thanks for your attention to this, I hope that it won't need to be a big fix to sort this out.

Martin

Looking at gallery1 links in the feed:
http://www.brummiesfans.com/gallery/albums/2010/Away%20Stoke%2005-06/stoke_v_brummies_13.jpg (200 - OK)
Looking at gallery links in the feed:
http://www.brummiesfans.com/photos/albums/2010/Away%20Stoke%2005-06/stoke_v_brummies_13.jpg (404 - Not found)

You can check site_url in the admin panel, general settings tab. I believe it should be http://www.brummiesfans.com/gallery/ in order to work.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.022 seconds with 21 queries.