Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2 3   Go Down

Author Topic: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)  (Read 66724 times)

0 Members and 1 Guest are viewing this topic.

wieland

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • -- Listen to the Wind
    • Kublun.com

I've modified this script so it shows title and description for each item, I'm attaching it .txt (rename it to .php) and code...
Code: [Select]
<?php
//
//  Coppermine RSS 2.0 Generator (1.0)
// displays latest photo via RSS 2.0 feed.
//  Compatible with : Coppermine 1.3.x
//
// Hacked at : 22 October 2005, 0400 +0800
//
// Copyright (C) 2005 Mohammad Hafiz bin Ismail (mypapit)
//
// 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.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//
// Report problems and direct all questions to:
//
// <mypapit@gmail.com>
//
// For latest version of this software, please visit :
//
// http://mypapit.net/pproject
// http://blog.mypapit.net/
//
// authors email : mypapit@gmail.com, papit01@lycos.com
//
//
// Modified by Wieland E. Kublun www.kublun.com on 29/September/2006
//
// Now this mod displays the album's title and description

$upperlimit 6//default = 6


define('INC_COMMENT_TIMES'false);
define('FILEDUMP'false);
define('GZ_COMPRESS'false);
// [0.0 <= priority <= 1.0]
define('P_DISPLAYIMAGE'0.5);
define('P_ALBUM'0.5);
define('P_CATEGORY'0.5);

// [changefreq = always || hourly || daily || weekly || monthly || yearly || never]
define('CF_DISPLAYIMAGE''unspecified');
define('CF_ALBUM''unspecified');
define('CF_CATEGORY''unspecified');

define('IN_COPPERMINE'true);
require(
'include/init.inc.php');

// This should work as it is, but hardcode if necessary.
define('CPG14'version_compare(COPPERMINE_VERSION"1.4.0"">="));
define('PHP5'version_compare(phpversion(), "5"">="));
$base rtrim($CONFIG['ecards_more_pic_target'], '/');
$albumpath "$base/" $CONFIG['fullpath'];

function 
lmdate($timestamp)
{
if (PHP5){
return date('c'$timestamp);
} else {
return date('D, d M Y H:i:s +0800'$timestamp date('Z'));
}
}

// No user servicable parts below here

header("Content-type: text/xml; charset=utf-8");
print 
"<?xml version=\"1.0\" encoding=\"utf-8\"?>
\n";
print "<rss version=\"2.0\">";
print "<channel>\n";
print "<title>{$CONFIG['gallery_name']}</title>\n";
print "<link>$base</link>\n";
print "<description>{$CONFIG['gallery_description']}</description>";
print "<language>es-MX</language>\n";
print "<lastBuildDate>"  . lmdate(time()) . "</lastBuildDate>\n";
print "<generator>Coppermine RSS 2.0 Generator (1.0)</generator>\n";
   
   

$result = mysql_query("SELECT  tb.pid,tb.aid,ta.aid,ta.description,tb.ctime,ta.title,tb.keywords,tb.filepath,tb.filename FROM {$CONFIG['TABLE_PICTURES']} tb LEFT OUTER JOIN {$CONFIG['TABLE_ALBUMS']} ta ON tb.aid = ta.aid ORDER BY tb.pid DESC LIMIT 0,$upperlimit");
while (list($pid, $aid,$aaid,$desc, $ctime, $title, $keywords,$filepath,$filename) = mysql_fetch_row($result)) {
print "\t<item>\n";
print "\t\t<title> $title </title>\n";
print "\t\t<link>$base/displayimage.php?pos=-$pid</link>\n";
print "\t\t<author>{$CONFIG['gallery_admin_email']}</author>\n";
        print "\t\t<pubDate>" . lmdate($ctime) . "</pubDate>\n";
        print "\t\t<description>";
        echo  htmlentities("<p><a href=\"$base/displayimage.php?pos=-$pid\"><img src=\"$albumpath$filepath" . "thumb_$filename\" alt=\"\" border=\"0px\" /></a></p>"); echo "<a href=\"$base/displayimage.php?pos=-$pid\">$title</a><br/><br/><br/>$desc<p>$keywords</p>";
        print "</description>\n";
print "\t</item>\n";
print "\n";
}
print "</channel>";
print "</rss>";


[Edit By Sami]:
Orginaly splited from this thread:
http://forum.coppermine-gallery.net/index.php?topic=11081.0
as it's working with 1.4.x version
« Last Edit: October 01, 2006, 11:08:27 pm by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #1 on: September 30, 2006, 06:57:16 am »

It seems that its working with CPG1.4.x , am I right?
Logged
‍I don't answer to PM with support question
Please post your issue to related board

wieland

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • -- Listen to the Wind
    • Kublun.com
Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #2 on: September 30, 2006, 06:41:21 pm »

It seems that its working with CPG1.4.x , am I right?

I don't know, but it's working for me in CPG 1.3.x
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #3 on: September 30, 2006, 07:04:53 pm »

It's working on 1.4.x so I moved it to Mods: content syndication (cpmFetch) board as a new port of an old mod
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Dead J. Dona

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 27
  • Yeppie-kaye, mazafaka (c) Bruce Willis
    • Æåíñêèé æóðíàë ÍÀÒÀËÈ

i suppose php script should end with

?>

Logged
wbr, Me. Dead J. Dona

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

AFAIK it works without that tag but you can put it if you want ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cornelp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34

Hi. I am trying to get this to work on my Gallery, but I belive I am missing something.

I copied the rss.php file and made the proper changes to it so it points to my gallery, but when I try to point to it, IE gives me an error. When I try to validate it, same error.

http://gallery.poserpacks.com/rss.php

I am getting a Server 500 Error. Not sure what that means.

I am sorry if this is the wrong area to post this, just was not sure where else.

Can anyone help me here please?

THANK YOU VERY MUCH...
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

I copied the rss.php file and made the proper changes to it so it points to my gallery
It doesn't need any modification , it will find your gallery when you copy it ,use orginal rss.php and check that again
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cornelp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34

I copied the rss file again (the original) with no changes, and i get the SAME ERROR.

Perhaps I am doing something wrong? Pretty much just took the file, copied it to the main site thru FTP and tried to launch it, but get the Error 500.

http://gallery.poserpacks.com/rss.php

Am I supposed to use any parameters in the link?

I am sorry, just new to this RSS. I got the Main Site RSS FEED to work, and the Forums (SMF), but I cant get this one to work.

Thank You for your help on this...


Cornelp
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project

Sorry but it seems it's not well-formed and didn't work with some Servers
Logged
‍I don't answer to PM with support question
Please post your issue to related board

cornelp

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #10 on: October 09, 2006, 07:25:55 pm »

Ohhh darn it, I wanted to use it badly.

Maybe it has to do with the subdomain. I am using the gallery part of the site with a subdomain name. I dont know, maybe i can contact the host and ask them about it.

THANK YOU FOR YOUR TIME. Very much appreciate it.

Cornelp.
Logged

danyel

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #11 on: October 30, 2006, 04:42:03 am »

I apologize in advance if this is a silly question. A forum search revealed one other instance of my question but the poster resolved his problem without posting his solution.

I've copied over wieland's file to my coppermine directory, I'm calling the rss.php feed through a joomla module.  The links display perfectly but when I click I'm taken, literally to "www.mysite.com/coppermine/".   

I'm a little stumped as to where rss.php is pulling "www.mysite.com" from as the base url for my coppermine gallery.  A nudge in the right direction would be appreciated.

Thanks in advance.

Logged

Nibbler

  • Guest
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #12 on: October 30, 2006, 05:09:42 am »

What did you set in Coppermine config for your gallery's url ?
Logged

danyel

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #13 on: October 30, 2006, 05:32:54 am »

Sorry for the delay, I was double checking posts on all the various RSS feeds to make sure I hadn't overlooked something silly.


Under Config, my base url is set at "http://www.batistaweb.com/coppermine/"

rss.php = http://www.batistaweb.com/coppermine/rss.php
Logged

danyel

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #14 on: October 30, 2006, 06:29:37 am »

 ??? As not to waste anyone's time, I'm putting this request/plea for help on hold.  The script is not behaving as it did when I initially posted, nor is it behaving as I expected.  Further reading suggests that the bridged nature of my Coppermine install may, at least be contributing to my problems.

Nibbler, I totally appreciate your response though, thank you.
Logged

imrich

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 70
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #15 on: November 03, 2006, 02:17:59 pm »

Thanks for sharing this rss.php script.

It seems to be working for me.

However it does not seem to obey authorization. I have some private albums as well as some public ones. It seems to show images from the private albums even when not logged into coppermine.

Those with private albums should be sure to test this.
Logged

Nibbler

  • Guest
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #16 on: November 03, 2006, 02:30:24 pm »

There is nothing in the mod to enable it to respect viewing permissions, album passwords, or unapproved files. There is also nothing there that would cause issues with a bridged gallery.
Logged

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Get RSS Feeds - W/Paypal Mod - Perhaps a Conflict?
« Reply #17 on: December 23, 2006, 02:40:23 am »

Hi All,

CPG 1.4.9
Paypal shopping cart mod (custom displayimage.php file)
Just tried dropping this little RSS mod into the gallery root, unchanged save for the file name to .php

Tried to validate but it failed.

The feed url is here.

Wondering if the Paypal mod is to blame? Any ideas? Thanks!
Logged

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #18 on: December 23, 2006, 09:47:52 pm »

The feed url is here.

Please disregard that url for the feed. It is too late to edit my first post or I would have. I've switched to CpmFetch & CfRSSGet and set-up a 301 for that old url since it seems to be already getting hits from all over the place.

The new feed does validate and since I run custom thumbs for my Quicktime movies, while the RSS feed in this thread is handy, as Nibbler stated, it does not know of, or respect private albums which resulted in the feed displaying custom thumbs in an album not open to the public. CFRSSGet is only showing the public content as indicated earlier in this thread.

Thx!

Logged

pacimir

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: Get RSS Feeds from Coppermine now!( shows album's title and descriptions)
« Reply #19 on: January 29, 2007, 03:54:54 pm »

Sorry if my post is not for here  :-\

What will be the source of rss.php if the feed have to show:
thumb 150x100 </ br>
discription

I think this will be helpfull for many people for last upload pic boxes in CMSystems :)
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.024 seconds with 20 queries.