forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: colinsp on February 17, 2008, 09:58:35 am

Title: Easy RSS feed & PicLens
Post by: colinsp on February 17, 2008, 09:58:35 am
Note from TranzNDance: These posts were split from: Easy RSS feed (http://forum.coppermine-gallery.net/index.php?topic=43848.0)

Thanks for this plugin I installed it and it works first time out of the box.

Has anyone modded this to make it work with PicLens? Or have any ideas what I would need to do to make it work with PicLens. Unfortunately they don't have a support forum BUT it is a great way of viewing images IMHO.
Title: Easy RSS feed
Post by: VladiczeK on February 18, 2008, 06:12:13 am
Actually if you check this link http://takethu.com/thumbnails.php?album=79 (http://takethu.com/thumbnails.php?album=79) of the gallery provided here with easyRSS installed, this mod works with PicLens. But only in particular albums and, what is sad, not in my gallery :-). So it seems that only minor modifications are necessary to make it compatible. Unfortunately, there is no coder interested in PicLens and when it is a client-side software, no support is given. We have to wait when some skilled coder will start to use this great Firefox and IE plugin!

Without response: http://forum.coppermine-gallery.net/index.php?topic=48819.0 (http://forum.coppermine-gallery.net/index.php?topic=48819.0)
Negative response: http://forum.coppermine-gallery.net/index.php?topic=49936.0 (http://forum.coppermine-gallery.net/index.php?topic=49936.0)

Regards
Title: Easy RSS feed
Post by: colinsp on February 18, 2008, 07:42:25 am
Thanks for the reply about PicLens.

With EasyRSS it won't work in my gallery.

The coder of that link you posted has obviously got it working so it sounds like I will have to do some exploration and tweaking to see if I can make it work on my gallery.
Title: Easy RSS feed
Post by: Joachim Müller on February 18, 2008, 08:45:13 am
The easyRSS feed was designed the way it is. Please keep the PicLens discussion out of this thread.
Title: Easy RSS feed
Post by: Tranz on February 20, 2008, 07:06:14 pm
Actually if you check this link http://takethu.com/thumbnails.php?album=79 (http://takethu.com/thumbnails.php?album=79) of the gallery provided here with easyRSS installed, this mod works with PicLens. But only in particular albums and, what is sad, not in my gallery :-). So it seems that only minor modifications are necessary to make it compatible. Unfortunately, there is no coder interested in PicLens and when it is a client-side software, no support is given. We have to wait when some skilled coder will start to use this great Firefox and IE plugin!

Without response: http://forum.coppermine-gallery.net/index.php?topic=48819.0 (http://forum.coppermine-gallery.net/index.php?topic=48819.0)
Negative response: http://forum.coppermine-gallery.net/index.php?topic=49936.0 (http://forum.coppermine-gallery.net/index.php?topic=49936.0)

Regards
I just installed the addon. Can you provide an example where it doesn't work?
Title: Re: Easy RSS feed & PicLens
Post by: Joachim Müller on February 21, 2008, 12:04:34 am
This is not a contribution, but a plain support thread. Moving accordingly.
Title: Re: Easy RSS feed & PicLens
Post by: denisjl on March 14, 2008, 01:26:44 pm
Hi.

Here is my rss.php that works with Piclens:

Code: [Select]
  1 <?php
  2 
// ------------------------------------------------------------------------- //
  
// 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     //
 
10 // it under the terms of the GNU General Public License as published by     //
 
11 // the Free Software Foundation; either version 2 of the License, or        //
 
12 // (at your option) any later version.                                      //
 
13 // ------------------------------------------------------------------------- //
 
14 // Just put into the same directory as your coppermine installation         //
 
15 // ------------------------------------------------------------------------ //
 
16
 17 define
('IN_COPPERMINE'true);
 
18 define('INDEX_PHP'true);
 
19
 20 
global $CONFIG,$ALBUM_SET,$META_ALBUM_SET,$CURRENT_CAT_NAME,$FORBIDDEN_SET_DATA,$lang_plugin_easyrss;
 
21 require('include/init.inc.php');
 
22 require('plugins/Easy_RSS/include/init.inc.php');
 
23
 24 
//How many items you want to show in RSS feed
 
25 $thumb_per_page $CONFIG[plugin_easyrss_num];
 
26
 27 $thumb_count 
0;
 
28 $lower_limit 0;
 
29
 30 
if(count($FORBIDDEN_SET_DATA) > ){
 
31     $forbidden_set_string =" AND aid NOT IN (".implode(","$FORBIDDEN_SET_DATA).")";
 
32 } else {
 
33     $forbidden_set_string '';
 
34 }
 
35
 36 
if(isset($_GET['album'])){
 
37     $album $_GET['album'];
 
38 }
 
39
 40 
//If it is a numeric album get the name and set variables
 
41 if ((is_numeric($album))){
 
42      $album_name_keyword get_album_name($album);
 
43      $CURRENT_CAT_NAME $album_name_keyword['title'];
 
44      $META_ALBUM_SET "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;
 
45
 46     $thumb_per_page 
300# Afficher toutes les photos de l'album
 
47
 48      
//Set the album to last uploaded
 
49      $album 'lastup';
 
50 }
 
51
 52 
//If the album is not set set it to lastup - this is the default
 
53 if(!isset($album)){
 
54      $album 'lastup';
 
55 }
 
56
 57 
/*
 58 if ((isset($_GET['cat']) && $_GET['cat'] > 1)){
 59      $cat = $_GET['cat'];
 60      $album_name_keyword = get_album_name($cat);
 61      $CURRENT_CAT_NAME = $album_name_keyword['title'];
 62
 63      $META_ALBUM_SET = "AND aid IN (".$cat.")".$ALBUM_SET;
 64 }
 65 */
 
66
 67 
//Changes these to point to your site if the following is not giving correct results.
 
68 $link_url $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
 
69 $image_url $CONFIG['ecards_more_pic_target']."albums/";
 
70
 71 $META_ALBUM_SET 
.= $forbidden_set_string;
 
72
 73 $data 
get_pic_data($album$thumb_count$album_name$lower_limit$thumb_per_page);
 
74
 75 header 
("content-type: text/xml");
 
76 //maybe you must change the encoding to iso-8859-1.
 
77 $rssHeader = <<<EOT
 78 <?xml version="1.0" encoding="iso-8859-7"?>

 79 <rss version="2.0"
 80     xmlns:media="http://search.yahoo.com/mrss/"
 81     xmlns:content="http://purl.org/rss/1.0/modules/content/"
 82     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
 83 >
 84 <channel>
 85     <title>$CONFIG[gallery_name]</title>
 86     <link>$CONFIG[ecards_more_pic_target]</link>
 87     <description>$CONFIG[gallery_description] - $album_name</description>
 88     <generator>$CONFIG[ecards_more_pic_target]rss.php</generator>
 89 EOT;
 90 echo $rssHeader;
 91
 92 foreach($data AS $picture) {
 93
 94     $titlefield = $CONFIG[plugin_easyrss_titlefield];
 95     $caption_text = "<br>".$picture[hits]." ".$lang_plugin_easyrss['views'];
 96     $caption_text .= "<br>".date('M d, Y',$picture[ctime]);
 97
 98     $normal_url = "$image_url$picture[filepath]$CONFIG[normal_pfx]$picture[filename]";
 99     $thumb_url  = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
100     $title      = ($picture[$titlefield]?$picture[$titlefield]:$lang_plugin_easyrss['no'].$lang_plugin_easyrss['label_'.$titlefield]    );
101     $keywords = explode(" ",trim($picture[keywords]));
102     $category_string = "";
103     $media_keywords = "";
104     $media_keywords_separator = "";
105     foreach($keywords as $keyword){
106          $category_string .= "<category>$keyword</category>";
107          $media_keywords .= $media_keywords_separator.$keyword;
108          $media_keywords_separator = ', ';
109     }
110     $pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
111
112     $description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="1" vspace="2" hspace="2"> <a    lign="center" ></a><br>';
113     if($titlefield == "title")
114         $description .= bb_decode($picture[caption]);
115     $description .= bb_decode($caption_text);
116     $description =  htmlspecialchars($description);
117
118     $item  = '<item>'."\n";
119     $item .= "\t".'<title>'.$title.'</title>'."\n";
120     $item .= "\t".'<link>' . $link_url . $picture[pid] . '</link>'."\n";
121     $item .= "\t".'<pubDate>' .$pubDate.' GMT</pubDate>'."\n";
122     $item .= $category_string."\n";
123     $item .= "\t".'<description>'.$description.'</description>'."\n";
124     $item .= "\t".'<media:title>'.$title.'</media:title>'."\n";
125     $item .= "\t".'<media:description type="html">'.$description.'</media:description>'."\n";
126     $item .= "\t".'<media:keywords>'.$media_keywords.'</media:keywords>'."\n";
127     $item .= "\t".'<media:content url="'.$normal_url.'" />'."\n";
128     $item .= "\t".'<media:thumbnail url="'.$thumb_url.'" />'."\n";
129     $item .= '</item>';
130
131     echo $item;
132 }
133
134 $rssFooter = <<<EOT
135 </channel>
136 </rss>
137 EOT;
138 echo $rssFooter;
139 ?>

I changed the script to display 300pictures instead of 10 when you watch an album (makes piclens to crawl), but didn't find a way to display them all?
If you don't like this behaviour, remove line 46.
Title: Re: Easy RSS feed & PicLens
Post by: FuzzyD on March 15, 2008, 06:46:42 am
Excellent denisjl!

Could you by chance attach your modified rss.php as a file to your post?

I seem to be having issues copying and pasting your code.  Thanks for taking the time to do this.  I've been looking forward to using Piclens for coppermine as an optional way to view the galleries. Up until know I've only been able to use Piclens with the last editions rss feed (xfeed)
Title: Re: Easy RSS feed & PicLens
Post by: FuzzyD on March 15, 2008, 09:11:50 am
Hello and thanks again denisjl! I apoligize for the double post.  I can't see a way to edit my post to add these additional comments.

I figured out why the copy/paste wasn't working (had to remove the numbers in the front of each line)

I have an issue though.  I don't use intermediate images so I don't have images with the "normal_" prefix used in the rss.php to identify the image for Piclens to expand when zooming, which means that Piclens only shows the thumbs.

I assume this bit of code is what I need to change:

$normal_url = "$image_url$picture[filepath]$CONFIG[normal_pfx]$picture[filename]";
$thumb_url  = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";

I somehow need to replace "normal_url" and identify that line with my full sized images but the full sized images have no prefix so I'm not sure what to put there.

I tried to create some intermediate images but I want the images as large as possible for viewing in Piclens so when I chose 1200pixels for max height, no intermediate images were created for any image less than 1200 pixels in height so I'm missing half my images in Piclens view.

If there's not an easy way to identify the large images in the lines above, my alternative is to duplicate all of my images (about 9K of them) and add a second set to each album folder which would include the "normal_" prefix.

I figured I'd ask if there was a way to identify the full size images before I did that though : ) It's great to see all of my albums with the Piclens play icon on the thumbs even if I can't see full sized images yet!
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on March 15, 2008, 03:04:11 pm
Just remove $CONFIG[normal_pfx] from the code.
Title: Re: Easy RSS feed & PicLens
Post by: FuzzyD on March 15, 2008, 10:59:48 pm
Just remove $CONFIG[normal_pfx] from the code.

Thanks!

After that code adjustment, all is working perfect right now with PicLens as an option for viewing in every album.  I left the default at 300 images and don't notice a slowdown but I'm sure a few factors play into that so I'll have some people test it out and report back on performance.
Title: Re: Easy RSS feed & PicLens
Post by: denisjl on March 17, 2008, 01:53:54 pm
Thanks for your comments. It looks like contributing isn't as easy as it seems...   ;)

Title: Re: Easy RSS feed & PicLens
Post by: denisjl on March 17, 2008, 02:07:24 pm
Here is the file.
Title: Re: Easy RSS feed & PicLens
Post by: j_taubman on April 02, 2008, 02:56:43 pm
Just wanted to say, this is working well for me,  unfortunately I am not much of a php coder,  so was wondering if any one knows how to get it to work on Categories as well as albums.

It looks like this code is the problem,  I know 10000 is the start of user cats,  but I have Cats below this and wanted to use PicLens at that level

Possible code which needs changing around 160 -170 in codebase.php

Code: [Select]
        global $CONFIG;
        $album=$_GET['album'];
        $cat=$_GET['cat'];

if(isset($cat) && $cat < 10000)
    return;

$name = "";
if(is_numeric($album)) {
    $name = get_album_name($album);
    $name = $CONFIG[gallery_name]. " - " . $name['title'];
} else if(isset($cat) && $cat > 0) {
if($cat<10000) {
    $name = easyrss_get_cat_name($cat);
    $name = $CONFIG[gallery_name]. " - " . $name['name'];
} else {
    $name = $CONFIG[gallery_name]. " - " . get_username($cat-10000);
}
Title: Re: Easy RSS feed & PicLens
Post by: nuttz on April 25, 2008, 07:44:50 pm
I was  unsuccessful at getting Easy RSS to work with piclens on my site so I wrote my own solution. I wanted to put it out here for those of you who are not having any luck with Easy RSS.

You can see it working here: www.emmonskids.com/gallery (http://www.emmonskids.com/gallery)

You will need to append your template.html with the piclens code. You can get that on the piclens site.

It's a PERL script that will generate the formatted XML that piclens reads. As of right now it is a manual process, but 100% functional. I am going to update it sometime soon to open and append the .rss file on the server so I can set it as a cron job to be run daily. As of now, you run the script, view the source and copy it to your photos.rss file.

The following assumes you are running the latest version of CPM Gallery:
Code: [Select]
#!/usr/bin/perl

use CGI::Carp qw( fatalsToBrowser );

print "Content-type: text/html\n\n";

use strict;
use DBI;

my $pos = 0;

my $dbh = DBI->connect ("DBI:mysql:DB-ALBUMNAME", "DB-USERNAME", "DB-PASSWORD", { RaiseError => 1, PrintError => 0});
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PREFIX_pictures ORDER BY pid DESC");
$sth->execute ();

print " <?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n";
print " <rss xmlns:media=\"http://search.yahoo.com/mrss\" version=\"2.0\">\n";
print " <channel>\n";

while (my ($filename, $filepath) = $sth->fetchrow_array ())
{
    print " <item>\n";
print " <title>$filename</title>\n";
    print " <link>displayimage.php?album=lastup&amp;cat=0&amp;pos="; print $pos++; print "</link>\n";
print " <media:thumbnail url=\"albums/$filepath"."thumb_$filename\" />\n";
print " <media:content url=\"albums/$filepath"."$filename\" />\n";
    print " </item>\n";
}

$dbh->disconnect ();

print " </channel>\n";
print " </rss>\n";

You will need to edit the following 4 items with your database information:
DB-ALBUMNAME
DB-USERNAME
DB-PASSWORD
DB-PREFIX


The script is attached as well. When you put it on your server be sure to chmod it to execute or you'll get an error.

Feedback/suggestions/modifications welcome!
Title: Re: Easy RSS feed & PicLens
Post by: nuttz on April 25, 2008, 09:48:48 pm
UPDATE!

The script has been modified to open and overwrite photos.rss. Be sure that photos.rss and piclens.pl are in the same directory. Also make sure photos.rss is writable and piclens.pl is executable.

This script can now be set as a cron job to run at your desired schedule as well as manually, like as soon as you update your gallery.

Code: [Select]
#!/usr/bin/perl

use CGI::Carp qw( fatalsToBrowser );

print "Content-type: text/html\n\n";

use strict;
use DBI;

my $pos = 0;
my $filestring = "";
my $dbh = DBI->connect ("DBI:mysql:DB-ALBUM", "DB-USERNAME", "DB-PASSWORD", { RaiseError => 1, PrintError => 0});
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PFX_pictures ORDER BY pid DESC");
$sth->execute ();

$filestring .= " <?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n";
$filestring .= " <rss xmlns:media=\"http://search.yahoo.com/mrss\" version=\"2.0\">\n";
$filestring .= " <channel>\n";

while (my ($filename, $filepath) = $sth->fetchrow_array ())
{
    $filestring .= " <item>\n";
$filestring .= " <title>$filename</title>\n";
    $filestring .= " <link>displayimage.php?album=lastup&amp;cat=0&amp;pos=";
$filestring .= $pos++;
$filestring .=  "</link>\n";
$filestring .= " <media:thumbnail url=\"albums/$filepath"."thumb_$filename\" />\n";
$filestring .= " <media:content url=\"albums/$filepath"."$filename\" />\n";
    $filestring .= " </item>\n";
}

$dbh->disconnect ();

$filestring .= " </channel>\n";
$filestring .= " </rss>\n";

open my $rssfile,  "> photos.rss";
print {$rssfile} $filestring;

Again, be sure to edit the 4 field previously noted.

Enjoy. 
Title: Re: Easy RSS feed & PicLens
Post by: appsfinder on May 18, 2008, 04:59:33 pm
UPDATE!

The script has been modified to open and overwrite photos.rss. Be sure that photos.rss and piclens.pl are in the same directory. Also make sure photos.rss is writable and piclens.pl is executable.

This script can now be set as a cron job to run at your desired schedule as well as manually, like as soon as you update your gallery.

Code: [Select]
#!/usr/bin/perl

use CGI::Carp qw( fatalsToBrowser );

print "Content-type: text/html\n\n";

use strict;
use DBI;

my $pos = 0;
my $filestring = "";
my $dbh = DBI->connect ("DBI:mysql:DB-ALBUM", "DB-USERNAME", "DB-PASSWORD", { RaiseError => 1, PrintError => 0});
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PFX_pictures ORDER BY pid DESC");
$sth->execute ();

$filestring .= " <?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n";
$filestring .= " <rss xmlns:media=\"http://search.yahoo.com/mrss\" version=\"2.0\">\n";
$filestring .= " <channel>\n";

while (my ($filename, $filepath) = $sth->fetchrow_array ())
{
    $filestring .= " <item>\n";
$filestring .= " <title>$filename</title>\n";
    $filestring .= " <link>displayimage.php?album=lastup&amp;cat=0&amp;pos=";
$filestring .= $pos++;
$filestring .=  "</link>\n";
$filestring .= " <media:thumbnail url=\"albums/$filepath"."thumb_$filename\" />\n";
$filestring .= " <media:content url=\"albums/$filepath"."$filename\" />\n";
    $filestring .= " </item>\n";
}

$dbh->disconnect ();

$filestring .= " </channel>\n";
$filestring .= " </rss>\n";

open my $rssfile,  "> photos.rss";
print {$rssfile} $filestring;

Again, be sure to edit the 4 field previously noted.

Enjoy. 

hi i get this error... Can't connect to data source 'Wide Angle' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at piclens.pl line 1

what am i doing wrong? ps: can you highlight the code i need to change cheers the-eshop.co.uk
Title: Re: Easy RSS feed & PicLens
Post by: appsfinder on May 18, 2008, 05:24:58 pm
Ok try ed a few thing and now i get this please can anyone help ..........DBI connect('wide angle','admin',...) failed: Access denied for user 'admin'@'localhost' (using password: YES) at piclens.pl line 12
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on May 18, 2008, 05:31:19 pm
I guess album name should actually be database name.
Title: Re: Easy RSS feed & PicLens
Post by: appsfinder on May 18, 2008, 05:40:49 pm
I guess album name should actually be database name.

Thanks for that info. changed that now this is no errors: but just a blank page? is this how it works?
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on May 18, 2008, 06:36:45 pm
Read the description. It writes the info out to the file photos.rss.
Title: Re: Easy RSS feed & PicLens
Post by: appsfinder on May 18, 2008, 06:41:58 pm
ok got it working... cool


http://the-eshop.co.uk/gallery/index.php (http://the-eshop.co.uk/gallery/index.php)
Title: Re: Easy RSS feed & PicLens
Post by: nuttz on May 19, 2008, 03:46:26 am
Glad you got it working!!! I didn't think anyone was interested in this so I didn't update the post with the latest script. A few minor tweaks:


I am looking into making this work on a per album basis instead of loading in all the images everytime. If anyone figures this out before I do please post.

Updated code: (also attached)
Code: [Select]
#!/usr/bin/perl

use CGI::Carp qw( fatalsToBrowser );

print "Content-type: text/html\n\n";

use strict;
use DBI;

my $pos = 0;
my $filestring = "";

my $dbh = DBI->connect ("DBI:mysql:DB-ALBUM", "DB-USERNAME", "DB-PASSWORD", { RaiseError => 1, PrintError => 0});
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PFX_pictures ORDER BY pid DESC");
$sth->execute ();

$filestring .= "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n";
$filestring .= "<rss xmlns:media=\"http://search.yahoo.com/mrss\" version=\"2.0\">\n";
$filestring .= "\t<channel>\n";

while (my ($filename, $filepath) = $sth->fetchrow_array ())
{
    $filestring .= "\t\t<item>\n";
$filestring .= "\t\t\t<title>$filename</title>\n";
    $filestring .= "\t\t\t<link>displayimage.php?album=lastup&amp;cat=0&amp;pos=";
$filestring .= $pos++;
$filestring .= "</link>\n";
$filestring .= "\t\t\t<media:thumbnail url=\"albums/$filepath"."thumb_$filename\" />\n";
$filestring .= "\t\t\t<media:thumbnail url=\"albums/$filepath"."normal_$filename\" />\n";
$filestring .= "\t\t\t<media:content url=\"albums/$filepath"."$filename\" />\n";
    $filestring .= "\t\t</item>\n";
}

print "<br />";

$dbh->disconnect ();

$filestring .= "\t</channel>\n";
$filestring .= "</rss>\n";

open my $rssfile,  "> photos.rss";
print {$rssfile} $filestring;

print "<a href=\"photos.rss\">View the XML/RSS</a><br /><br />";
print $filestring;

exit;

Again, make sure to edit the 4 previously noted fields.

Enjoy!
Title: Re: Easy RSS feed & PicLens
Post by: appsfinder on May 19, 2008, 05:39:48 pm
Thanks for update will give it a try.

all the Best the-eshop.co.uk
Title: Re: Easy RSS feed & PicLens
Post by: dork313 on May 23, 2008, 12:58:10 am
Wow, I'm so completely confused on this. I really want piclens to work on my site and I'm trying to follow everything correctly but I'm still lost. I don't know how you find out the db-album or how to add more albums, I don't know where to put the .pl file and I don't know how to create the photo.rss file and where it's supposed to go. I've been reading the directions here and on the piclens site and I just can't seem to grasp it. I'm not a total idiot when it comes to web design but I am new to coppermine and piclens and it appears this all going beyond my understanding. Please, please, please break this down some more for me.

Thanks.
Title: Re: Easy RSS feed & PicLens
Post by: colinsp on May 28, 2008, 08:27:36 pm
Dork

Have a look at this thread there is another way to do it. http://forum.coppermine-gallery.net/index.php/topic,48819.0.html (http://forum.coppermine-gallery.net/index.php/topic,48819.0.html)
Title: Re: Easy RSS feed & PicLens
Post by: dork313 on May 29, 2008, 12:26:41 am
Dork

Have a look at this thread there is another way to do it. http://forum.coppermine-gallery.net/index.php/topic,48819.0.html (http://forum.coppermine-gallery.net/index.php/topic,48819.0.html)

Thanks for the tip, I'll be sure to check it out.
Title: Re: Easy RSS feed & PicLens
Post by: radmofo on June 04, 2008, 05:27:57 pm
I'd like to get piclens to work on my site as well but I can't sem to make sense of this. What is it I need to get from piclens website? Does it have to point to the .pl file above on my server? Usually it all makes sense and comes together but I would pretty much like to start over on this rss piclens thing. Does someone care to lend an assist?
Title: Re: Easy RSS feed & PicLens
Post by: shiftsrl on June 18, 2008, 06:15:07 pm
Everything should be fine but does not work and I don't know why. I've created the photos.rss file using the perl script, inserted the instructions inside the coppermine template.html file but piclens tell me that the page is not working on my site. I'm behind a proxy so maybe is just a cache problem but I've rebuild the cache and nothing happens.

Someone can tell me how can I check that everything is done right?
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on June 18, 2008, 06:48:29 pm
Post a link to the photos.rss file.
Title: Re: Easy RSS feed & PicLens
Post by: shiftsrl on June 18, 2008, 11:32:21 pm
ok, my gallery is at http://www.kog.it/album and the rss file is here http://www.kog.it/album/photos.rss

Any suggestion will be appreciated...
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on June 18, 2008, 11:59:16 pm
Suggestions would be either

1) The file is too large (2.3MB)
2) some files have invalid encoding (eg. 'Festa-5�-Kog-030.jpg' in http://www.kog.it/album/displayimage.php?pos=-4915)
Title: Re: Easy RSS feed & PicLens
Post by: shiftsrl on June 19, 2008, 09:30:15 am
For the invalid encoding I don't know what to do but I can investigate.

For the file too large problem the solution should be to split it in several parts but question is how big a file should be to be read and how to split it?
Title: Re: Easy RSS feed & PicLens
Post by: shiftsrl on June 20, 2008, 05:08:31 pm
no suggestions!?
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on June 20, 2008, 05:46:01 pm
Try adding a limit

Code: [Select]
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PFX_pictures ORDER BY pid DESC LIMIT 100");
Title: Re: Easy RSS feed & PicLens
Post by: ronronmx on June 21, 2008, 10:49:05 am
Glad you got it working!!! I didn't think anyone was interested in this so I didn't update the post with the latest script. A few minor tweaks:

  • Took the space out of the XML declaration which sometimes caused an error
  • Formats the XML output
  • Adds the piclens rollover play button to the _normal images as well as the _thumb
  • Added a link to the output to easily view the photos.rss file

I am looking into making this work on a per album basis instead of loading in all the images everytime. If anyone figures this out before I do please post.

Updated code: (also attached)
Code: [Select]
#!/usr/bin/perl

use CGI::Carp qw( fatalsToBrowser );

print "Content-type: text/html\n\n";

use strict;
use DBI;

my $pos = 0;
my $filestring = "";

my $dbh = DBI->connect ("DBI:mysql:DB-ALBUM", "DB-USERNAME", "DB-PASSWORD", { RaiseError => 1, PrintError => 0});
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PFX_pictures ORDER BY pid DESC");
$sth->execute ();

$filestring .= "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n";
$filestring .= "<rss xmlns:media=\"http://search.yahoo.com/mrss\" version=\"2.0\">\n";
$filestring .= "\t<channel>\n";

while (my ($filename, $filepath) = $sth->fetchrow_array ())
{
    $filestring .= "\t\t<item>\n";
$filestring .= "\t\t\t<title>$filename</title>\n";
    $filestring .= "\t\t\t<link>displayimage.php?album=lastup&amp;cat=0&amp;pos=";
$filestring .= $pos++;
$filestring .= "</link>\n";
$filestring .= "\t\t\t<media:thumbnail url=\"albums/$filepath"."thumb_$filename\" />\n";
$filestring .= "\t\t\t<media:thumbnail url=\"albums/$filepath"."normal_$filename\" />\n";
$filestring .= "\t\t\t<media:content url=\"albums/$filepath"."$filename\" />\n";
    $filestring .= "\t\t</item>\n";
}

print "<br />";

$dbh->disconnect ();

$filestring .= "\t</channel>\n";
$filestring .= "</rss>\n";

open my $rssfile,  "> photos.rss";
print {$rssfile} $filestring;

print "<a href=\"photos.rss\">View the XML/RSS</a><br /><br />";
print $filestring;

exit;

Again, make sure to edit the 4 previously noted fields.

Enjoy!

Hi Nuttz,
how can I setup the piclens.pl file to run every day or every time someone uploads a new photo, instead of having to manually run it?
Thx for your contribution btw!

Stephane
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on June 21, 2008, 12:55:44 pm
See if your webhost provides a cron interface.
Title: Re: Easy RSS feed & PicLens
Post by: ronronmx on June 21, 2008, 06:29:00 pm
See if your webhost provides a cron interface.

Oh ok, i think they do. So basically I have to set it up on my server, and I don't have to change any settings in the actual piclens.pl file right?
Sorry for the stupid questions, i am not familiar with this kind of stuff, and thx a lot for your help!

Stephane
Title: Re: Easy RSS feed & PicLens
Post by: shiftsrl on June 23, 2008, 04:31:33 pm
Try adding a limit

Code: [Select]
my $sth = $dbh->prepare ("SELECT filename, filepath, pid FROM DB-PFX_pictures ORDER BY pid DESC LIMIT 100");

You're the best Nibbler. I've tried 100, 200 until 500 and with 500 it works. I think that this is the problem for the people who has many many pictures inside Coppermine.

That way it works!!! Thank you very much!
Title: Re: Easy RSS feed & PicLens
Post by: nuttz on June 23, 2008, 04:37:06 pm
If I ever get the time to work on this again I plan to make it work on a per album basis, so your rss file being to large won't be a problem unless you have thousands of pics in a single album.

If I get time....

As for the cron... no edits are needed to the script. Just set up the time you want it to run. Overnight sometimes is a general rule of thumb.
Title: Re: Easy RSS feed & PicLens
Post by: nuttz on June 23, 2008, 04:40:14 pm
Nibbler, do you know if there are any plans to integrate piclens officially?
Title: Re: Easy RSS feed & PicLens
Post by: Nibbler on June 23, 2008, 04:53:26 pm
No plans. Would be better as a plugin than part of the core code.
Title: Re: Easy RSS feed & PicLens
Post by: shiftsrl on June 24, 2008, 04:35:04 pm
If I ever get the time to work on this again I plan to make it work on a per album basis, so your rss file being to large won't be a problem unless you have thousands of pics in a single album.

thanks nuttz for the work. I'll wait for the per album release. in the meantime this one works very well  :)
Title: Re: Easy RSS feed & PicLens
Post by: ryback on July 13, 2008, 01:01:40 am
Hi,

i've installed EasyRSS plugin, replaced rss.php using denisjl's modification.
I found that it's not working if URL is http://www.fotecka.net/rss.PHP?album=91, but if I take a source of URL, put it into file named photos.RSS, than it's OK.
Does anybody know whether Piclens works with .RSS files only?

Thanks
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on July 25, 2008, 05:32:15 am
Guy, the thing wrong here is that you capitalized the PHP in rss.PHP:
Quote
http://www.fotecka.net/rss.PHP?album=91

Just try this http://www.fotecka.net/rss.php?album=91
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on July 25, 2008, 06:34:42 pm
Here is the file.

I am using Easy RSS plugin and Denisjl's file. PicLens runs fine on my site http://giadinhhanhphuc.net/anhgiadinh/ ; however, there is a problem that though PicLens loaded 300 thumbnails, only 8 first ones (latest pictures) load full size when I zoom in, the others only loaded thumbnail size pictures, therefore, get broken/low resolution when I zoom in. Can any tell me how can I correct it so that all pictures will be loaded correctly? Thanks.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on August 13, 2008, 08:11:20 pm
OK Guys,

here is my little easy rss mod.
It's running fine on my Gallery so far. I'm sure it has some bugs left in it  :-\
So please give me a hint on what you noticed. If there are security issues please leave me a Note.

My Albums contain thousands of Pictures so loading all pictures at the same time was no option regarding Server CPU-Load and Download Traffic. The mod loads only that many pictures as there are thumbnails in your Album View on one Page (intval($CONFIG[plugin_easyrss_num])).

I added a few  ;) Comments to the Code to give a little Info about what the Code does. Since i am no PHP specialist i'd be glad to hear from you if you have suggestions on what to change.

To get the Plugin working just replace the original Easy_RSS file (rss.php) with my Code. And you need to add the following line to the Template html Headers:
Code: [Select]
<link id="gallery" rel="alternate" href="rss.php?album=&amp;page=&amp;imgpos=" type="application/rss+xml" title="Image Gallery" />I've done that by the codebase.php with a few more options. But it is not done alone by me, so sorry, i can't give that away, not now.

OK so here's the Code:
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         //
// ------------------------------------------------------------------------ //
// Mod by Andiwe to generate XML RSS Feed for PicLens Gallery
//  Feed will only load a defined amount of pics at once and give prev an next
//  URL to the Feed for large Album support.
//  Annotations marked with A/

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
//A/How many pictures do you want to be loaded at a time ?
//A/Should be the count of pictures in the album View to make the start at a 
//A/ specific Page working.
//A/4 Rows with 5 Colums of Pictures means 20
$thumb_per_page intval($CONFIG[plugin_easyrss_num]);

//A/ We need the count of Pictures in your Movieslide below the preview Image.
//A/ Thats for to make the play Button at the start and end of pages working.
$pics_in_movieslide 5;

//A/URL of your Gallery
//A/$gallery_home_url = 'http://www.yourgalleryhome.de/...../';
$gallery_home_url $CONFIG['ecards_more_pic_target'];

//A/Logo to be displayed on to of the PicLens View
//A/think this is buggy in 3D View but shows correctly in Flash Player (lite)
//A/if you don't wanna have logo or music just comment the hole line out.
//$site_logo = 'http://www.yoursite.de/site_logo.png';
//$site_music = 'plugins/Easy_RSS/site_music.mp3';

//A/set initial values
$thumb_count 0;
$lower_limit 0;
$album '';

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;
}
else {

  
//If the album is not set, set it to lastup - this is the default
  
if(!isset($album)){
       
$album 'lastup';
       }
  else {
    if (
$album == 'topn') {
      
//if topviewed is selected
      //$album = 'topn';
    
}
    else {
      if (
$album == 'random') {
      
//$album = 'random');
      
}
      else {
      
//maybe someone injected something else
      
$album 'lastup';
      }
    }
  }
}

