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

Author Topic: RSS feed of pics for Google Screensaver  (Read 34740 times)

0 Members and 1 Guest are viewing this topic.

TeamTJ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
RSS feed of pics for Google Screensaver
« on: May 30, 2007, 06:10:45 pm »

I'd like to see the pics in one my categories (has 10 albums in it) via the Google Screensaver.

I know nothing about RSS and am hoping someone can provide some pointers.

Thanks!

Morgan
« Last Edit: June 01, 2007, 10:03:43 am by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: RSS feed of pics for Google Screensaver
« Reply #1 on: May 31, 2007, 07:36:48 am »

Afaik the Google screensaver displays random images that reside on your client. It does not display images from a webserver. It is not related to RSS feeds. If you want to find out how the Google screensaver works, why don't you ask google? We didn't create it.
I don't have the screensaver, as it is part of a package that I certainly will not install, as I prefer my PC not to be packed with bloatware. Additionally, it is only for WindowsXP/Vista (which I don't have). Subsequently: if the google screensaver works in another way (one that I'm not aware of), then read the documentation that comes with it or google for help on it.
We can not provide support for apps that we haven't built.
Logged

TeamTJ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: RSS feed of pics for Google Screensaver
« Reply #2 on: May 31, 2007, 02:46:38 pm »

So the simple answer, free of the condescending tone and unnecessary anti-Google speak is "I don't know."

From Google's own pages, "Stay connected to friends and family with photo feeds."

All I asked was how to create a photo feed from Coppermine, a product that WAS built here.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: RSS feed of pics for Google Screensaver
« Reply #3 on: May 31, 2007, 04:37:51 pm »

unnecessary anti-Google speak
I'm not anti-Google. Google has some excellent web services and desktop apps. I use them often. I just don't need a package with all sorts of gimmicks that mess up my carefully-kept desktop. That's why the package is bloatware for me. You are welcome to use it anyway. My remark was not anti-google, but anti-I'm-too-lazy-to-read-the-documentation-or-provide-the-needed-details.

So the simple answer [...] is "I don't know."
That's what I was trying to say: I don't know the app you're talking about.

All I asked was how to create a photo feed from Coppermine
Out of the box, Coppermine doesn't create RSS feeds. However, there are mods/plugins that claim to add RSS feeds for Coppermine (I haven't looked into them). Searching this board for "RSS" would have told you everything you need to know. If you're too lazy to search and expect to be spoon-fed, then you'll have to live with the
condescending tone
. From the search results: "Easy RSS feed" and "What is CpmFetch and what it can do for you... READ THIS "

There is another screensaver than the google screensaver available as well (found by searching the board for "screensaver") named "Mod: Screensaver for Coppermine".

I know nothing about RSS
Then read it up: http://en.wikipedia.org/wiki/Rss

