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]   Go Down

Author Topic: [Closed]: RSS  (Read 4961 times)

0 Members and 1 Guest are viewing this topic.

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
[Closed]: RSS
« on: June 02, 2009, 10:17:51 pm »

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?

Code: [Select]
//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;

?>
« Last Edit: June 03, 2009, 10:31:13 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: RSS
« Reply #1 on: June 03, 2009, 07:55:29 am »

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

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: RSS
« Reply #2 on: June 03, 2009, 10:28:47 am »

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

http://www.stevo.be
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: RSS
« Reply #3 on: June 03, 2009, 10:31:00 am »

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

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: [Closed]: RSS
« Reply #4 on: June 03, 2009, 07:32:18 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: RSS
« Reply #5 on: June 04, 2009, 11:35:25 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.