//A/ok lets get the correct start point (picture) at wich the rss shall begin
//A/that's when it's called by the prev and next links from piclens
if(isset($_GET['start'])){
    
$start_at_var $_GET['start'];
}
//A/set the lower limit to that point
if ((is_numeric($start_at_var))){
   
$lower_limit intval($start_at_var);  
   
//A/ lets make sure $lower_limit is a multiple of $thumb_per_page
   
$lower_limit = ( (intval(($lower_limit)/($thumb_per_page))) * $thumb_per_page );
}


//A/get the album page from where the feed was loaded
if(isset($_GET['page'])){
    
$start_at_page $_GET['page'];
}
//A/lets define the start lower_limit by a multiple (page) of the thumb_per_page 
if ((is_numeric($start_at_page))){
   
$lower_limit = ((intval($start_at_page) - 1) * $thumb_per_page);  
}


//A/ get the image position when clicking on big preview
if(isset($_GET['imgpos'])){
    
$start_at_imgpos $_GET['imgpos'];
}
//A/set the lower limit to that point
if ((is_numeric($start_at_imgpos))){

//A/try to reduce that to the cases where those overlapping pictures are displayed
//$pics_in_movieslide = 5; // =5
      
$movieslideleft intval(($pics_in_movieslide -1) / 2); // =2
      
$moviesliderest $pics_in_movieslide $movieslideleft// =3
      
   
if ($start_at_imgpos < ($thumb_per_page)) {
      
$lower_limit 0;
      if ( ( (
$start_at_imgpos $thumb_per_page) > ($thumb_per_page $moviesliderest) ) ) {
      
//Awe got overlapping picture on the first page
      
$thumb_per_page_multi 2;
      
$thumb_per_page $thumb_per_page_multi $thumb_per_page;  
      }
   }
   else {
      
$lower_limit = ( (intval(($start_at_imgpos)/($thumb_per_page))) * $thumb_per_page );
      
//A/sorry we got to load more pictures to show all play buttons on the thumbnails
      //A/in preview. especially when in the movie-clip view there are pictures that are
      //A/not on the same page with the viewed image, the button won't be displayed
      //A/because the feed doesn't contain that datasets.
      
      
if ( (($start_at_imgpos $thumb_per_page) < $movieslideleft) ) {
      
//A/we got overlapping pictures at the start of a page
      
$lower_limit $lower_limit $thumb_per_page;
      
$thumb_per_page_multi 2;
      
$thumb_per_page $thumb_per_page_multi $thumb_per_page;      
      }
      if ((
$start_at_imgpos $thumb_per_page) > ($thumb_per_page $moviesliderest) ) {
      
//A/we got overlapping pictures at the end of a page
      
$thumb_per_page_multi 2;
      
$thumb_per_page $thumb_per_page_multi $thumb_per_page;      
      }
      
//A/no overlapping pictures and nothing to do ;-)
      
      //A/so now we have got to make sure that we can set the previous and next feed links
      //A/correctly we will do that when it comes to generate the links.
      //A/therefor we reset the $thumb_per_page to it's original value when it comes
      //A/to the url generation in next oder prev cases.
   
}  
}


