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: rss feed  (Read 11571 times)

0 Members and 1 Guest are viewing this topic.

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
rss feed
« on: June 06, 2009, 10:07:20 pm »

Found this code on the internet. Seems like this is written for coppermine.
Hope somebody can modify this the way I like.

I think it's a small job for somebody who nows php and I like to pay €25.

1) if you look at attachment you can see name and date under picture. I would like to have some space between name and date
2) is it possible to put also custom fields under name
3) Is it possible that the feedreader don't read the pictures if there is no name in the titlefield?

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;

?>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: rss feed
« Reply #1 on: June 07, 2009, 10:20:22 am »

The visual representation of RSS is being defined in the feed reader that outputs the feed, not in the script that creates the feed in the first place. You're looking into the wrong section of code. I think I already told you so on your identical thread on the free support board:
Then you need to edit the non-coppermine page.

You should have read the sticky thread "sub-board rules, read first!" and should have done as suggested there.
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: rss feed
« Reply #2 on: June 07, 2009, 06:36:26 pm »

Why do you have a comment in every post I do??
Yes, correct I didn't understood your "edit a non-coppermine page". I thought you mean that this was a page not delevopped by coppermine and so it was wrong to ask it in support.
The reason I put it here is that I like to pay for something I couldn't do.

what is wrong in my request??


You should have read the sticky thread "sub-board rules, read first!" and should have done as suggested there.

Details needed
>> I told what I like to pay, didn't tell how long job should take because I don't know. If € 25 is not enough we could discuss in PM.
You have the code in page and a view in attached file.

Things to avoid
>> I didn't do anything of these. I started a neutral topic without putting 'help me' and 'willing to pay'.

Do not post your email address
>> The information you need is in the topic.

No guarantees
>> Didn't bump my message. Didn't do anything else to bring my topic up. If nobody else answers my request, it's ok by me.

No advertizing for webhosting allowed
>> Also something I did.

Don't be lazy
>> I try to find something on forum. used search with several words but didn't find anything.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: rss feed
« Reply #3 on: June 07, 2009, 09:08:46 pm »

No link to your page although you should post it according to the sticky. No schedule. The freelancer would have to guess. Not a bright idea.

Why do you have a comment in every post I do??
Because you constantly misbehave.
Logged

Stevo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 86
Re: rss feed
« Reply #4 on: June 08, 2009, 10:53:24 am »

Because you constantly misbehave.
Strange you're the only one who always react on my posts. No other moderator seems to feel the same. From other moderators I actually get help on this "support forum"
Don't want to start a discussion here. If you need you can close my posts and block my username.
I see posts who are more provocative then all my posts together but you never react on them, no, you like to pick me.
Logged

TexAcoon

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: rss feed
« Reply #5 on: March 15, 2010, 04:18:21 pm »

Strange you're the only one who always react on my posts. No other moderator seems to feel the same. From other moderators I actually get help on this "support forum"
Don't want to start a discussion here. If you need you can close my posts and block my username.
I see posts who are more provocative then all my posts together but you never react on them, no, you like to pick me.

Stevo ...  Don't feel bad he tries to show his intelligence on me like he did with you as well ... 
Why he is around and gives people a hard time beats me .. 
Not sure if he is happy with himself or just hates people or doesn't like his job ..
Who knows..  I really don't care ..
He needs to take a pill and quite being an idiot on everyone..
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: rss feed
« Reply #6 on: March 15, 2010, 04:58:54 pm »

TexAcoon,

No more of this please. You were pointed to the board rules in your other thread and I am guessing that is why you have the hump. Joachim just tells it like it is. Yes, he is abrupt if you don't do a few simple things that are asked of you. It is not much to ask is it? We need those things to help you and to have to constantly ask is frustrating (as is responding to posts such as yours). If you play the game you will be a much richer man with Joachim's help.

Once more and I shall have no option than to press the big red ban button.

Locking
« Last Edit: March 15, 2010, 05:04:42 pm by Phill Luckhurst »
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.