All I asked was how to create a photo feed from Coppermine, a product that WAS built here.
OK. I own a Mercedes-Benz. I want to install a coffee machine within my car (it doesn't come with one by default). Should I ask Mercedes-Benz how to install the coffee machine? After all, they built the car... ::)

Logged

TeamTJ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: RSS feed of pics for Google Screensaver
« Reply #4 on: May 31, 2007, 05:18:43 pm »

So, because YOU don't know the answer, you decide that nobody else may know the answer and mark the question invalid?

Then you knock my "karma" down not once, but twice? Ouch...it hurts so much.

I thought this was a place to ask questions and if someone knew the answer, they might provide it.  Most admins on boards like this frown on the "I don't know" posts that are useless and only increase a post count.  It appears that you don't feel the same way and your "I don't know" is the final answer.

If everyone posted "I don't knows" to every thread they couldn't answer, I'd hate to pay that bandwidth bill.

Also, the other screen saver you point to gives a 404.  Not exactly helpful and not relevant.

A coffeemaker does not fit well with a car.  A feed of photos from a photo gallery site fits well.  Your analogy is weak.

I searched for RSS feeds here and everything I found did not answer my question.  That is why I posted it.  Don't assume I am too lazy to search when my searches did not turn up answers to my questions.

So, back to my original, entirely valid question.  If anyone knows how to create an RSS feed that works with the Google Screensaver, please let me know.  If you do not know, well, please keep that to yourself.  I will know that you don't know by your lack of response.

Thank you.
Logged

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: RSS feed of pics for Google Screensaver
« Reply #5 on: May 31, 2007, 06:53:14 pm »

It turns out that Google Screensaver can generate images with http://groups.google.com/group/google-pack/web/check-out-this-feed

I tried one of the feeds and it worked.

I tried a couple of methods to generate rss feeds with Coppermine and both methods didn't satisfy the Screensaver because I got an error that no image was found in the feed.

I had tried with Easy RSS plugin and cpmFetch. Now you'll need to search further for a better rss generator or fix the current ones so they produce feeds to the Screensaver's satisfaction.

At one point long ago I was able to do a photo feed with mini-cms plugin but I can't remember the correct url. Update: I found the feed eventually but GS couldn't find an image although I can see the images in the the feed.

It seems very particular about the xml code that it gets.
« Last Edit: May 31, 2007, 07:01:55 pm by TranzNDance »
Logged

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: RSS feed of pics for Google Screensaver
« Reply #6 on: June 01, 2007, 09:30:39 am »

I figured out how to use Easy RSS plugin to generate a Screensaver-friendly feed.

First, install the plugin. The plugin will create a file called rss.php in the gallery's root. Replace the contents of that file with this:
Code: [Select]
<?php 
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - RSS Feed                                      //
// ------------------------------------------------------------------------- //
// Copyright (C) Dr. Tarique Sani                                           //
// http://tariquesani.net/                                                  //
// modifications by versus7 - www.oixalia.gr - oixalia@oixalia.gr //
// further modifications by Brent Gerig
// This program is free software; you can redistribute it and/or modify     //
// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License, or        //
// (at your option) any later version.                                      //
// ------------------------------------------------------------------------- //
// Just put into the same directory as your coppermine installation         //
// ------------------------------------------------------------------------ //

define('IN_COPPERMINE'true);
define('INDEX_PHP'true);

global 
$CONFIG,$ALBUM_SET,$META_ALBUM_SET,$CURRENT_CAT_NAME,$FORBIDDEN_SET_DATA,$lang_plugin_easyrss;
require(
'include/init.inc.php');
require(
'plugins/Easy_RSS/include/init.inc.php');

//How many items you want to show in RSS feed
$thumb_per_page $CONFIG[plugin_easyrss_num];

$thumb_count 0;
$lower_limit 0;

if(
count($FORBIDDEN_SET_DATA) > ){
    
$forbidden_set_string =" AND aid NOT IN (".implode(","$FORBIDDEN_SET_DATA).")";
} else {
    
$forbidden_set_string '';
}

if(isset(
$_GET['album'])){
    
$album $_GET['album'];
}

//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
     
$album_name_keyword get_album_name($album);
     
$CURRENT_CAT_NAME $album_name_keyword['title'];
     
$META_ALBUM_SET "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;

     
//Set the album to last uploaded
     
$album 'lastup';
}

//If the album is not set set it to lastup - this is the default
if(!isset($album)){
     
$album 'lastup';
}

/*
if ((isset($_GET['cat']) && $_GET['cat'] > 1)){ 
     $cat = $_GET['cat'];
     $album_name_keyword = get_album_name($cat);
     $CURRENT_CAT_NAME = $album_name_keyword['title'];
     
     $META_ALBUM_SET = "AND aid IN (".$cat.")".$ALBUM_SET;
}
*/

//Changes these to point to your site if the following is not giving correct results.
$link_url $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
$image_url $CONFIG['ecards_more_pic_target']."albums/";

$META_ALBUM_SET .= $forbidden_set_string;

$data get_pic_data($album$thumb_count$album_name$lower_limit$thumb_per_page);

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

<rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/"
        >
<channel>
    <title>$CONFIG[gallery_name] $album_name</title>
    <link>$CONFIG[ecards_more_pic_target]</link>
    <description>$CONFIG[gallery_description]</description>
    <generator>$CONFIG[ecards_more_pic_target]rss.php</generator>
EOT;
echo $rssHeader;

