Easy RSS feed - Page 2 Easy RSS feed - Page 2
 

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

Easy RSS feed

Started by flaquito, May 17, 2007, 09:27:32 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

superdave

great plugin ... i installed and am using it with no errors.

thanks for your hard work.

as a suggestion for future versions, perhaps creating an admin module to adjust features without having to uninstall/reinstall the mod.

cheers

dave

Hijacker

Hi there!

I did some minor modifications to the package. The changes are as the following:
- Changed Feed-Charset from iso-8859 to UTF-8 (like recent Coppermine versions are, too)
- Added a radio button to choose "Title, if not available: Caption" + implementation for the feed
- Adjusted the english lang file according to above changes
- Added german lang file

I'll attach all the changed files. If you want to add these to your main package, just go ahead :)

P.S.: Argh, 3 attachments max. Gotta make a second post for the german lang file ^^
P.P.S.: Heh, php extensions not allowed for upload. I'll rename them to .php.txt. Just remove the .txt.

Hijacker

And the german lang file...

//edit: If there is a bug anywhere or a mistake in the translations... Please bear with me. I did this at 6-7am and I really need to get some sleep now ;)

andyleery

Hello, I have got a problem with this hack.
XML-Verarbeitungsfehler: "Junk" nach Dokument-Element
Adresse: http://www.bollybilder.de/rss.php
Zeile Nr. 12, Spalte 1:<?xml version="1.0" encoding="iso-8859-7"?>

This you will see, if you visit the Link "http://www.bollybilder.de/rss.php".
How can I fix it?

Tranz

That's because javascript code is getting injected right before the xml code. Did you add that somewhere?
<script language="javascript" type="text/javascript">
<!--
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>
<?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/"
>
[snip]

andyleery

