Hi.
Here is my rss.php that works with Piclens:
1 <?php
2 // ------------------------------------------------------------------------- //
3 // Coppermine Photo Gallery - RSS Feed //
4 // ------------------------------------------------------------------------- //
5 // Copyright (C) Dr. Tarique Sani //
6 // http://tariquesani.net/ //
7 // modifications by versus7 - www.oixalia.gr - oixalia@oixalia.gr //
8 // further modifications by Brent Gerig
9 // 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) > 0 ){
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.