foreach($data AS $picture) {

    $titlefield = $CONFIG[plugin_easyrss_titlefield];
    $caption_text = "<br>".$picture[hits]." ".$lang_plugin_easyrss['views'];
    $caption_text .= "<br>".date('M d, Y',$picture[ctime]);
   
    $thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
    $pic_url = "$image_url$picture[filepath]$picture[filename]";
    $keywords = explode(" ",trim($picture[keywords]));
    $category_string = "";
    foreach($keywords as $keyword){
         $category_string .= "<category>$keyword</category>";
    }
    $pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
   
    $description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="1" vspace="2" hspace="2"> <align="center" ></a><br>';
    if($titlefield == "title")
    $description .= bb_decode($picture[caption]);
$description .= bb_decode($caption_text);   
$description =  htmlspecialchars($description);
     
    $item = '<item>
              <title>'.($picture[$titlefield]?$picture[$titlefield]:$lang_plugin_easyrss['no'].$lang_plugin_easyrss['label_'.$titlefield]).'</title>
              <link>' . $link_url . $picture[pid] . '</link>
          '.$category_string.'
              <description>'.$description.'</description>           
              <pubDate>' .$pubDate.' GMT</pubDate> '.
  '<media:content url="'. $pic_url .'"
       type="image/jpeg"
       />
<media:title>'.($picture[$titlefield]?$picture[$titlefield]:$lang_plugin_easyrss['no'].$lang_plugin_easyrss['label_'.$titlefield]).'</media:title>
<media:text type="html">'.$description.'</media:text>
<media:thumbnail url="'. $thumb_url .'" />
             </item>';

    echo $item;
}

$rssFooter = <<<EOT
</channel>
</rss>
EOT;
echo $rssFooter;

?>

update: edited code so that the feed title includes the album name to make it easier to distinguish once the feed is added to the list.

The default album is "last uploaded", but you can change the album by appending ?album=nameOrNumber to rss.php. Check out sample feeds from my blog post: http://takethu.com/blog/?p=294. Something I learned is that a "keyword" album that has no files in it won't list any results in the feed.

Now I got a pretty sweet screensaver. Thanks for raising awareness of this new feature of Google Screensaver.

You might want to keep an eye on your bandwidth usage when using this.
« Last Edit: June 01, 2007, 05:59:35 pm by TranzNDance »
Logged

TeamTJ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: RSS feed of pics for Google Screensaver
« Reply #7 on: June 01, 2007, 03:41:20 pm »

That is AWESOME, thank you so very much!
Logged

fotofreek

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 23
    • http://www.victorbos.nl/
Re: RSS feed of pics for Google Screensaver
« Reply #8 on: June 14, 2007, 09:19:07 pm »

I created a photofeed too and it runs nicely in this Google screensaver.
It selects 12 random photos from my cpg. But unfortunately the screensaver appears not to refresh the feed every time it runs. So the same 12 photos are shown each time.
I think that Google has some work to do to make this screensaver really useful  :'(

fotofreek
Logged

TranzNDance

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Female
  • Posts: 6148
    • Take Thu! Gallery
Re: RSS feed of pics for Google Screensaver
« Reply #9 on: June 14, 2007, 10:45:47 pm »

I noticed, that, too. On the other hand, maybe it's done to conserve bandwidth? Could you imagine how much bandwidth this would take up when people leave the screensaver running for hours during the day?

On the other hand, it would be nice if the site admin could have the option of whether to use caching or not. I have gigs of bandwidth that I'm not using every month.
Logged

funraps

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: RSS feed of pics for Google Screensaver
« Reply #10 on: July 22, 2007, 09:09:02 pm »

Hello all!

I installed easy_rss a while back and it worked great, I must have added something but it no longer works.
I uninstalled, resinstalled, downloaded a fresh copy, made the changes in this post, moved the plugin to the first position and I still get
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Only one top level element is allowed in an XML document. Error processing resource 'http://foundationtoroof.com/slideshow/...

<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAP...
 


the file is located at http://www.foundationtoroof.com/slideshow/rss.php
Any help would be greatly appreciated !
Logged

Nibbler

  • Guest
Re: RSS feed of pics for Google Screensaver
« Reply #11 on: July 22, 2007, 09:14:38 pm »

You have a bunch of javascript added at the top of the page. Might be thrown in by a mod/plugin.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 22 queries.