Must be an hack which added it. Dont know where I can find this code :-(! Do you have some ideas?

andyleery

I have found it, thx for your help!
I have also another problem, may you can help me there also? ^^
-> http://forum.coppermine-gallery.net/index.php?topic=26532.msg211116

Joachim Müller


levy

How can i change the feed's display to Title or Caption without having to uninstall and reinstall? Thanks.

easyjava

Quote from: andyleery on June 11, 2007, 12:12:53 AM
Hello, I have got a problem with this hack.
XML-Verarbeitungsfehler: "Junk" nach Dokument-Element
Adresse: http://www.bollybilder.de/rss.php
Zeile Nr. 12, Spalte 1:<?xml version="1.0" encoding="iso-8859-7"?>

This you will see, if you visit the Link "http://www.bollybilder.de/rss.php".
How can I fix it?

i have the same problem but i haven't javascript :(

celebrienne

Hi there,

thanks for the plugin, just installed it and it works so far, but I've got some question and/or suggestions which features might be useful to add. I know the plugin is called "easy" RSS feed, but anyway...

-> Is there a way to display the album's name as the title of each feed item? Right now my feed items have no titles/captions in the feed reader because I don't give them titles or captions (and I'm not planning to do so because of the number of images which are added everyday).
-> Is there a way to display a full album per feed item? I often batch 30-60 images per album and having each image delivered as a separate feed item isn't really ideal; it makes the feed look kinda spammy and overwhelming if you got like 300 new feed items in your feed reader ;-)

If I got you right, this plugin doesn't work for categories right now. I really encourage you to implement this feature if you can. My image gallery is celebrity related (where celebrity = category) and the main reason I wanted a RSS feed plugin for coppermine, is because I want my visitors who are fans of a certain celebrity be able to subscribe via RSS to a certain celebrity, so he/she will always be notified if new images of his favorite celebrities are published.

OK, that's it for right now. Thanks for the plugin again!

Bye,
Celebrienne

rubenix

Hi All, I'm having problems with this plugin.

After doing a few modifications as per TranzNDance's suggested in a previous thread (javascript getting injected before the plugin) I thought the rss was working but still not working and gives me an xml error instead...

Surprisingly it only works with Safari browser, not FF nor IE7...

Can you please check this out for me...Thanks so much in advance! I really need this plugin working in my site

http://www.rubenix.net

ComputerLady

Hi, forgive me for asking what may seem an obvious question, but I'm still rather confused yet excited about this plugin. The best way for me to resolve those would be to see a live demo of what a feed will look like I guess. If anyone would care to share that, I would greatly appreciate it!  :D

My main concern is if images themselves are being shared via the feed, and - if so - which ones. The thumbnails? Larger sizes? I've already taken steps to better protect the content stored on my site (visible watermarks), and code to block those trying to pass my work off as their own. But, if I'm blasting copies of those files out via a feed that shoots down some of those protection strategies!

Another fear is that removing this plug-in could prove to be a major challenge if tested on a live site. I'm having to rebuild mine (again!) from scratch as my hosting company cross-linked some of my databases during a server move. (Using only ONE database now so that can't happen again!) Needless to say, I don't want to have to toss everything out and start over yet again!

Thanks for comments!

rubenix

me again!!

have to say that for some unknown reason today is not working with safari neither!

here the error I get from feedvalidator.org:

line 42, column 0: XML parsing error: <unknown>:42:0: xml declaration not at start of external entity [help]

    <?xml version="1.0" encoding="UTF-8" ?>


How can I solve this??

Tranz

Which feed gives that error?

rubenix

Quote from: TranzNDance on July 03, 2007, 04:48:49 PM
Which feed gives that error?

This one:
http://www.rubenix.net/rss.php

<?php 
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery - RSS Feed                                      //
// ------------------------------------------------------------------------- //
// Copyright (C) Dr. Tarique Sani                                           //
// http://tariquesani.net/                                                  //
// modifications by versus7 - www.oixalia.gr - oixalia@oixalia.gr //
// further modifications by Brent Gerig
// 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         //
// ------------------------------------------------------------------------ //
define('IN_COPPERMINE'true);
define('INDEX_PHP'true);
global 
$CONFIG,$ALBUM_SET,$META_ALBUM_SET,$CURRENT_CAT_NAME,$FORBIDDEN_SET_DATA,$lang_plugin_easyrss;
require(
'include/init.inc.php');
require(
'plugins/Easy_RSS/include/init.inc.php');
//How many items you want to show in RSS feed
$thumb_per_page $CONFIG[plugin_easyrss_num];
$thumb_count 0;
$lower_limit 0;
if(
count($FORBIDDEN_SET_DATA) > ){
    
$forbidden_set_string =" AND aid NOT IN (".implode(","$FORBIDDEN_SET_DATA).")";
} else {
    
$forbidden_set_string '';
}
if(isset(
$_GET['album'])){
    
$album $_GET['album'];
}
//If it is a numeric album get the name and set variables
if ((is_numeric($album))){
     
$album_name_keyword get_album_name($album);
     
$CURRENT_CAT_NAME $album_name_keyword['title'];
     
$META_ALBUM_SET "AND aid IN (".(int)$_GET['album'].")".$ALBUM_SET;

     
//Set the album to last uploaded
     
$album 'lastup';
}
//If the album is not set set it to lastup - this is the default
if(!isset($album)){
     
$album 'lastup';
}
/*
if ((isset($_GET['cat']) && $_GET['cat'] > 1)){ 
     $cat = $_GET['cat'];
     $album_name_keyword = get_album_name($cat);
     $CURRENT_CAT_NAME = $album_name_keyword['title'];
     
     $META_ALBUM_SET = "AND aid IN (".$cat.")".$ALBUM_SET;
}
*/
//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/";
$META_ALBUM_SET .= $forbidden_set_string;
$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="UTF-8" ?>

<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>$CONFIG[ecards_more_pic_target]rss.php</generator>
EOT;
echo $rssHeader;
foreach($data AS $picture) {

    $titlefield = $CONFIG[plugin_easyrss_titlefield];
    $caption_text = "<br>".$picture[hits]." ".$lang_plugin_easyrss['views'];
    $caption_text .= "<br>".date('M d, Y',$picture[ctime]);
   
    $thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_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]);
    if($titlefield == "tthenc")
    {
    if($picture['title'])
        {
          $titlefield = "title";
          $title = $picture['title'];
        }
        elseif($picture['caption'])
        {
            $titlefield = "caption";
            $title = $picture['caption'];
        }
    else
        $title = $lang_plugin_easyrss['no'].$lang_plugin_easyrss['label_notorc'];
    }
    elseif($picture[$titlefield])
        $title = $picture[$titlefield];
    else
        $title = $lang_plugin_easyrss['no'].$lang_plugin_easyrss['label_'.$titlefield];
   
    $description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" border="1" vspace="2" hspace="2"> <align="center" ></a><br>';
    if($titlefield == "title")
        $description .= bb_decode($picture[caption]);
    $description .= bb_decode($caption_text);   
    $description =  htmlspecialchars($description);
   
    $item = '<item>
              <title>'.$title.'</title>
              <link>' . $link_url . $picture[pid] . '</link>
              <pubDate>' .$pubDate.' GMT</pubDate>                   
          '.$category_string.'
              <description>'.$description.'</description>           
             </item>';

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

?>


Created using Easy Rss Feed plugin

rubenix

Some help will be really apreciated!!  ;)

Joachim Müller


rubenix

sorry Gau-Gau for being quite impatience, i Know this is a support board and I really apreciate everybody's work to solve problems.

Sorry again and hope to get an answer for my problem whenever somebody has the time to look after it...

ComputerLady

Took the plunge on this one and am very happy with it. Feed uses only thumbnail images, for anyone interested, so minimal risks in so far as theft. Again, nice job on this and much appreciated!