//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=-";
$link_url_alb $CONFIG['ecards_more_pic_target']."displayimage.php?album=";

//A/Choose between Full Path and relative one depending on where this file resides.
//A/relative one is shorter and makes smaller rss feeds.
//$image_url = $CONFIG['ecards_more_pic_target']."albums/";
$image_url "albums/";

$META_ALBUM_SET .= $forbidden_set_string;
$data get_pic_data($album$thumb_count$album_name$lower_limit$thumb_per_page);

/*
//A/we wan't to have linkback to the correct album id and not the absolute picture pos
//A/if we are have not opened the feed out of an album but a cat like e.g. lastup instead
if $start_at_imgpos < 0 {

}
*/

header ("content-type: text/xml");
//A/we need less code than easy rss what makes the rss smaller
$rssHeader = <<<EOT
<?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>

EOT;

$rssHeader .= <<<EOT
<generator>Easy RSS Feed Mod 4 PicLens by Andiwe</generator>

EOT;
/*
$rssHeader .= <<<EOT
<title></title>
<link></link>
<description></description>

EOT;*/

echo $rssHeader;


//A/ ok lets create the "previous" and "next" links in the rss feed
//A/ the if construction needs to be sorted ... that sure was some alcoholic stuff ;-)

  $item = '';

if ($thumb_count > $thumb_per_page)  {
//A/ so we got to make sure that the album has more pictures than $thumb_per_page
//A/ if it has less we do not need any links
 
  if ($lower_limit < $thumb_per_page) {
  //A/ so we are at the start of the gallery and need only a next link
  $nextfeednum = $thumb_per_page;
  $item .= '<atom:link rel="next" href="rss.php?album='.$album.'&amp;start='.$nextfeednum.'" />';
  $item .= "\n";
  }

 if (($thumb_count - $lower_limit) > $thumb_per_page)  {
 //A/ so we are anywhere in the middle of the gallery

  if ($lower_limit > ($thumb_per_page - 1)) {
  //A/ just check again if we are not at the start ... why ??? don't know anymore ;-)
  $nextfeednum = $lower_limit + $thumb_per_page;
  if ($thumb_per_page_multi > 1) {
      $thumb_per_page = $thumb_per_page / $thumb_per_page_multi;
  }
  $previousfeednum = $lower_limit - $thumb_per_page;
  $item .= '<atom:link rel="previous" href="rss.php?album='.$album.'&amp;start='.$previousfeednum.'" />';
  $item .= '<atom:link rel="next" href="rss.php?album='.$album.'&amp;start='.$nextfeednum.'" />';
  }
 
  if ($lower_limit > ($thumb_count - $thumb_per_page)) {
  //A/ so what was this for ???
  if ($thumb_per_page_multi > 1) {
      $thumb_per_page = $thumb_per_page / $thumb_per_page_multi;
  }
  $previousfeednum = $lower_limit;
  $item .= '<atom:link rel="previous" href="rss.php?album='.$album.'&amp;start='.$previousfeednum.'" />';
  }
 
 }
 
 if (($thumb_count - $lower_limit) < ($thumb_per_page + 1))  {
 //A/ we are at the end of the gallery because there are less or equal than $thumb_per_page images left
 //A/ so just create a previous link
  if ($lower_limit > ($thumb_count - $thumb_per_page)) {
    if ($thumb_per_page_multi > 1) {
      $thumb_per_page = $thumb_per_page / $thumb_per_page_multi;
    }
    $previousfeednum = $lower_limit - $thumb_per_page;
    $item .= '<atom:link rel="previous" href="rss.php?album='.$album.'&amp;start='.$previousfeednum.'" />';
  }
 }

}

  echo $item;
 
//A/ prev and next feed links maybe ;-) have now been generated.

//A/ we've lost some Easy_RSS Code here ;-)

$rssHeader = '';

if ($site_logo > '') {
  $rssHeader .= <<<EOT
<atom:icon>$site_logo</atom:icon>

EOT;
}

if ($site_music > '') {
  $rssHeader .= <<<EOT
<atom:link rel="enclosure" type="audio/mpeg" length="1337" href="$site_music" />
 
EOT;
}


echo $rssHeader;
echo "\n";

//A/ i replaced the thumbnails with the normals and the normals with the full sized pics
//A/ thumbnails are looking bad in wall view
//A/ linking in the picture by the icon doesn't work anymore with that option :-(

//A/ as you can see i now have 2 thumbnail urls
//A/ only the first will be used to load the pictures
//A/ the second one is to publish the real thumbnail filenames to piclens
//A/ without that the play button won't appear in the thumbs in album view.
$tmp_count = $lower_limit;

foreach($data AS $picture) {
  $full_url = "$image_url$picture[filepath]$picture[filename]";
  $normal_url = "$image_url$picture[filepath]$CONFIG[normal_pfx]$picture[filename]";
  $thumb_url  = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
  $title      = $picture[filename];
  $picmd5     = getGuid(md5($picture[pid]));
  $item  = '<item>';
  $item .= "\n";
$item .= '<title>'.$title.'</title>';
$item .= "\n";

  //following line is for debugging only
//$item .= '<title>'.$title.'-'.$album.'-'.$album_name_keyword.'-'.$lower_limit.'-'.$thumb_count.'-'.$lower_limit.'-'.$start_at_imgpos.'-'.$start_at_page.'-Mod'.$start_at_imgpos % $thumb_per_page.'</title>';
 
  if ((is_numeric($album))) {
  $item .= '<link>' .$link_url_alb . $picture[aid] . '&amp;pos='. $tmp_count . '</link>';
  $item .= "\n";
$tmp_count = $tmp_count + 1;
  }
  else {
  $item .= '<link>' .$link_url . $picture[pid]. '</link>';
  $item .= "\n";
  }
 
  $item .= "<guid>".$picmd5."</guid>\n";
  $item .= '<media:thumbnail url="'.$normal_url.'" />';
  $item .= "\n";
  $item .= '<media:thumbnail url="'.$thumb_url.'" />';
  $item .= "\n";
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';
$item .= "\n";
$item .= "</item>\n";
  $item .= "\n";
    echo $item;
}

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

$album = 'lastup';
?>

Title: Re: Easy RSS feed & PicLens
Post by: andiwe on August 14, 2008, 09:48:59 am
...The mod loads only that many pictures as there are thumbnails in your Album View on one Page (intval($CONFIG[plugin_easyrss_num])).
So the rss feed is very small. If you enter the Piclens Application it will load all Images of e.g. the current Album as you start moving "the wall".

This makes it possible to start PicLens with "lastup" and scroll through ALL pictures in your CPG installation (ATM ~20.000 on one of mine).

So far it's working for Lastup, Topn (most viewed) and per Album.
If you're in Cat or e.g. Lastcom (comments) it will show you to the Lastup feed.

To get the Plugin working just replace the original Easy_RSS file (rss.php) with my Code. And you need to add the following line to the Template html Headers:
Code: [Select]
<link id="gallery" rel="alternate" href="rss.php?album=&amp;page=&amp;imgpos=" type="application/rss+xml" title="Image Gallery" />I've done that by the codebase.php with a few more options. But it is not done alone by me, so sorry, i can't give that away, not now.

Sorry that was #*!&$*#  ;)

Please modify the codebase.php this way: Remove the function easyrss_header and replace it with the following:
Code: [Select]
function easyrss_header() {
    global $CONFIG,$lang_plugin_easyrss;
    require ('plugins/Easy_RSS/include/init.inc.php');

//A/ so here is the Header for PicLens
    $add_header_info = "";
//    $add_header_info = "<!-- Step 1: Add a Photos RSS feed to this webpage. //-->";
    $add_header_info .= "\n<link id=\"gallery\" rel=\"alternate\" href=\"rss.php?album=".$_GET['album']."&amp;page=".$_GET['page']."&amp;imgpos=".$_GET['pos']."\" type=\"application/rss+xml\" title=\"Image Gallery\" />";
//    $add_header_info .= "\n<!-- Step 2: Include the PiclensLite JavaScript. //-->";
    $add_header_info .= "\n<script type=\"text/javascript\" src=\"http://lite.piclens.com/current/piclens_optimized.js\">";
    $add_header_info .= "</script>\n<style type=\"text/css\"> .mbf-item {display:none;} </style>".$otherHead;
    return $add_header_info;
}
Notice the page and imgpos ... that is for jumping directly to the correct Feed-Part and showing up the Picture you have clicked on.

And finally here is the rss.php as attached file.

Title: Re: Easy RSS feed & PicLens
Post by: snark on August 19, 2008, 08:50:55 am
Hi,

I installed Easy RSS, modified codebase.php with the new easyrss_header() and installed your rss.php file at the root of my gallery.

When I try to access the rss feed, I get a PHP error:
Code: [Select]
XML Parsing Error: no element found
Location: http://photos.reichertonline.be/rss.php?album=42&page=&imgpos=0
Line Number 6, Column 1:

Any idea what is wrong?

Thanks!
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 19, 2008, 09:24:26 am
Yes, I was found the same error though I used the previous version (I downloaded 1 month ago I think) and it was fine.
Quote
XML Parsing Error: no element found
Location: http://giadinhhanhphuc.net/anhgiadinh/rss.php
Line Number 10, Column 1:

I've just re-uploaded the previous version and it is working well now. So, what's wrong with this new version?
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 19, 2008, 01:31:46 pm
I've just re-uploaded the previous version and it is working well now. So, what's wrong with this new version?
Can you please post the previous version or make it available somewhere for download? Thanks!
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 19, 2008, 06:34:33 pm
Here it is in this zip file
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on August 20, 2008, 06:58:51 pm
Please replace Line 34 in rss.php
Code: [Select]
$thumb_per_page = intval($CONFIG[plugin_easyrss_num]);
with:

Code: [Select]
$thumb_per_page = ##Where ## should be the Number of Thumbnails in your album view.
e.G. if your Thumbail View is 4x5 Pictures the Number is 20

Did this work ?
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on August 20, 2008, 07:01:16 pm
Don't forget the ; at the end of the line  ;)
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 20, 2008, 07:17:40 pm
Yes, I tried changing that value already (with the ; at the end  ;) ) but no success.
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 20, 2008, 07:19:55 pm
BTW andiwe, I checked the RSS feed on your gallery. Is it normal you have 2 media:thumbnail elements per item??? I don't think so.
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 20, 2008, 10:03:05 pm
I found the error in rss.php. The error displayed in the browser is actually not in the PHP file, but in the generated XML feed.

To solve the error, change line 305 in rss.php from
Code: [Select]
$picmd5     = getGuid(md5($picture[pid]));to
Code: [Select]
$picmd5     = md5($picture[pid]);
I'm not sure if there are any side effects to this change. PicLens works fine in my gallery with this fix.

Let me know about yours.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on August 20, 2008, 10:22:54 pm
to be honest, i don't know really what effect the md5 sums have for piclens. i just saw them being generated by the original software. i could not recognize any difference until now. thanks for the fix, i will try this weekend.

the thing with the 2 thumb urls is following:

//A/ i replaced the thumbnails with the normals and the normals with the full sized pics
//A/ thumbnails are looking bad in wall view
//A/ linking in the picture by the icon doesn't work anymore with that option :-(

//A/ as you can see i now have 2 thumbnail urls
//A/ only the first will be used to load the pictures
//A/ the second one is to publish the real thumbnail filenames to piclens
//A/ without that the play button won't appear in the thumbs in album view.

just change it to your needs  ;D

BTW: what $thumb_per_page value did you use in your galery ? 25 should be fine, perhaps decrease your value to that to make the play buttons on further thumbnail pages visible.

Title: Re: Easy RSS feed & PicLens
Post by: snark on August 20, 2008, 10:35:11 pm
just change it to your needs  ;D
OK, thanks for pointing to the explanation. It works great like that and makes browsing my albums a real pleasure!

BTW: what $thumb_per_page value did you use in your galery ? 25 should be fine, perhaps decrease your value to that to make the play buttons on further thumbnail pages visible.
Yes, I just set it to 25, the number of images per page in my albums.
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 21, 2008, 06:38:34 am
So can anyone post the final version of the rss file? Is there any difference between this one and the one I attached in the earlier post? Thanks.
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 21, 2008, 07:33:19 am
Iced Coffee, here is the corrected version. Only 1 change at line 305 is different from the previous version posted by Timo. It's very different from the one you posted.

You might still have to change some variables in the script according to the values used in your gallery or to your desires (for instance on lines 33, 37, 47).
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 21, 2008, 08:33:31 am
Iced Coffee, here is the corrected version. Only 1 change at line 305 is different from the previous version posted by Timo. It's very different from the one you posted.

You might still have to change some variables in the script according to the values used in your gallery or to your desires (for instance on lines 33, 37, 47).

Thanks snark. I have replaced my rss.php with yours on my server and found an issue I don't want: This new rss.php requests to load the normal_ file immediately (not thumbnails, then load normal_ pictures on click), therefore, it takes quite long to load all the pictures out to PicLens. After waiting for a while, only 4 or 5 pictures have been loaded. Like this:
http://img84.imageshack.us/img84/5542/clipboard10yq7.jpg

