Dragonfly CMS v9 ⇒ Coppermine ⇒ Cooliris ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks Coppermine

Cooliris Reply to topic


Hello,

Did anyone ever try to implement Cooliris on DF with an RSS feed out of Coppermine?

It would be quite cool to be able to have a Cooliris 3D wall to be added as bbcode to an article just by specifying the ID of the coppermine gallery.

| Luxembourg Amateur Radio RL | RC Heli | My Site |

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/ 2.6.18 / 5.1.52 / 5.3.2 / 9.3.2.0


No experience of Cooliris I'm afraid (but enough experience of Coppermine hacking to make me very afraid Wink )

Initial thoughts for a direct Coppermine approach are that you could write an rss/ module for coppermine from scratch. Copying one for News etc. It is a fairly basic structure, and coppermine's db layout is not overly complex. Or perhaps shortcut that by playing with reDesign theme which at least has templates in place for the coppermine displays. Hack the template to add the Colliris required xml?

Are you aware that Pro_News offers a Coppermine album wall? No 3D I'm afraid, but selecting a Coppermine album from a pull down is all that's needed to fill the page with up to 32 images per page from the album. Pro_News is fully templated, so it ought to be possible to write a template that generated the required xml in place of or in addition to the usual HTML. Just don't know how you'd handle the 32 images per page limitation for larger albums.

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Hi layingback and thaks for your reply.

I'm not looking for a coppermine hack as I want to leave it as is. I'm more looking into a feature of adding a cooliris wall to an article.

I have the rss script for coppermine displaying the last 4 uploads. I can rewrite this so that the ouput will be in the format cooliris needs it:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Feed title</title> <description>Feed Description</description> <link>http://www.example_url.com</link> <item> <title>Picture A</title> <media:description> This one's my favorite.</media:description> <link>modules/coppermine/albums/userpics/10021/img_0733%7E0.jpg</link> <media:thumbnail url="http://example.com/modules/coppermine/albums/userpics/10021/thumb_img_0733%7E0.jpg"/> <media:content url="http://example.com/modules/coppermine/albums/userpics/10021/normal_img_0733%7E0.jpg"/> </item> </channel> </rss>

Cooliris say that the object to be embedded should be set like this. I modified it to display album 1 for example.

<object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="450"> <param name="movie" value="http://apps.cooliris.com/embed/cooliris.swf" /> <param name="allowFullScreen" value="true" /> <param name="allowScriptAccess" value="always" /> <param name="flashvars" value="feed=api://www.example_url.com/rss/coolirislast100.php?album=1" /> <embed type="application/x-shockwave-flash" src="http://apps.cooliris.com/embed/cooliris.swf" flashvars="feed=api://www.example_url.com/rss/coolirislast100.php?album=1" width="600" height="450" allowFullScreen="true" allowScriptAccess="always"> </embed> </object>

Finally the aim is to display the wall by adding for example [cooliris]1[/cooliris] in an article so that the last 100 pictures of album 1 will be shown.

Do you think this is possible without modifying the original modules too much?

| Luxembourg Amateur Radio RL | RC Heli | My Site |

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/ 2.6.18 / 5.1.52 / 5.3.2 / 9.3.2.0


Shouldn't be hard. What are you using for copprmine rss feed, newphpto.php? In which case just copy and rename it, then set about changing the initial selection query to get the album you want, rather than the most recent.

If you are not that familar with SQL, one trick is to capture the generated SQL code from the Debug display at the bottom of the screen when you're in admin mode, then paste that into phpMyAdmin as SQL. You should get to see the results "live". Then mess around until you get the SQL right, and only then try to generate the PHP code to make the new SQL call. Much easier than trying to solve both at once.

EDIT: Is there a way to get Cooliris to display as a 1-off event without storing the images, or do you have to upload, save and then subsequently display?

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Hi everybody,

After many trial and errors (the cooliris developper hints were not entirely correct), I managed to get it working.
I rewrote the newphoto.php to fit the coolirsis feed requirments and called it coolirislast.php. The file is located in the /rss folder of DF along with all the other feeds.

I added 2 rows of code to nbbcode.php so that the gallery can be displayed by simply typing [coolirislast] in any text.

Following lines need to be added:
// [coolirislast] $patterns[] = "#\[coolirislast\]#si"; $replacements[] = '<object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="450"><param name="movie" value="http://apps.cooliris.com/embed/cooliris.swf" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="feed='.$BASEHREF.'rss/coolirislast.php" /><embed type="application/x-shockwave-flash" src="http://apps.cooliris.com/embed/cooliris.swf" flashvars="feed='.$BASEHREF.'rss/coolirislast.php" width="600" height="450" allowFullScreen="true" allowScriptAccess="always"></embed></object></center>';

Find
if ($allowed) { #
$patterns[] = "#\[hr\]#si"; $replacements[] = '<hr />';

and put it somewhere below.

You also need to unzip the attached file to the /rss folder. Somebody with real programming skills can perhaps clean the code. But at least this one works Embarassed

You can see the result here: heli.lu

The next step will be to define the album number and have the album you want to be displayed.

Have fun!
Attachment: coolirislast.zip
Description rss
Filename coolirislast.zip
Filesize 1.74 KiB
Downloaded 4 Time(s)
You are not allowed to view/download this attachment

| Luxembourg Amateur Radio RL | RC Heli | My Site |

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/ 2.6.18 / 5.1.52 / 5.3.2 / 9.3.2.0


Good work!

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Cool idea, works great on my test site, oddly the rss fails on our live site though. 😢

jw.servegame.org/index...amp;t=3944


www.junglewraiths.net/...islast.php

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


Nevermind, faulty upload I think. Embarassed

www.junglewraiths.net/...4505#44505

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0

All times are UTC


Jump to: