forum.coppermine-gallery.net
Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: paterczm 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 (http://www.cooliris.com/), a very nice media browser, which can be installed as a web browser extension. This simple coppermine 1.5.x plugin adds media rss (http://en.wikipedia.org/wiki/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 (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 :)
-
I like it!
Would be great if meta-albums would be supported sometime in the future
Thank you for the plugin
-
Thanks! I'll add meta albums support if I ever figure out how ;)
-
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
-
You can change sorting order by applying the following patch:
--- 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);
-
Thanks
-
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
-
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
-
hi!
is this the access to the hole album on my gallery
feed://www.lfsstainz.at/gallery1/index.php?file=mediarss/album_feed
:)
peter
-
feed://www.lfsstainz.at/gallery1/index.php?file=mediarss/album_feed (http://feed://www.lfsstainz.at/gallery1/index.php?file=mediarss/album_feed)
-
http://www.lfsstainz.at/gallery1/index.php?file=mediarss/album_feed&aid=5 - album with id 5
http://www.lfsstainz.at/gallery1/index.php?file=mediarss/album_feed&aid=0 - all albums
-
thank you
-
Hello,
i have changed the $query in top of the album_feed.php. Now it will display meta albums too.
-
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
-
You can change sorting order by applying the following patch:
--- 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
-
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.
-
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
-
Hm, is your site_url configured correctly? It's used by the plugin to create urls.
-
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
-
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.
-
Yes, that's it. It all works well now. Thanks for your help.
Martin