rss feed rss feed
 

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

rss feed

Started by Stevo, June 06, 2009, 10:07:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stevo

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?

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

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:
Quote from: Joachim Müller on June 03, 2009, 10:31:00 AM
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.

Stevo

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??


Quote from: Joachim Müller on June 07, 2009, 10:20:22 AM
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.

Joachim Müller

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.

Quote from: Stevo on June 07, 2009, 06:36:26 PM
Why do you have a comment in every post I do??
Because you constantly misbehave.

Stevo

Quote from: Joachim Müller on June 07, 2009, 09:08:46 PM
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.

TexAcoon

Quote from: Stevo on June 08, 2009, 10:53:24 AM
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..

phill104

#6
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
It is a mistake to think you can solve any major problems just with potatoes.