Ported the XFeed plugin (http://forum.coppermine-gallery.net/index.php/topic,56622.0.html) to 1.5 with lot more feed possibilities.
A feed will be available for every album (including meta albums) and categories. In case of category with no meta album, lastup will be used.
Also, added some config settings like whether to show the RSS button and number of items in feed. The browser's subscribe to feed icon will display all the available feeds (RSS/Atom) with proper labeling.
Demo - http://adityamooley.net/photos/
Download: http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_xfeed_v1.11.zip/download
Good work Aditya. Much more powerful than my Atom feed plugin for 1.5.
But there is an error. See: http://adityamooley.net/photos/index.php?file=xfeed/xfeed&album=lastalb
Thanks for spotting the error. I never tested it with lastalb metaalbum, so never got this error. Its fixed now. I have updated the attachment in first post.
Aditya. Referring to this (http://forum.coppermine-gallery.net/index.php/topic,56308.0.html) thread, you have to replace the function xfd_rss_button with this one:
function xfd_rss_button($template_header)
{
global $XFDSET,$lang_xfeeds,$CONFIG, $album;
$superCage = Inspekt::makeSuperCage();
//require('./plugins/xfeed/include/init.inc.php');
if (!$XFDSET['xfd_rss_button']) {
return $template_header;
}
$xfd_feed = "index.php?file=xfeed/xfeed";
if ($superCage->get->keyExists('album')) {
$album = $superCage->get->getRaw('album');
$xfd_feed .= "&album=$album";
}
if ($superCage->get->keyExists('cat')) {
$cat = $superCage->get->getRaw('cat');
$cat = (int)$cat;
$xfd_feed .= "&cat=$cat";
}
if ($XFDSET['xfd_feedroute'] == 1) {
$xfeed_loc = "feeds.feedburner.com/".$XFDSET['xfd_feedburnuname'];
} else {
$xfeed_loc = "".str_replace("http://","",$CONFIG[ecards_more_pic_target]).$xfd_feed;
}
//static
$xfeed_title_enc = urlencode($CONFIG['gallery_name']);
$xfeed_author = "Admin"; // maybe get the first username in the future (gallery creator).
$html = "
<!-- BEGIN XFeeds Plugin -->
<span class=\"xfeeds\">
<form>
<select onchange=\"if (this.selectedIndex > 0) location.href=this[this.selectedIndex].value;\">
<option selected=\"selected\" value=\"\">".$lang_xfeeds['xfd_fe_opts']."</option>
";
if ($XFDSET['xfd_standard'] == 1) {
$html .= " <optgroup label=\"".$lang_xfeeds['xfd_fe_atom']."\">
<option value=\"".$CONFIG[ecards_more_pic_target].$xfd_feed."&type=atom\">".$lang_xfeeds['xfd_fe_local_atom']."</option>
</optgroup>
";
}
if ($XFDSET['xfd_standard'] == 1 || $XFDSET['xfd_google'] == 1 ||
$XFDSET['xfd_yahoo'] == 1 || $XFDSET['xfd_msn'] == 1 ||
$XFDSET['xfd_lines'] == 1 || $XFDSET['xfd_aol'] == 1 ||
$XFDSET['xfd_feedburn'] == 1 || $XFDSET['xfd_google'] == 1) {
$html .= " <optgroup label=\"".$lang_xfeeds['xfd_fe_rss']."\">\n";
if ($XFDSET['xfd_standard'] == 1) {
$html .= " <option value=\"".$CONFIG[ecards_more_pic_target].$xfd_feed."\">".$lang_xfeeds['xfd_fe_standard']."</option>\n";
}
if ($XFDSET['xfd_google'] == 1) {
$html .= " <option value=\"http://fusion.google.com/add?feedurl=http%3A//".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_google']."</option>\n";
}
if ($XFDSET['xfd_yahoo'] == 1) {
$html .= " <option value=\"http://us.rd.yahoo.com/my/atm/".$xfeed_author."/".$xfeed_title_enc."http%3A//".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_yahoo']."</option>\n";
}
if ($XFDSET['xfd_msn'] == 1) {
$html .= " <option value=\"http://my.msn.com/addtomymsn.armx?id=rss&ut=http://".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_msn']."</option>\n";
}
if ($XFDSET['xfd_lines'] == 1) {
$html .= " <option value=\"http://www.bloglines.com/sub/http://".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_lines']."</option>\n";
}
if ($XFDSET['xfd_aol'] == 1) {
$html .= " <option value=\"http://feeds.my.aol.com/add.jsp?url=http://".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_aol']."</option>\n";
}
if ($XFDSET['xfd_feedburn'] == 1) {
$html .= " <option value=\"http://feeds.feedburner.com/".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_feedburn']."</option>\n";
}
$html .= " </optgroup>\n";
}
$customRSSOpt = $customRSS = '';
for ($i = 1; $i <= 5; $i++) {
if ($XFDSET['xfd_customenable'.$i] == 1) {
if (empty($customRSSOpt)) {
$customRSSOpt = " <optgroup label=\"".$lang_xfeeds['xfd_fe_links']."\" />\n";
}
$customRSS .= " <option value=\"".$XFDSET['xfd_customurl'.$i]."\">".$XFDSET['xfd_customtitle'.$i]."</option>\n";
}
}
$html .= " $customRSSOpt $customRSS </select>
<noscript><input type=\"submit\" value=\"go\"></noscript>
</form>
</span>
<!-- END XFeeds Plugin -->
";
return $template_header.$html;
}
Additionally I wonder why you place the config buttin in the sub menu instead of the admin menu ???
$thisplugin->add_filter('sub_menu','xfd_add_config_button');
Maybe we should add this plugin to the svn?
Added plugin to svn. Moved config button to admin menu. Added admin menu icon. Replaced function xfd_rss_button.
Version 1.6 attached to the initial post.
Attached version 1.8 to initial post.
Is it possible to get a feed off of the favpics album?
No, its not possible. You will see the favpic feed when you go on favpic page but your RSS reader won't show anything.
I kind of figured that would be the case with it, but I seem to remember being able to access favourites by user ID before. Wasn't sure if I was missing out on something obvious when I tried it.
Thanks for a cool plugin.
How to fix problem displayed color button "RSS" in latest IE8?
In IE8 i see text string "Feed option -->"
Thanks.
And this plugin "xfeed 1.9" many conflict with "LightBox NotesFor.net (lightbox_notes_for_net): v2.5"
- no displayed "RSS" color buttons, only text string
- not work subscribe any feed-s
tested in FireFox 3.6.3 and latest IE8
1) You need to post a link to your Coppermine when asking for support - forum rule
2) LightBox is now at ver. 2.7 - see the Support thread
- it will work with XFeed above LightBox in list of installed plugins
3) Atom feed did work for me (although I had some troubles with RSS) using AtomFeed ver. 1.9 with and without LightBox
1 - http://gallery.art-world.in.ua/
2 - solved
3 - atom plugin not needed, only XFeed
plase help
QuoteHow to fix problem displayed color button "RSS" in latest IE8?
In IE8 i see text string "Feed option -->"
CPG 1.5.3 RC, theme - curve (mod)
installed plugin
bbcode_control
dst
fav_button
fetchcontent
lightbox_notes_for_net
no-crop-rotate
onlinestats
xfeed
From what I can see it looks like the issue might be with the non-latin characters. I was able to reproduce it somewhat on my cpg test gallery. The version that I have there might be different than yours so therefore:
To be certain I would suggest that you re-test with no plugins installed. Then if you use Opera you mught be able to see the exact fault. Copy and paste that into your next post.
This error I got on your site was similar o one I got on mine with a Cyrillic title on one picture.
QuoteXML parsing failed: syntax error (Line: 11, Character: 9)
8: <generator>Coppermine RSS Aggregator</generator>
9:
10: <item>
11: <title>�ейзаж за��авка2</title>
12: <link>http://gallery.art-world.in.ua/displayimage.php?pid=28</link>
13: <dc:creator></dc:creator>
14: <pubDate>Wed, 07 Apr 2010 00:56:56 +0300</pubDate>
Does the XML file specify the correct encoding in the header?
Quote from: Joachim Müller on April 09, 2010, 07:26:03 AM
Does the XML file specify the correct encoding in the header?
Here is what I see.
Quote<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel>
At the moment this is about all that I can contribute to this one - I am in too deep my own plugins!
Running version 1.5.3 with v1.9 of this plugin.
In codebase.php, part of the add to yahoo link is missing. I replaced the commented line (line 113) with the line below it and now the link works.
if ($XFDSET['xfd_yahoo'] == 1) {
//$html .= " <option value=\"http://us.rd.yahoo.com/my/atm/".$xfeed_author."/".$xfeed_title_enc."http%3A//".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_yahoo']."</option>\n"
$html .= " <option value=\"http://us.rd.yahoo.com/my/atm/".$xfeed_author."/".$xfeed_title_enc."/*http://add.my.yahoo.com/rss?url=http%3A//".$xfeed_loc."\">".$lang_xfeeds['xfd_fe_yahoo']."</option>\n";
}
If you are interested in how to make this plugin Cooliris compatible:
In codebase.php change the sequence of the RSS-feed in the Header on the album page(line 283): (move the $extra_header variable 2 lines up)
$header .= " $extra_header
<link rel=\"alternate\" type=\"application/rss+xml\" title=\"".$CONFIG['gallery_name']." - RSS\" href=\"".$CONFIG['ecards_more_pic_target'].$xfd_feed."\" />
<link rel=\"alternate\" type=\"application/atom+xml\" title=\"".$CONFIG['gallery_name']." - Atom\" href=\"".$CONFIG['ecards_more_pic_target'].$xfd_feed."&type=atom\" />
<style type=\"text/css\">
and in xfeed.php change the RSS stream to a media RSS stream(line 124):
// print "<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">";
print "<rss version=\"2.0\" xmlns:media=\"http://search.yahoo.com/mrss/\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
and comment out or delete the dc-creator line, because the media stream doesn't know how to handle dc tags:
// print "\t\t<dc:creator>{$row['owner_name']}</dc:creator>\n";
and add the media tags (the creator from above is added again as media:credit):
print "</description>\n";
print "\t\t<guid>$base/displayimage.php?pid={$row['pid']}</guid>\n";
print "\t\t<media:credit role=\"uploader\" scheme=\"urn:yvs\">{$row['owner_name']}</media:credit>\n";
print "\t\t<media:description>".htmlentities($title)."</media:description>\n";
print "\t\t<media:thumbnail url=\"$base/".get_pic_url($row, 'thumb')."\"/>\n";
print "\t\t<media:content url=\"$base/".get_pic_url($row, 'normal')."\"/>\n";
print "\t</item>\n";
and voila Cooliris detects the pictures in the albums.
... just a suggestion, but it's a small change only and I think it's worth it!
C ya.
Quote from: smartbyte on May 10, 2010, 03:28:32 AM
This is beta 2!
Now we still have the dc creator field, because I just added the xmlns:dc to the header.
... and the header looks like this:
print "<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"";
print " xmlns:media=\"http://search.yahoo.com/mrss/\"";
print " xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
... and I have implemented the dc:creator flag again. Just to be sure, that it is as compatible as it gets...
(I don't know which software uses the dc:creator flags... but Aditya is the master of RSS, I just looked up and tested how to make them work with cooliris.)
By, bye.
Hello, excuse me for my english :-\
Why the picture not appears http://www.photos-de-montres.com/galeriemontres/index.php?file=xfeed/xfeed
And also the older last adds picture, only the last
Thk
... when I look at your feed. It ends in a </channel> but it never opens it. maybe it is forgotten in the code somehwere to open a <channel>
Your header:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel>
<title>Photos de montres</title>
<link>http://www.photos-de-montres.com/galeriemontres</link>
<description>Photos des nouvelles montres, nouveautés de l'horlogerie</description>
<language>en-US</language>
<lastBuildDate>Wed, 09 Jun 2010 02:13:05 +0200</lastBuildDate>
<generator>Coppermine RSS Aggregator</generator>
My header:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Kati and Joern Pictures | Album: 2002 Toskana</title>
<link>XXXXXXXXXXXXXXXXXXX</link>
<description>... our gallery</description>
<language>en-US</language>
<lastBuildDate>Tue, 08 Jun 2010 20:29:06 -0400</lastBuildDate>
<generator>Coppermine RSS Aggregator</generator>
So there definetly is something missing. I can check the code, if I have time.
Thanks for that hint.
The gallery listing works for Albums, but not for the Start page...
Where is this file to modify for add <channel> ???
Quote from: ericco on June 09, 2010, 05:22:03 PM
Where is this file to modify for add <channel> ???
It's in /plugins/xfeed/xfeed.php
Quote from: smartbyte on June 09, 2010, 02:30:15 AM
The gallery listing works for Albums, but not for the Start page...
Confirming. This issue is not related to the channel tag; as you can see in the source code of this start page (http://www.adityamooley.net/photos/index.php?file=xfeed/xfeed) and this album feed (http://www.adityamooley.net/photos/index.php?file=xfeed/xfeed&album=lastalb). So there is something in xfeed.php that makes the feed to use the generic image.
It's not the tag channel, it's other
my xfeed.php attached
No solution ??? :(
Nahh, nothing yet, I had a look at the two feeds, and they look the same to me, so maybe it's just the length of the feed...
Wee need some RSS knowledge to solve this issue. :-\
Hey.
Edited in an option to change the position of the RSS Button. Inspired by the Social Bookmarks plugin by Joachim Müller (http://forum.coppermine-gallery.net/index.php/topic,61671.0.html (http://forum.coppermine-gallery.net/index.php/topic,61671.0.html)). Took a small code snipped from there too.
Possible options are the old one right above the gallery or parsing to template.htm with placeholder {XFD_BUTTON} which, of course, you can place anywhere in the template.
Edited language files and changend version to 1.9.1 (was 1.7 in lang file but it's based on 1.9 of course..).
Demo @ http://htbackdrops.com (http://htbackdrops.com)
Have Phun
I have been looking at this post for some time now but still don´t get it.
I tried to install the xfeed plugin for CPG 1.5.x, but I get an error:
Critical error
There was an error while processing a database query.
**************
While executing query '
INSERT INTO `cpg15x_plugin_xfeeds` (
xfd_rss_button,
xfd_rss_button_position,
xfd_standard,
xfd_google,
xfd_yahoo,
xfd_msn,
xfd_lines,
xfd_aol,
xfd_feedburn,
xfd_feedburnuname,
xfd_feedroute,
xfd_customenable1,
xfd_customenable2,
xfd_customenable3,
xfd_customenable4,
xfd_customenable5,
xfd_customtitle1,
xfd_customtitle2,
xfd_customtitle3,
xfd_customtitle4,
xfd_customtitle5,
xfd_customurl1,
xfd_customurl2,
xfd_customurl3,
xfd_customurl4,
xfd_customurl5,
xfd_theme,
xfd_feed_items)
VALUES (
1,
0,
1,
1,
1,
1,
1,
1,
0,
'undefined',
0,
0,
0,
0,
0,
0,
'Link Title 1',
'Link Title 2',
'Link Title 3',
'Link Title 4',
'Link Title 5',
'http://www.example.com',
'http://www.example.com',
'http://www.example.com',
'http://www.example.com',
'http://www.example.com',
3,
10
)' in plugins/xfeed/codebase.php on line 326
mySQL error: Unknown column 'xfd_rss_button_position' in 'field list'
**************
For the PHP Info, see attached "PHPinfo.txt"...
What else do you want to see or know?
What can I do to solve this problem..?
Best regards,
Brian
Quote from: photo2pictures on October 09, 2010, 07:01:49 AM
I have been looking at this post for some time now but still don´t get it.
I tried to install the xfeed plugin for CPG 1.5.x, but I get an error:
[..]
What can I do to solve this problem..?
Hey.
That's my fault. I just hacked together that 1.9.1 version I posted and forgot to make a clean test installation.
Here you go with a new one.
Keep in mind that I'm not the original maintainer and the versions I post here are not offical in any way.My personal changelog:
- Fixed: Error during installation and made basic.sql a little more readable.
- Removed Bloglines as they are going out of service.
- Disabled Yahoo! by default. I think there is just an outdated URL used but couldn't figure out which new one to use.
- Fixed: No thumbnails shown when parameters album and category empty (main page).
- Fixed: Use urlencode() on the feed url for predefined services
Cheers
Jayhunter
Thank you - I appreciate the fast response :) and tried again. Unfortunately it still result in error here, but a slightly different error this time.
Critical Error
There was an error while processing a database query.
***************
While executing query '
INSERT INTO `cpg15x_plugin_xfeeds` SET
xfd_rss_button=1,
xfd_rss_button_position=0,
xfd_standard=1,
xfd_google=1,
xfd_yahoo=0,
xfd_msn=1,
xfd_aol=1,
xfd_feedburn=0,
xfd_feedburnuname='undefined',
xfd_feedroute=0,
xfd_customenable1=0,
xfd_customenable2=0,
xfd_customenable3=0,
xfd_customenable4=0,
xfd_customenable5=0,
xfd_customtitle1='Link Title 1',
xfd_customtitle2='Link Title 2',
xfd_customtitle3='Link Title 3',
xfd_customtitle4='Link Title 4',
xfd_customtitle5='Link Title 5',
xfd_customurl1='http://www.example.com',
xfd_customurl2='http://www.example.com',
xfd_customurl3='http://www.example.com',
xfd_customurl4='http://www.example.com',
xfd_customurl5='http://www.example.com',
xfd_theme=3,
xfd_feed_items=10
' in plugins/xfeed/codebase.php on line 321 <<<--- it has changed from line 326 to 321
mySQL error: Unknown column 'xfd_rss_button_position' in 'field list'
***************
For the PHP Debug Info, see attached "PHPinfo2.txt"...
I tried to CHMOD all xfeed folders and files to 777 without any positive results.
Can it be the server PHP configuration..?
Quote from: photo2pictures on October 09, 2010, 12:22:37 PM
Thank you - I appreciate the fast response :) and tried again. Unfortunately it still result in error here, but a slightly different error this time.
No problem ..
Quote from: photo2pictures on October 09, 2010, 12:22:37 PM
' in plugins/xfeed/codebase.php on line 321 <<<--- it has changed from line 326 to 321
mySQL error: Unknown column 'xfd_rss_button_position' in 'field list'
The error has change quite a bit more .. but that doesn't matter.
You will have to completly delete xfeed. For me it worked just by removing it throu the plugin manager (not just uninstall!).
Please remove the plugin, delete the plugins/xfeed folder and - very important - check the database directly (phpmyadmin) if the table 'cpg15x_plugin_xfeeds' got removed. If not, do that by hand.
Now you are ready to try again. :)
Quote from: photo2pictures on October 09, 2010, 12:22:37 PM
I tried to CHMOD all xfeed folders and files to 777 without any positive results.
Can it be the server PHP configuration..?
Chmod or the server configuration has nothing to do with this. It's a database related error.
Hope you get it working.
Cheers
Jayhunter
@photo2pictures: Your gallery is located at http://www.photo2pictures.com/gs/ (the board rules require you to post a link to your gallery for support requests).
To papukaija: Sorry, and thanks.
To jayhunter: It helped. I deleted 'cpg15x_plugin_xfeeds' from MySQL tables and xfeed files and folders. Then I made a new install, and now it seems to work :)
I will report if I run into problems, thanks for your help so far, both of you, it was really great !!
:)
Having feeds is a must, so thanks a lot to the author. One problem: for me (PHP 5.2.10), it mangled all titles and comments in UTF-8 (specifically, Cyrillic), making the feed unusable. To get around that, I tweaked xfeed.php:
every time htmlentities(...) is called, change that to htmlentities(...,ENT_COMPAT,"UTF-8");
That seems to have fixed some encoding issues, however some other entities in captions, such as laquo; were still breaking the resulting feed. I fixed it by carefully replacing « with &laquo with a preg. Someone can have some real feed problems without the above!
Minor - BBCode such as [url= shows up unformatted in the RSS feed.
Quote from: csman on November 14, 2010, 05:01:38 AM
One problem: for me (PHP 5.2.10), it mangled all titles and comments in UTF-8 (specifically, Cyrillic), making the feed unusable. To get around that, I tweaked xfeed.php:
every time htmlentities(...) is called, change that to htmlentities(...,ENT_COMPAT,"UTF-8");
That seems to have fixed some encoding issues, however some other entities in captions, such as laquo; were still breaking the resulting feed. I fixed it by carefully replacing « with &laquo with a preg. Someone can have some real feed problems without the above!
Let's fix that for everyone ...
The problems you encountered with « can be resolved by using htmlspecialchars() instead of htmlentities().
Quote from: csman on November 14, 2010, 05:01:38 AM
Minor - BBCode such as url= shows up unformatted in the RSS feed.
No problem :)
So here is a new version for you guys.
Keep in mind that I'm not the original maintainer and the versions I post here are not offical in any way.My personal changelog:
- Fixed: charset problem by replaced all htmlentities( ... ) with htmlspecialchars( ... , ENT_COMPAT, $CONFIG['charset']). This will keep the configured charset working.
- Fixed: bbcode not being parsed in caption and keywords. (No smilies though)
Hope this works for everyone. Did test it on two sites and w3.org validates the feeds in UTF8 .. execpt for a missing DOCTYPE.
Cheers Jayhunter
Today some glitches came through ligt on my system using the latest 1.9.3.
Debug info for that part:
\plugins\xfeed\codebase.php
* Notice line 75: Use of undefined constant ecards_more_pic_target - assumed 'ecards_more_pic_target'
* Notice line 92: Use of undefined constant ecards_more_pic_target - assumed 'ecards_more_pic_target'
* Notice line 105: Use of undefined constant ecards_more_pic_target - assumed 'ecards_more_pic_target'
Solution for my situation:
I searched(three occurrences)
$CONFIG[ecards_more_pic_target]
replace with
$CONFIG['ecards_more_pic_target']
At last search
return $template_header.$html;
replace with
// return $template_header.$html;
return $html;
In file xfeed.php a errors did came up for me.
Critical error
While executing query 'SELECT pid,aid,filepath,filename,url_prefix,pwidth,pheight,filesize,ctime,title,keywords,votes,pic_rating,hits,caption,owner_id,u.user_name FROM cpg15x_pictures r, cpg15x_users u
WHERE (1) AND r.owner_id = u.user_id AND approved = 'YES' ORDER BY pid DESC LIMIT 0, 10' in plugins\xfeed\xfeed.php on line 87
I searched
$query = "SELECT pid,aid,filepath,filename,url_prefix,pwidth,pheight,filesize,ctime,title,keywords,votes,pic_rating,hits,caption,owner_id,u.user_name FROM {$CONFIG['TABLE_PICTURES']} r, {$CONFIG['TABLE_USERS']} u
replaced with
$query = "SELECT r.pid,r.aid,r.filepath,r.filename,r.url_prefix,r.pwidth,r.pheight,r.filesize,r.ctime,r.title,r.keywords,r.votes,r.pic_rating,r.hits,caption,r.owner_id,u.user_name FROM {$CONFIG['TABLE_PICTURES']} r, {$CONFIG['TABLE_USERS']} u
Possible this will work to for other server set-ups. At last the errors did disappear for me.
Quote from: ericco on June 08, 2010, 11:12:01 PM
Hello, excuse me for my english :-\
Why the picture not appears http://www.photos-de-montres.com/galeriemontres/index.php?file=xfeed/xfeed
And also the older last adds picture, only the last
Thk
I agree, all I see is an empty film can. Is there plans to add the thumbnail to the RSS Item? I want to have the latest image shown when I pull up the RSS entry.
Does that make sense? http://deome.net/gallery
Just made a short test with the lastup meta album: http://deome.net/gallery/index.php?file=xfeed/xfeed&album=lastup
Works as expected. That's curious behavior, as the default feed and the lastup feed displays the same images. So maybe there's a bug in the plugin.
Check out my unofficial version from this post:
http://forum.coppermine-gallery.net/index.php/topic,61197.msg337765.html#msg337765 (http://forum.coppermine-gallery.net/index.php/topic,61197.msg337765.html#msg337765)
It has the missing thumbnail bug and some others fixed.
Quote from: Αndré on January 29, 2011, 11:14:43 AM
That's curious behavior, as the default feed and the lastup feed displays the same images. So maybe there's a bug in the plugin.
xfeed really is not programmed with style. There are three (if I remember correct) different SQL querys that basically do the same thing and stuff like that. One of them is not correct in the original plugin, explaining the missing thumbs only in some feeds.
What behavior would you expect from the default feed instead of showing the latest additions?
Cheers,
Jayhunter
Quote from: jayhunter on January 29, 2011, 11:25:30 AM
What behavior would you expect from the default feed instead of showing the latest additions?
Sorry, bad wording. I expect that it displays the latest additions, but with working thumbnails ;)
Just downloaded. I'll give it a try. Spent most of the day fixing a permissions issue that my host screwed up.
Quote from: photo2pictures on October 09, 2010, 09:18:47 PM
To papukaija: Sorry, and thanks.
To jayhunter: It helped. I deleted 'cpg15x_plugin_xfeeds' from MySQL tables and xfeed files and folders. Then I made a new install, and now it seems to work :)
I will report if I run into problems, thanks for your help so far, both of you, it was really great !!
:)
I took the same steps and all is working great! Thank you so much for the plugin.
Question: how do I change or where if the file where I can change the gallery title and description that appears when I subscribe to the RSS using Live Bookmarks/in a browser like Firefox. I modified the xfeed.php and it removed the gallery title but I still cannot figure out how to change the description of the feed.
This is my page: http://cyclingphotos.hellodaly.com/
Remove/comment out the following line in xfeed.php:
print "<description>".$CONFIG['gallery_description']."</description>\n";
(not tested).
Αndré, thank you for answering my question. A couple more questions and I hope they will be the last, what would the code look like if I wanted to add the gallery title back (display the gallery title)?
For the description, if I were to display it, would I put the description where it is bolded, after the ; semicolon, or between the opening and closing carrots?
print "<description>".$CONFIG['gallery_description']."</description>\n";
I really appreciate your time in responding to me. Thank you.
If you want to add a custom description, replace
".$CONFIG['gallery_description']."
with your custom description.
Any possibility to have the thumbnails in the feed too, instead of that standard thumbnail (thumb_nopic)?
Works as expected in my gallery. Please post a link to your gallery.
www.galsh.com/index.php?file=xfeed/xfeed
If you want to find out what's wrong, you have to debug the following part in include/functions.inc.php:
$localpath = $pic_row['filepath'] . $pic_prefix[$mode] . $pic_row['filename'];
// Check here that the filename we are going to return exists
// If it doesn't exist we return a placeholder image
// We then log the missing file for the admin's attention
if (file_exists($url_prefix[$pic_row['url_prefix']] . $localpath)) {
$filepathname = $url_prefix[$pic_row['url_prefix']] . path2url($localpath);
}
Should I post my /functions.inc.php here or what?
Just use the version that I posted somewhere on page 2.
http://forum.coppermine-gallery.net/index.php/topic,61197.msg337765.html#msg337765
It has the thumbnail bug and some other errors fixed.
Cheers,
Tobias
Version 1.10 attached to initial post. All users should upgrade to that plugin version immediately, as all prior verisons contain a possible SQL injection vulnerability!
in google chrome are still shown no thumbnail. It appears thumb_nopic. Is there a solution?
vg
Quote from: Αndré on October 07, 2011, 12:11:38 PM
Version 1.10 attached to initial post. All users should upgrade to that plugin version immediately, as all prior verisons contain a possible SQL injection vulnerability!
V. 1.10 doesn't feature the option to place RSS button elsewhere than in Gallery header, doesn't display thumbnails in the feed and its RSS output is broken by special characters.
Since all of these issues were solved in v. 1.9.3, what about starting from it to release a working v. 1.10? I had to reapply all 1.9.3 fixes to 1.10 files manually to get it fully functional.
Errore interpretazione XML: tag corrispettivo mancante. Atteso: </p>.
Indirizzo: http://votalatop.altervista.org/index.php?file=xfeed/xfeed
Linea numero 14, colonna 12:</script></td>
-----------^
??????
Quote from: Ludo on February 09, 2012, 03:53:29 PM
Since all of these issues were solved in v. 1.9.3, what about starting from it to release a working v. 1.10? I had to reapply all 1.9.3 fixes to 1.10 files manually to get it fully functional.
What about sharing that files with the community? I just fixed the vulnerability in our SVN. I haven't checked what has been changed here since the release of version 1.9, simply because of the missing personal interest. I'll release version 1.11 as soon as I get your files.
Here they are, I attached the whole plugin folder because I can't remember exactly which files I had to edit :)
Please review my edits to ensure I didn't overwrite any security fix ::)
Version 1.11 (attached to initial post) contains the improvements of the 1.9.x versions by jayhunter.
Hi, I like this plugin, do you know how to move the image at the top of the page? Thanks. :)
At the top of which page?
All pages.
:o
If you're not able to explain your question more detailed I'm not able to help you. Maybe someone else knows what you're talking of.
No idea. What image would you like to move where? Please post a link to your site and a image detailing exactly what you want moved and where. Maybe draw arrows on a screen grab using paint or photoshop etc.
Hi, sorry, now I'm able to tell you better what I mean with a screenshot.
This is my gallery: http://www.funivieminiatura.it/gallery/
Have a look at codebase.php and you'll find the following line:
return $template_header.$html;
$html contains the RSS button, $template_header is your theme's header (everything before {GALLERY} in template.html).
If you want to move the button above the header, change the code to
return $html.$template_header;
If you want to place the button in your header, you have to do something like
return str_replace('<h3>{GAL_DESCRIPTION}</h3>', '<h3>{GAL_DESCRIPTION}</h3>'.$html, $template_header);
Of course you can also add a new token (e.g. {RSS_BUTTON}) to your theme's template.html file. In this case, you just have to replace that token
return str_replace('{RSS_BUTTON}', $html, $template_header);
Uhm, many thanks for your help, but I get some errors, maybe because my template.html is a little modified by me.
If I change code with
return $html.template_header;
I get as in the photo in the attachments.
If I change with
return str_replace('<h3>{GAL_DESCRIPTION}</h3>', '<h3>{GAL_DESCRIPTION}</h3>'.$html, $template_header);
The image disappears.
This is my template.html, do you find some errors?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/curve/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
<!-- Begin IE6 support -->
<!--[if lt IE 7]>
<style>
body {behavior: url(themes/curve/csshover3.htc );}
.dropmenu li {width: 1px;} .dropmenu li a.firstlevel span.firstlevel {white-space: nowrap;} .main_menu {overflow: auto;}
</style>
<![endif]-->
<!-- End IE6 support -->
{JAVASCRIPT}
<!--
SVN version info:
Coppermine version: 1.5.9
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/themes/curve/template.html $
$Revision: 7809 $
-->
</head>
<body>
<div id="cpg_logo_block_outer"><DIV STYLE="position:absolute; top:79px; left:83px"><img src="http://www.funivieminiatura.it/gallery/themes/curve/images/novita.png"></div>
<br>
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3>
<br><br>
<a href="index.php">
<img src="{CUSTOM_HEADER}">
</a>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="http://www.funivieminiatura.it/gallery/themes/curve/menu/style.css" rel="stylesheet" type="text/css" />
</head>
<div id="navigation">
<ul>
<li><a href="http://www.funivieminiatura.it">Home</a></li>
<li id="active"><a href="http://www.funivieminiatura.it/gallery/">Gallery</a></li>
<li><a href="http://www.funivieminiatura.it/forum">Forum</a></li>
<li><a href="http://www.funivieminiatura.it/how-to/">How-To</a></li>
<li><a href="http://www.funivieminiatura.it/utilities/">Utilities</a></li>
<li><a href="http://www.funivieminiatura.it/simulatori/">Simulatori</a></li>
<li><a href="http://www.funivieminiatura.it/cerca/">Cerca</a></li>
<li><a href="http://www.funivieminiatura.it/links/">Links</a></li>
<li><a href="http://www.funivieminiatura.it/contatti/">Contatti</a></li>
</ul>
</div>
</body>
</html>
</div>
<div id="cpg_header_block_outer">
<div class="cpg_header_block_inner">
<div id="main_menu">
{SYS_MENU}
{SUB_MENU}
{ADMIN_MENU}
<div align="right">
<form method="get" action="http://www.funivieminiatura.it/gallery/thumbnails.php" name="searchcpg">
<input type="hidden" name="type" value="full">
<input type="hidden" name="title" value="on">
<input type="hidden" name="keywords" value="on">
<input type="hidden" name="album" value="search">
<input type="hidden" name="type" value="AND">
<input type="hidden" name="type" value="full">
<input type="input" style="font-family: Verdana; font-size: 10px; color: #000000" size="16" name="search" maxlength="255" value="" class="textinput">
<input type="image" src="http://www.funivieminiatura.it/gallery/images/icons/search.png">
</form>
</div>
</div><br><br><br>
{MESSAGE_BLOCK}
</div>
</div>
<div id="cpg_main_block_outer">
<div class="cpg_main_block_inner">
{GALLERY}
{CUSTOM_FOOTER}
{CREDITS}
<br /> <!-- workaround for issue 64492 - do not remove the line break! -->
</div>
</div>
</body>
</html>
Sorry, I forgot the photo and I'm not able to edit post :-[
I just fixed a typo in my previous post (I accidentally removed the $ in $template_header).
Now with
return $html.$template_header;
the button remains at its place :-\
Your template.html file is invalid, as it contains the html and head tags both twice.
Thanks for information, now I just have got one head tag
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="http://www.funivieminiatura.it/gallery/themes/curve/menu/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/curve/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
<!-- Begin IE6 support -->
<!--[if lt IE 7]>
<style>
body {behavior: url(themes/curve/csshover3.htc );}
.dropmenu li {width: 1px;} .dropmenu li a.firstlevel span.firstlevel {white-space: nowrap;} .main_menu {overflow: auto;}
</style>
<![endif]-->
<!-- End IE6 support -->
{JAVASCRIPT}
<!--
SVN version info:
Coppermine version: 1.5.9
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/themes/curve/template.html $
$Revision: 7809 $
-->
</head>
<body>
<div id="cpg_logo_block_outer"><DIV STYLE="position:absolute; top:79px; left:83px"><img src="http://www.funivieminiatura.it/gallery/themes/curve/images/novita.png"></div>
<br>
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3>
<br><br>
<a href="index.php">
<img src="{CUSTOM_HEADER}">
</a>
<div id="navigation">
<ul>
<li><a href="http://www.funivieminiatura.it">Home</a></li>
<li id="active"><a href="http://www.funivieminiatura.it/gallery/">Gallery</a></li>
<li><a href="http://www.funivieminiatura.it/forum">Forum</a></li>
<li><a href="http://www.funivieminiatura.it/how-to/">How-To</a></li>
<li><a href="http://www.funivieminiatura.it/utilities/">Utilities</a></li>
<li><a href="http://www.funivieminiatura.it/simulatori/">Simulatori</a></li>
<li><a href="http://www.funivieminiatura.it/cerca/">Cerca</a></li>
<li><a href="http://www.funivieminiatura.it/links/">Links</a></li>
<li><a href="http://www.funivieminiatura.it/contatti/">Contatti</a></li>
</ul>
</div>
</body>
</div>
<div id="cpg_header_block_outer">
<div class="cpg_header_block_inner">
<div id="main_menu">
{SYS_MENU}
{SUB_MENU}
{ADMIN_MENU}
<div align="right">
<form method="get" action="http://www.funivieminiatura.it/gallery/thumbnails.php" name="searchcpg">
<input type="hidden" name="type" value="full">
<input type="hidden" name="title" value="on">
<input type="hidden" name="keywords" value="on">
<input type="hidden" name="album" value="search">
<input type="hidden" name="type" value="AND">
<input type="hidden" name="type" value="full">
<input type="input" style="font-family: Verdana; font-size: 10px; color: #000000" size="16" name="search" maxlength="255" value="" class="textinput">
<input type="image" src="http://www.funivieminiatura.it/gallery/images/icons/search.png">
</form>
</div>
</div><br><br><br>
{MESSAGE_BLOCK}
</div>
</div>
<div id="cpg_main_block_outer">
<div class="cpg_main_block_inner">
{GALLERY}
{CUSTOM_FOOTER}
{CREDITS}
<br /> <!-- workaround for issue 64492 - do not remove the line break! -->
</div>
</div>
</body>
</html>
But the problem still continues, I tried you modification on an another "pure" board too and I get the same result... :'(
Please attach your whole theme as zip file.
Sure :)
All my suggested mods works as expected for me with your theme. It will move the button above the header respectively below the gallery description. Maybe your header image laps over the button, as that image isn't displayed for me.
Hi,
I have a question: how can I get the feed thumbnail link to its corresponding intermediate picture in the gallery?
If needed, my gallery link is: http://stanakaticbrasil.com/galeria
Thanks!
Open xfeed.php, find
echo htmlspecialchars ("<p><img src=\"$base/".get_pic_url($row, 'thumb')."\" alt=\"{$row['filename']}\" /></p>", ENT_COMPAT, $CONFIG['charset']);
and replace with
echo htmlspecialchars ("<p><a href=\"$base/displayimage.php?pid={$row['pid']}\"><img src=\"$base/".get_pic_url($row, 'thumb')."\" alt=\"{$row['filename']}\" /></a></p>", ENT_COMPAT, $CONFIG['charset']);
at both occurrences.
I just added that change to the SVN repository in revision 8584.
Thank you! It worked just fine.
Cheers.
hi there, I'd like to have the album description text included in my RSS output but I just can't figure out how to do it...
Any clues?
Thanks in advance, zan
Open xfeed.php, find
foreach ($pic_data as $row) {
and below, add
if (!isset($album_description[$row['aid']])) {
$album_description[$row['aid']] = mysql_result(cpg_db_query("SELECT description FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = {$row['aid']} LIMIT 1"), 0);
}
find
print "\t\t<description>";
and below, add
echo htmlspecialchars($album_description[$row['aid']]);
is it possible to have the rss to display the intermediate or full image instead of the thumbnail?
sorry cant edit my post but in xfeed.php change thumb to pid (2 instances) to display large pictures in rss
I have installed the plugin at a testing environment, in order to check its functionality and then install it to my production gallery.
It has installed successfully but when i try to subcribe to a Local Atom Feed or a Local RSS Feed i get the following error:
XML Parsing Error: XML or text declaration not at start of entity
Location: https://XXXXXXXXX/photos/index.php?file=xfeed/xfeed
Line Number 2, Column 1:<?xml version="1.0" encoding="utf-8"?>
^
No error is displayed at the apache error log. Can anyone lead me to a solution?
A link to your site will really help. Also, try the non https version.