Is there any way to make it loads thumbnails first?

And on double click I do not see a filmstrip like before?
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 21, 2008, 09:09:14 am
Is there any way to make it loads thumbnails first?

Line 330 of rss.php, change:
Code: [Select]
$item .= '<media:thumbnail url="'.$normal_url.'" />';so it becomes:
Code: [Select]
$item .= '<media:thumbnail url="'.$thumb_url.'" />';
For the moment, when you clink on an image in Piclens, it'll load the full size image.
If you want to load the normal image instead of the full size one, comment out line 335 and uncomment line 334.
So from
Code: [Select]
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';
to:
Code: [Select]
  $item .= '<media:content url="'.$normal_url.'" type="" />';
//$item .= '<media:content url="'.$full_url.'" type="" />';

And on double click I do not see a filmstrip like before?
I don't think it's due to rss.php. It works fine for me both with FF3 and IE7.  ???
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 21, 2008, 09:29:29 am
Line 330 of rss.php, change:
Code: [Select]
$item .= '<media:thumbnail url="'.$normal_url.'" />';so it becomes:
Code: [Select]
$item .= '<media:thumbnail url="'.$thumb_url.'" />';
For the moment, when you clink on an image in Piclens, it'll load the full size image.
If you want to load the normal image instead of the full size one, comment out line 335 and uncomment line 334.
So from
Code: [Select]
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';
to:
Code: [Select]
  $item .= '<media:content url="'.$normal_url.'" type="" />';
//$item .= '<media:content url="'.$full_url.'" type="" />';
I don't think it's due to rss.php. It works fine for me both with FF3 and IE7.  ???

Thanks. It's working fine with me now. But it just commented out the line 324 and 325, not 330
Quote
  //$item .= '<media:thumbnail url="'.$normal_url.'" />';
  //$item .= "\n";

and commented out 328 and uncommented 329
Quote
  $item .= '<media:content url="'.$normal_url.'" type="" />';
   //$item .= '<media:content url="'.$full_url.'" type="" />';

http://img233.imageshack.us/img233/105/clipboard11gt3.jpg [Edit GauGau] Replaced hotlinked image with attachment [/Edit]
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 21, 2008, 09:36:40 am
Yes, line numbers might not matched, I made some changes locally in my script.
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 21, 2008, 09:45:10 am
I found that file information is not loaded except for the file name. Can I load some info like number of view and comments?

Thanks.
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 21, 2008, 10:48:29 am
To add number of views, find line:
Code: [Select]
$title      = $picture[filename];and change it to
Code: [Select]
$title      = $picture[filename] . ' - Views: ' . $picture[hits];
For the comments, it's more difficult. And the title can only be in 1 line, so displaying the comments is probably not a good idea, as you won't be able to display a lot of them.
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 21, 2008, 11:34:27 am
Thanks it works well now.

By the way, could you please help with another problem: Many of my pictures could not display when I click to the thumbnail. There is a "!" mark like this:

http://img99.imageshack.us/img99/6048/clipboard12fn9.jpg [Edit GauGau] Replaced hotlinked image with attachment. Stop hotlinking images! [/Edit]

Most of them are those pictures I posted before rss feed was installed to my gallery. You can go here and see http://giadinhhanhphuc.net/anhgiadinh/
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 21, 2008, 01:15:26 pm
By the way, could you please help with another problem: Many of my pictures could not display when I click to the thumbnail. There is a "!" mark like this:
It's because you don't have "normal" (intermediary) images in your gallery.

The RSS feed points to
Code: [Select]
...<item>
<title>hoanggiang_30th_08.JPG - Views: 6</title>
<link>http://giadinhhanhphuc.net/anhgiadinh/displayimage.php?album=63&amp;pos=2</link>
<guid>83fa5a432ae55c253d0e60dbfa716723</guid>
<media:thumbnail url="albums/29-30th/thumb_hoanggiang_30th_08.JPG" />
<media:content url="albums/29-30th/normal_hoanggiang_30th_08.JPG" type="" />
</item>
...
http://giadinhhanhphuc.net/anhgiadinh/albums/29-30th/normal_hoanggiang_30th_08.JPG does not exist.
http://giadinhhanhphuc.net/anhgiadinh/albums/29-30th/hoanggiang_30th_08.JPG does.

Make sure the full images are linked in the RSS:
Code: [Select]
  //$item .= '<media:content url="'.$normal_url.'" type="" />';
$item .= '<media:content url="'.$full_url.'" type="" />';

If you use this code below, the normal images are used but do not exist for your album:
Code: [Select]
  $item .= '<media:content url="'.$normal_url.'" type="" />';
//$item .= '<media:content url="'.$full_url.'" type="" />';

PS: Cute kids, BTW!  ;)
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 21, 2008, 05:03:19 pm
Thanks a lot snark. I have corrected it and it works very smoothly on my site.

By the way, could you show me how to show the descriptions and post date of my pictures also? Sorry if I am too annoying :)

And thanks for your comment of my kids. Yes, they are very lovely :)
Title: Re: Easy RSS feed & PicLens
Post by: snark on August 21, 2008, 10:03:32 pm

Mix them in the title variable to show what you want:
Code: [Select]
$title      = $picture[filename] . ' - ' . $picture[hits] . ' views - date : ' . localised_date($picture[ctime], $album_date_fmt) ;will show
Quote
img001.jpg - 4 views - date : 2008/01/13
Title: Re: Easy RSS feed & PicLens
Post by: Iced Coffee on August 22, 2008, 03:31:33 am
Thanks a lot snark  :) ;) :D
Title: Re: Easy RSS feed & PicLens
Post by: sidz on August 28, 2008, 11:49:13 am
Cheers to everyone on this topic.
Bloody good work.
I've been able to get this running on my site as well (albeit with a lot of stuffing around on my part. Turned out i needed to reinstall CoolIris in the end!!)

http://gallery.sidz.id.au

If anybody knows how, setting this up as a plugin would be mighty handy!!

If you are going to install this in your coppermine gallery, make sure you follow these steps.
    1. Install the EasyRSS plugin
    2. Upload snark's latest rss.php file to your root directory.
    3. modify the codebase.php (found in the plugin folder under EasyRSS): Remove the function easyrss_header and replace it with the following:

Code: [Select]
function easyrss_header() {
    global $CONFIG,$lang_plugin_easyrss;
    require ('plugins/Easy_RSS/include/init.inc.php');

//A/ so here is the Header for PicLens
    $add_header_info = "";
//    $add_header_info = "<!-- Step 1: Add a Photos RSS feed to this webpage. //-->";
    $add_header_info .= "\n<link id=\"gallery\" rel=\"alternate\" href=\"rss.php?album=".$_GET['album']."&amp;page=".$_GET['page']."&amp;imgpos=".$_GET['pos']."\" type=\"application/rss+xml\" title=\"Image Gallery\" />";
//    $add_header_info .= "\n<!-- Step 2: Include the PiclensLite JavaScript. //-->";
    $add_header_info .= "\n<script type=\"text/javascript\" src=\"http://lite.piclens.com/current/piclens_optimized.js\">";
    $add_header_info .= "</script>\n<style type=\"text/css\"> .mbf-item {display:none;} </style>".$otherHead;
    return $add_header_info;
}

    4. Edit the rss.php file for your required settings.
etc.


Hopefully that should be it.

cheers again everyone.


Title: Re: Easy RSS feed & PicLens
Post by: snark on August 28, 2008, 12:16:24 pm
Thanks for the digest, sidz!  :D
If anybody knows how, setting this up as a plugin would be mighty handy!!
Actually, I was considering do it, based on the EasyRSS one but I don't have much spare time for the moment.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on September 23, 2008, 11:59:29 am
Here's my Plugin-Mod to install (see attached file).

You can now select what Pictures you like to use for Cooliris Piclens at Installation.
Choose between thumbs or normals for Piclens-Thumbs and between normals or full for Piclens full detail.
Optionally you can enter a logo url.

Would love to hear from you if it works.  ;D
Any problems? Security?  :o

Feedback welcome  ;)
Title: Re: Easy RSS feed & PicLens
Post by: Guido` on October 20, 2008, 03:04:04 am
@Andiwe:
Thanks for your Mod - it works fine for me (finally).
I'm just wondering whether it would be possible to add image description to picLens?‚
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on October 21, 2008, 09:03:25 am
Quote from: Guido`
@Andiwe:
Thanks for your Mod - it works fine for me (finally).
I'm just wondering whether it would be possible to add image description to picLens?‚

Nice to hear  :)

This should solve it (see snark's post below). The variable is at line 313 in rss.php.
Maybe there could be problems with long descriptions since cooliris does not support multiple lines, i think.

Quote from: snark's post #70
    * Filename : $picture[filename]
    * Number of views : $picture[hits]
    * Title : $picture[title]
    * Description : $picture[caption]
    * Post time : localised_date($picture[ctime], $album_date_fmt)  ( line "global $lastup_date_fmt;" required above in the code)


Mix them in the title variable to show what you want:
Code:
Code: [Select]
$title      = $picture[filename] . ' - ' . $picture[hits] . ' views - date : ' . localised_date($picture[ctime], $album_date_fmt) ;
will show
Code: [Select]
img001.jpg - 4 views - date : 2008/01/13
Title: Re: Easy RSS feed & PicLens
Post by: Daryth on October 29, 2008, 04:27:33 pm
Here's my Plugin-Mod to install (see attached file).

You can now select what Pictures you like to use for Cooliris Piclens at Installation.
Choose between thumbs or normals for Piclens-Thumbs and between normals or full for Piclens full detail.
Optionally you can enter a logo url.

Would love to hear from you if it works.  ;D
Any problems? Security?  :o

Feedback welcome  ;)

I just started looking at this today. I have a simple coppermine gallery that has been populated  with photos and destroyed and repopulated but nobody really looks at it because its so hard and unattractive.

