[Closed]: RSS [Closed]: RSS
 

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

Main Menu

[Closed]: RSS

Started by Stevo, June 02, 2009, 10:17:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stevo

Found this RSS code on the internet.
But in Feedreader 3.14 you can see name and date under picture (see attachment)

Is it possible to have some space between name vessel and date??
Can I also put custom fields in this code?


//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=-";
$image_url = $CONFIG['ecards_more_pic_target']."albums/";


$data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);


header ("content-type: text/xml");
//maybe you must change the encoding to iso-8859-1.
$rssHeader = <<<EOT
<?xml version="1.0" encoding="iso-8859-7"?>
<rss version="2.0"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
>
<channel>
   <title>$CONFIG[gallery_name]</title>
   <link>$CONFIG[ecards_more_pic_target]</link>
   <description>$CONFIG[gallery_description] - $album_name</description>
   <generator>http://www.stevo.be/rss.php</generator>
EOT;
echo $rssHeader;

foreach($data AS $picture) {

   $thumb_url = "$image_url$picture[filepath]$CONFIG[pfx]$picture[filename]";
   $keywords = explode(" ",trim($picture[keywords]));
   $category_string = "";
   foreach($keywords as $keyword){
        $category_string .= "<category>$keyword</category>";
   }
   $pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
   
   $description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="0" vspace="2" hspace="2"> <align="center" ></a><br>'.bb_decode($picture[caption]).bb_decode($picture[caption_text]);    
   $description =  htmlspecialchars($description);
   
   $item = '<item>
             <title>'.$picture[title].'</title>
             <link>' . $link_url . $picture[pid] . '</link>
             <pubDate>' .$pubDate.' EST</pubDate>                    
         '.$category_string.'
             <description>'.$description.'</description>          
            </item>';

   echo $item;
}

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

?>

Joachim Müller

In which aspect is this related to coppermine? What's the link to your coppermine-driven gallery?

Stevo

this is an rss feed I found on the internet and it works with coppermine.

http://www.stevo.be

Joachim Müller

So the mod pulls data from coppermine and displays it on a non-coppermine-driven page? Then you need to edit the non-coppermine page. Beyond the scope of support here.

Stevo

Sorry, thought this was writing for coppermine.


// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - RSS Feed                                      //
// ------------------------------------------------------------------------- //
// Copyright (C) Dr. Tarique Sani                                           //
// http://tariquesani.net/                                                  //
// modifications by versus7 - www.oixalia.gr - oixalia@oixalia.gr //
// 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         //
// ------------------------------------------------------------------------ //

Joachim Müller

Quote from: Stevo on June 03, 2009, 10:28:47 AM
I found on the internet
You should have posted where you found it in the first place.
It's a mod - it's up to the mod author to support it. However, it hasn#T been written for a supported version of coppermine afaik.