Advanced search  


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.

Pages: [1]   Go Down

Author Topic: RSS feed for Kodak EasyShare W1020 Wireless Digital Frame  (Read 6227 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
RSS feed for Kodak EasyShare W1020 Wireless Digital Frame
« on: July 06, 2011, 07:57:05 pm »

The Kodak EasyShare W1020 Wireless Digital Frame had the ability to show images with help from They, however, terminated their services.

This frame also has the ability to show a RSS-feed with images.
Problem is that normally RSS-feeds show the most recent images.

I edited Slider in Coppermine to create a simple RSS-feed which updates every 15 minutes.

I have a file (rss.php) with the code beneath in the root of my album.
Code: [Select]
This script choose random pics (15 by default) from your coppermine album.
It then creates a rss-feed for the Kodak digital image frame which is refreshed every 15 minutes.
// Initialisation

//For all tests only,uncomment the line "required..." and run the script by http://your-site/slider.php
// maximum pics to show
//clear FORBIDDEN_SET for logged in users with nothing forbidden (not needed in 1.5)
// request of your database
$query "SELECT * FROM {$CONFIG['TABLE_PICTURES']} as p WHERE approved = 'YES' AND filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT $limit";
// result of request
$result cpg_db_query($query);
// For reading result
$rowset = array();
// Index of tab
// For each pic.....building javascript in php
echo "<rss version=\"2.0\" xmlns:media=\"\">
$CONFIG[gallery_name]$CONFIG[gallery_description] - $album_name</title>
$CONFIG[gallery_description] - $album_name</description>
$row mysql_fetch_array($result)){
//reading filename of pic and other info
$image_url $CONFIG['ecards_more_pic_target'];
$prefix "normal_";
               if (
file_exists($file)) {
$prefix "normal_";
               } else {
$prefix "";
// path of pic
// final check that the file exists, if so, show picture
if (file_exists($file)) {
// building javascript code
echo "<item><media:content url=\"".$image_url.$lien."\" type=\"image/jpeg\"> </media:content></item>\n";

To do:
  • Replace hardcoded "albums/" by "$image_url". When I try this, the URL is gone.
  • Have an extra check in 'last updated' for the 10 last images which are shown more often in this feed.
Pages: [1]   Go Up

Page created in 0.018 seconds with 20 queries.