Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4 5   Go Down

Author Topic: XFeed RSS/Atom feed plugin for CPG 1.5.x  (Read 125661 times)

0 Members and 1 Guest are viewing this topic.

smartbyte

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #20 on: June 09, 2010, 02:30:15 am »


... 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:
Code: [Select]
<?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&#039;horlogerie</description>
<language>en-US</language>
<lastBuildDate>Wed, 09 Jun 2010 02:13:05 +0200</lastBuildDate>
<generator>Coppermine RSS Aggregator</generator>

My header:
Code: [Select]
<?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...
Logged

ericco

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • Horlogerie-Suisse
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #21 on: June 09, 2010, 05:22:03 pm »

Where is this file to modify for add <channel>  ???

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #22 on: June 09, 2010, 08:20:03 pm »

Where is this file to modify for add <channel>  ???

It's in /plugins/xfeed/xfeed.php
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #23 on: June 09, 2010, 08:32:44 pm »

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 and this album feed. So there is something in xfeed.php that makes the feed to use the generic image.
Logged

ericco

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • Horlogerie-Suisse
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #24 on: June 09, 2010, 10:55:04 pm »

It's not the tag channel, it's other
my xfeed.php attached

ericco

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • Horlogerie-Suisse
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #25 on: June 16, 2010, 08:36:37 pm »

No solution  ??? :(

smartbyte

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #26 on: June 17, 2010, 12:49:39 am »

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.  :-\
Logged

jayhunter

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x modified
« Reply #27 on: September 23, 2010, 10:41:18 am »

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). 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
Have Phun
Logged

photo2pictures

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • PHOTO2PICTURES
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #28 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:

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
Logged
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

jayhunter

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #29 on: October 09, 2010, 10:22:46 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
Logged

photo2pictures

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • PHOTO2PICTURES
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #30 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.

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..?
Logged
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

jayhunter

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #31 on: October 09, 2010, 01:01:33 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 ..

  ' 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. :)

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
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #32 on: October 09, 2010, 01:23:13 pm »

@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).
Logged

photo2pictures

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • PHOTO2PICTURES
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #33 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 !!

 :)
Logged
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

csman

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #34 on: November 14, 2010, 05:01:38 am »

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 &laquo with &amplaquo 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.
Logged

jayhunter

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #35 on: November 15, 2010, 08:41:28 pm »

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 &laquo with &amplaquo with a preg. Someone can have some real feed problems without the above!

Let's fix that for everyone ...

The problems you encountered with &laquo; can be resolved by using htmlspecialchars() instead of htmlentities().

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
Logged

DaMysterious

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • My CPG Recources
    • My CPG Recources
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #36 on: December 15, 2010, 10:35:33 pm »

Today some glitches came through ligt on my system using the latest 1.9.3.

Debug info for that part:
Code: [Select]
\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)
Code: [Select]
$CONFIG[ecards_more_pic_target]
replace with
Code: [Select]
$CONFIG['ecards_more_pic_target']

At last search
Code: [Select]
    return $template_header.$html;
replace with
Code: [Select]
    // return $template_header.$html;
    return $html;


In file xfeed.php a errors did came up for me.

Critical error
Code: [Select]
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
Code: [Select]
    $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
Code: [Select]
    $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.
« Last Edit: December 15, 2010, 11:34:10 pm by DaMysterious »
Logged
DaMysterious.

cdeome

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #37 on: January 28, 2011, 06:57:59 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #38 on: January 29, 2011, 11:14:43 am »

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.
Logged

jayhunter

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
Re: XFeed RSS/Atom feed plugin for CPG 1.5.x
« Reply #39 on: January 29, 2011, 11:25:30 am »

Check out my unofficial version from this post:

http://forum.coppermine-gallery.net/index.php/topic,61197.msg337765.html#msg337765

It has the missing thumbnail bug and some others fixed.

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
Logged
Pages: 1 [2] 3 4 5   Go Up
 

Page created in 0.032 seconds with 19 queries.