I figured out how to install the plugin that you posted here (I don't know anything about coppermine)...I don't see any differences on my site though??
Title: Re: Easy RSS feed & PicLens
Post by: Daryth on October 29, 2008, 04:52:02 pm
I just started looking at this today. I have a simple coppermine gallery that has been populated  with photos and destroyed and repopulated but nobody really looks at it because its so hard and unattractive.

I figured out how to install the plugin that you posted here (I don't know anything about coppermine)...I don't see any differences on my site though??


working now!  (picking jaw up off the floor) nice work to everyone in this thread! Nicely done.
Title: Re: Easy RSS feed & PicLens
Post by: machinedragon on November 06, 2008, 04:09:21 am
@andiwe,

Thanks for the plugin works great for cooliris, but do you know why firefox doesn't display anything if you click the feed icon in the address bar?
thanks in advance machinedragon.
Title: Re: Easy RSS feed & PicLens
Post by: sarvirtual on November 06, 2008, 08:07:23 pm
i just installed this plugin, but when i click icon for activating piclens gallery
i obtain the view of all albums and non only that i selected
I woul like to have in piclens view only the photos of album selected.
Is it possible???
Can anyone help me?
Thanks
 :o ;) :(
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on November 06, 2008, 08:28:51 pm
Sure  ;D
what's the URL of your site so i can have a look at it ?
bit tricky to work it out without more information.  ;)
Title: Re: Easy RSS feed & PicLens
Post by: machinedragon on November 08, 2008, 08:07:03 am
@my gallery is at machinedragon.com/Gallery/ (http://machinedragon.com/Gallery/) and im using firefox 3 in both windows peice-a-vista and linux. when you view the feed from the feed icon in the address bar you only get a line.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on November 08, 2008, 12:48:31 pm
@my gallery is at machinedragon.com/Gallery/ (http://machinedragon.com/Gallery/) and im using firefox 3 in both windows peice-a-vista and linux. when you view the feed from the feed icon in the address bar you only get a line.

Please try the latest Version  (http://www.nordschleifenbilder.de/download/cooliris/Easy_RSSmod4cooliris-current.zip)
http://www.nordschleifenbilder.de/download/cooliris/

That should solve it. The Feed needs the full URL of Pictures. Changed that.
Title: Re: Easy RSS feed & PicLens
Post by: machinedragon on November 08, 2008, 08:07:29 pm
very cool
thanks andiwe :D ;) i had to change one little thing i think the yahoo xmlns its supposed to be xmlns:media="http://search.yahoo.com/mrss/" with the / at the end to validate.


 so now im trying to figure out whats wrong with the guid . feed validator is complaining guid must be a full URL, unless permalink attribute is false.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on November 08, 2008, 08:42:46 pm
Thank for the missing slash  ;) will add with the next fixes.  ;D

Since Cooliris uses the feed in its own way the issues displayed by the validators won't bother the application - maybe  ::)

That guid think i did not understand fully in the past.
ATM it's there for nothing. You could comment out that line. Maybe i will for future releases.
As far as i think it is only needed if you want to jump to special pictures in feeds from a seperate link (symbol in thumb will work anyway).
Title: Re: Easy RSS feed & PicLens
Post by: gardenww on December 17, 2008, 01:51:29 pm
I have installed your nice plugin (Easy RSS Mod 4 PicLens v1.2) but couldn't get it to work in my cpg installation (1.4.19). Cooliris addon is installed and works with some of my other galleries (TTG-Shadowbox). I use Firefox 3.x. Do you have any idea what goes wrong with my cpg. Your help is much appreciated!
Link to my cpg: www.wolfgangs-photograpy-gardening.de/html/cpg-joombla (http://www.wolfgangs-photograpy-gardening.de/html/cpg-joombla)
Title: Re: Easy RSS feed & PicLens
Post by: gardenww on December 17, 2008, 01:56:29 pm
Sorry, had a typo in the link, Here is the correct one:

Link to my cpg: www.wolfgangs-photography-gardening.de/html/cpg-joombla (http://www.wolfgangs-photography-gardening.de/html/cpg-joombla)
Title: Re: Easy RSS feed & PicLens
Post by: gardenww on December 17, 2008, 02:35:39 pm
I'm slowly getting it to work. It now display the Last upload album in Cooliris at startup or any Album as soon as I'm in the thumbview of this album. Still searching for a way to display Categories in Cooliris.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on December 17, 2008, 03:00:42 pm
Sorry, Categories are not supported ... yet :-[

p.s.: Sehr schöne Bilder gardenww, ist ja quasi um die Ecke  ;D
Title: Re: Easy RSS feed & PicLens
Post by: gardenww on December 17, 2008, 10:51:31 pm
Thanks Andi for the nice work. I'm not good in editing the rss.php and would like to ask you to help me out with two minor issues. First, in my gallery the play button does not appear when hovering over thumbs? Second, I'd like to display all my gallery pictures at once in the 3D-wall. Currently the lastup album is displayed but by any reason this contains not all pictures of my gallerie. Many thanks for your help in advance!
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on December 18, 2008, 11:04:39 am
Please correct the Values for the Images to display at installation.
To do that reinstall the Plugin.

Code: [Select]
Number of items to display in the feed. Should be the number of pics in your album view:24 should be fine for you, because your gallery has 3 rows and 8 colums in album/thumbnail view.

Code: [Select]
Number of items of the Movieslide below Normal-Pictures: 10 should be your choice.


Loading all pictures at once is not possible - ok it is but you woult load your whole gallery at once, that would be a cpu and traffic killer app.
That is the main feature of this plugin. It loads the next images of the gallery as soon as you move the wall in cooliris. The correct above values are needed for that to work correctly.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on December 18, 2008, 10:36:12 pm
Please update to latest release.
The values will now be polled from CPG Config.  :)
Title: Re: Easy RSS feed & PicLens
Post by: tilusnet on January 23, 2009, 10:51:01 am
That guid think i did not understand fully in the past.
ATM it's there for nothing. You could comment out that line. Maybe i will for future releases.

Andiwe,

I tried to use the GUID parameter in calling the Cooliris script with EasyRSS installed, then I realised, it doesn't work. (You may go to this page of mine (http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/displayimage.php?album=98&pos=7), and try to click on the picture: it should open Cooliris focused on the image).
As I understand, the GUID parameter is meant to open Cooliris on a specific item/picture in your gallery, at least this is what they say in the Cooliris site (http://developer.cooliris.com/?p=commonquestions):
Quote
Launch with a specific item (make sure you have GUIDs specified for each item):
<a href="javascript:PicLensLite.start({guid:'img0.jpg'});">Insert Content Here</a>
I cannot access the PicLens Lite API (http://matt.dev.piclens.com/web_guide/lite_api.html) description page, though... Do you have it, btw?

However I made to work to access an album from an external page: if you'd like to try, click on one of the 'Webshow' links on this page of mine (http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/index.php?cat=13).

I think we can figure out this GUID thing, I just need a bit of time to look at it.
If you have some hints, let me know. I'll keep an eye on this topic.

Cheers!
Title: Re: Easy RSS feed & PicLens
Post by: srobida on January 23, 2009, 05:51:59 pm
Excellent & Easy... what a combination

Your plug-in gives coppermine that extra pizazz... I really appreciate your efforts.

One glitch... I have one album (that I have found so far, I have 80) that the first page does not work with CoolIris... here is the link to my site

http://robida.org/coppermine/
It's The Wedding album, you will need to login to view... User = visitor  password = cooliris

My guess is there is a filename issue, but I do not see a difference from what is on page 2...
any help would be appreciated.  I thought about deleting the album and re-adding, but thought you might want to see the anomaly first.

The album is second one in... you know what really sucks was this was album I was using as a test!

I would enjoy buying you a pint... do you have a paypal link?
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on January 23, 2009, 07:16:46 pm
Hi Steve,

thanks for the compliment.

You guessed correctly, it's a filename issue. It is Picture #8 containing a '&' char.
That seems to break the feed unless the source code is generated correctly.
Thanks for pointing me there.

I don't know how to fix it yet. Will have a look at it again soon.
If you want to, you could rename that file and disable the visitor login - just your privacy.
Title: Re: Easy RSS feed & PicLens
Post by: srobida on January 23, 2009, 09:09:09 pm
Thank you so much for picking up on that... I went to great pains to remove all ampersands from my file names before I merged over to Coppermine... I guess I missed one, and I'll be looking for others.  :-)

Thanks again for that and all your wonderful work... I am serious about buying you a beer... do you have a paypal account?
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on January 24, 2009, 02:14:55 pm
Dear tilusnet,

glad to see someone improving the features.
Until now i saw no advantage by the use of guid numbers. I did not use any url to jump to a specific picture as you do.
The API description should be that document: http://developer.cooliris.com/samples/lite_api.html

Did you inegrate the Webshow links via the codebase.php? I'd like to integrate that with e.g. a cooliris icon behind the album name in cat view.
Or did you mod the theme template? Would be highly interessted in that.

btw i recommend udating to the latest release.
@srobida: special chars in filenames will now be urlencoded. solved  8)
Title: Re: Easy RSS feed & PicLens
Post by: tilusnet on January 24, 2009, 09:22:00 pm
Hi andiwe,

I have a locally cutomised version of your plugin now! Maybe I'll manage later to merge it with your mods.
What I achieved:
- to call the CoolIris script with a specific item zoomed in
- to show the title (if any) under the pictures
- the usage of permalinks for an album or for a picture (very useful if you want to send a link to someone)
- to fix the html encoded titles to be treated correctly by the XML parser (e.g. if the picture title contains specific diacritics, e.g. &aacute;, the XML parser fails and the slideshow won't work) - basically what you have to do is to change the $title assignment in rss.php to
Code: [Select]
  $title      = utf8_encode(html_entity_decode($picture[title]));

Anyone can have a look on my site for the effect of these mods:
-> Open http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/index.php?cat=22 and look for the 'CoolShow!' links - these are loading an album specific slideshow externally, i.e. without having to be on the page of the album;
-> Try this permalink (http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/thq_ci_slideshow.php?album=75) for the same album - as you can see, the titles with diacritics appear correctly under the pictures;
-> A classic album view (http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/thumbnails.php?album=75) with 'CoolShow!' link and permalink;
-> Picture view (http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/displayimage.php?album=75&pos=13) with 'CoolShow!' link and permalink;
-> Zoom in on a specific picture (http://tilusnet.homeip.net/root/e107_plugins/coppermine_menu/thq_ci_slideshow.php?album=75&guid=40b5f25a228570053bc64a043c3f1833) - with titles, diacritics included  ;)

Feel free to ask questions about these mods, I'll gladly answer them.
Enjoy the world of CoolIris!!

Cheers!
Title: Re: Easy RSS feed & PicLens (newbie install notes)
Post by: csmwww on February 23, 2009, 01:27:51 am
Some Installing PicLens/CoolIris RSS Feed plugin for novices:

The following kind of things will be obvious to many experienced folks, but I am brand new to Coppermine and so it took me a while to get anything working after reading all 5 pages of this thread many times. So I will share what I learned using version "Easy_RSSmod4cooliris-b017.zip".

1. To install plugins: download zip, use admin general config, browse, upload, install.
2. The "install (i)" does not always (ever?) copy "rss.php" to the root of Coppermine. Copy "rss.php" from the
    "plugins/Easy_RSS/" to the root (ie. http://foo.net/gallery/plugins/Easy_RSS -> http://foo.net/gallery).

Notes:


Uninstall/Reinstall/Upgrade


Thanks for he enhancement. Though it is not fully refined yet, it is still a great addition. I was evaluating Coppermine vs Gallery 3 and the lack of a decent viewer (one that would avoid full redraw every view) was going to push me the that direction until I found this.
Title: Athentication
Post by: zigy_dk on March 01, 2009, 06:57:43 pm
This is a great add-on. But if you like me are running a strictly privat gallery, you will need to have the rss.php file check if the user is actually logged in.
Just paste this chunk of code that came from the index.php file, just after require init.php line
------------
Code: [Select]
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
        $redirect = $redirect . "login.php";
        header("Location: $redirect");
        exit();
    }
-----------
Then users will be rediected to the login page.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on March 02, 2009, 04:28:59 pm
Thanks zigy_dk, your fix will be included in next release.  :)
Thanks csmwww for your briliant install tutorial.

I will post an update this week - stay tuned.
Title: Re: Easy RSS feed & PicLens
Post by: andiwe on March 05, 2009, 07:52:41 pm
Hi volks,

latest beta is online now (b018).  ;D
(see my website link)

Please review Readme.txt for instructions.
You have to replace all files included in package and reinstall the plugin in cpg.

Thanks to all of you helping me.
Please report all bugs you encounter e.g. per PM, Mail (cooliris [at] nordschleifenbilder [dot] de) or in this thread.
Title: Re: Easy RSS feed & PicLens
Post by: romank on March 12, 2009, 08:56:59 pm
Hab mal ein bisschen gespielt um mit dem genialen Plugin von andiwe auch FLV-Videos anzeigen zu können.

Es waren nur ein paar kleinere Änderungen am Code nötig.

In diesem rss.php wird der Mime-Typ richtig gesetzt.
Code: [Select]
$mime_content = cpg_get_type($full_url);
$mimetype = $mime_content['mime'];
Es werden die Thumbnails von Coppermine verwendet.
d.h. Wenn es für einen Filetype kein Thumb gibt (videos), wird das Thumb aus dem images folder genommen.
(wie zum Beispiel thumb_mov.jpg)
Code: [Select]
$thumb_url  = "".get_pic_url($picture,'thumb');Dann noch folgende 2 Änderungen
Code: [Select]
// $item .= '<media:content url="'.$gallery_home_url.$normal_url.'" type="image/jpeg" />';
  $item .= '<media:content url="'.$gallery_home_url.$normal_url.'" type="' . $mimetype . '" />';
Code: [Select]
// $item .= '<media:content url="'.$gallery_home_url.$full_url.'" type="image/jpeg" />';
$item .= '<media:content url="'.$gallery_home_url.$full_url.'" type="' . $mimetype . '" />';

Zuvor sollte man allerdings nach dieser Anleitung den FLV Player einbinden.
http://forum.coppermine-gallery.net/index.php/topic,34182.0.html (http://forum.coppermine-gallery.net/index.php/topic,34182.0.html)
Wobei video/x-shockwave-flash statt application/x-shockwave-flash verwendet werden sollte.
Sonst hat bei mir Cooliris die FLV-Videos nicht abspielen können.
Title: Re: Easy RSS feed & PicLens
Post by: romank on March 12, 2009, 09:15:36 pm
Hab mal ein bisschen gespielt um mit dem genialen Plugin von andiwe auch FLV-Videos anzeigen zu können.

Es waren nur ein paar kleinere Änderungen am Code nötig.

In diesem rss.php wird der Mime-Typ richtig gesetzt.
Code: [Select]
$mime_content = cpg_get_type($full_url);
$mimetype = $mime_content['mime'];
Es werden die Thumbnails von Coppermine verwendet.
d.h. Wenn es für einen Filetype kein Thumb gibt (videos), wird das Thumb aus dem images folder genommen.
(wie zum Beispiel thumb_mov.jpg)
Code: [Select]
$thumb_url  = "".get_pic_url($picture,'thumb');Dann noch folgende 2 Änderungen
Code: [Select]
// $item .= '<media:content url="'.$gallery_home_url.$normal_url.'" type="image/jpeg" />';
  $item .= '<media:content url="'.$gallery_home_url.$normal_url.'" type="' . $mimetype . '" />';
Code: [Select]
// $item .= '<media:content url="'.$gallery_home_url.$full_url.'" type="image/jpeg" />';
$item .= '<media:content url="'.$gallery_home_url.$full_url.'" type="' . $mimetype . '" />';

Zuvor sollte man allerdings nach dieser Anleitung den FLV Player einbinden.
http://forum.coppermine-gallery.net/index.php/topic,34182.0.html (http://forum.coppermine-gallery.net/index.php/topic,34182.0.html)
Wobei video/x-shockwave-flash statt application/x-shockwave-flash verwendet werden sollte.
Sonst hat bei mir Cooliris die FLV-Videos nicht abspielen können.


Sorry did recognize that this is an english Forum.
So once again in english.

Tried to show in Cooliris also FLV-Videos
Only small modification where necessary for that.

in this rss.php i set the Mime-Type correct
Code: [Select]
$mime_content = cpg_get_type($full_url);
$mimetype = $mime_content['mime'];
The thumbnails from Coppermine will be used. If no thumnail is available for some extensions (like videos) it uses from the images folder thumbs like
thumb_mov.jpg
Code: [Select]
$thumb_url  = "".get_pic_url($picture,'thumb');Then 2 small changes
Code: [Select]
// $item .= '<media:content url="'.$gallery_home_url.$normal_url.'" type="image/jpeg" />';
  $item .= '<media:content url="'.$gallery_home_url.$normal_url.'" type="' . $mimetype . '" />';
Code: [Select]
// $item .= '<media:content url="'.$gallery_home_url.$full_url.'" type="image/jpeg" />';
$item .= '<media:content url="'.$gallery_home_url.$full_url.'" type="' . $mimetype . '" />';

Bevor use this mod to show FLV-Files in Coppermine
http://forum.coppermine-gallery.net/index.php/topic,34182.0.html (http://forum.coppermine-gallery.net/index.php/topic,34182.0.html)
Only use "video/x-shockwave-flash" instead of "application/x-shockwave-flash"
otherwise Cooliris does not play the FLV-File at my site.
Title: Re: Easy RSS feed & PicLens
Post by: smartbyte on May 07, 2010, 06:43:25 am

Hi guys,

sorry this might be a stupid question, but is there any chance that this plugin gets updated to the 1.5 version?

I am running 1.5.3 and I got it working (raw DB edits, etc.) But in the end it showed me a lot of pitures, but not the ones for the specific album I was in, so I assume, that it cannot be that hard to update this plugin, but as I am not a developer, and I don't know the differences between 1.4 and 1.5 (even not plugin wise), I haven't got a clue how much work it is...

But yeah an answer would be appreciated, if someone of the developers is working on this, or had a look how much work it would be...

Thanks, Joern.
Title: Re: Easy RSS feed & PicLens
Post by: phill104 on May 07, 2010, 07:57:04 am
As I am sure you are aware, many plugins are user contributions so if the community come up with a version for 1.5.x then it will be done. If you have the ability give it a go, everyone can feel free to try. Otherwise all you can do is wait an hope that someone finds this plugin useful enough for them to put in the effort and upgrade it.

Sorry if that is not the answer you wanted, that is just how it is.
Title: Re: Easy RSS feed & PicLens
Post by: Joachim Müller on May 07, 2010, 09:29:42 am
http://forum.coppermine-gallery.net/index.php/topic,24540.0.html applies
Title: Re: Easy RSS feed & PicLens
Post by: smartbyte on May 07, 2010, 09:52:58 am

Thanks for this advice. The thread you send is very interesting, because it implies, that everyone who is on this board has to be able to program PHP, so "normal" user experience or wishes are ignored.

Just think of these cases:
You need a lawyer and he tells you, that if you are not knowing all the laws you are just stupid, and should just forget about your case and paid the money, or
you need a medical advice or did something unusual to your body and the doctor tells you, that this is your body you have to know him best...

Man I was just asking, IF anybody has upgraded this Module or might be working on it.

No offense!
Title: Re: Easy RSS feed & PicLens
Post by: Joachim Müller on May 07, 2010, 09:58:01 am
...and we don't want this thread to get cluttered with requests for this plugin to be ported, can't you understand that? If you're not a programmer and need it badly, then start a thread of your own and request it or hire someone to code it for you, but stop cluttering the thread that deals with exactly one thing: the plugin "Easy RSS feed & PicLens" for cpg1.4.x. There is no use in arguing about board rules and support policies. You haven't paid attention to board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) at all although you agreed to respect them when signing up. They even get displayed at the top of this screen when you compose a posting. Stop breaking the rules, will you?