Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetFeed - displaying RSS feeds [beta]
Author Message
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-04-03 05:44:44
GetFeed - displaying RSS feeds [beta]

I have made a rudimentary plugin to display RSS feeds in GetSimple (to use it myself, until some decent PHP coder makes a better one) ;-)

GetFeed v0.4.1 beta - GetSimple Feed Reader/Fecther
Download: http://www.cyberiada.org/cnb/getsimple-plugin-getfeed/

Setup:
- Create a 'getfeed' directory in your plugins folder. Create another directory inside of this one, named 'magpierss'.
- Download MagpieRSS libraries (not included in the plugin) from http://sourceforge.net/projects/magpierss/files/ and uncompress it inside the 'magpierss' folder.
- Unzip the GetFeed plugin in your GetSimple plugins folder.

(Once the getfeed functions are first called, a 'getfeedcache' directory will be created in your GetSimple's data folder, to store feed cache files.)

Demos: http://webs.org.es/getfeed/

Usage
Insert calls to GetFeed functions in your template or components (e.g. sidebar)

Available functions:

getfeed_list_titles( FEEDURL [ , NUMPOSTS] )
sample function to display a list titles linking to source post.

getfeed_echo_posts( FEEDURL [ , NUMPOSTS] )
sample function, displays full posts. Customizable with CSS styles.

getfeed_output( FEEDURL , HTMLSTRING [ , NUMPOSTS ] )
customize feed output (this function is called by the first two)

Parameters:

FEEDURL is a string, the URL of the feed.

NUMPOSTS is optional: the maximum number of items to be displayed. Default is 0 = no maximum (all items)

In getfeed_output, HTMLSTRING must be a string containing HTML code, with the following keywords:

{{title}} - the post title
{{link}} - URL of the post
{{description}} - post body contents
{{date}} - date and time (if the script can get it)
{{pid}} - post ID. 1=first, etc. Maybe be useful for e.g. different styles (as used in sample function getfeed_echo_posts)

These keys/shortcodes that will be replaced by their correspondent values for each feed item.

News Manager 3.0: info + more
(This post was last modified: 2012-11-04 22:22:45 by Carlos.)
Visit this user's website Find all posts by this user Quote this message in a reply
mouffin Offline
Junior Member

Posts: 15
Joined: Mar 2010
2010-04-03 07:26:34
GetFeed - displaying RSS feeds [beta]

Greet work Carlos !

Sorry for my little english :rolleyes:

Thx for GS
Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-04-03 23:49:34
GetFeed - displaying RSS feeds [beta]

Thank you.
Not good code nor implementation, but... it works for me :-) and I thought it could be useful to someone else.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-04-03 23:53:16
GetFeed - displaying RSS feeds [beta]

I have not bundled MagpieRSS libraries with this (sort-of-)plugin because:

- I'm not sure if I have to include the full package, etc. (will read the GPL)

- I am thinking whether it would be better to put them on a -required- separate plugin. This way, other -future- plugins that use RSS feeds (e.g. a Twitter gadget) could include them without having duplicate libraries.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
mouffin Offline
Junior Member

Posts: 15
Joined: Mar 2010
2010-04-04 00:02:44
GetFeed - displaying RSS feeds [beta]

Hum i have a blank page in the plugins page admin, any ideas ?

I test a chmodd 777 in folder and file and the same.

Sorry for my little english :rolleyes:

Thx for GS
Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-04-04 00:23:28
GetFeed - displaying RSS feeds [beta]

You have to download MagpieRSS:
http://sourceforge.net/projects/magpiers...z/download
then unzip its contents into 'plugins/getfeed/magpierss' (create the subfolders if you don't have them)

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
mouffin Offline
Junior Member

Posts: 15
Joined: Mar 2010
2010-04-04 01:52:38
GetFeed - displaying RSS feeds [beta]

Thx a lot it's ok now Wink

Sorry for my little english :rolleyes:

Thx for GS
Find all posts by this user Quote this message in a reply
daguy Offline
Junior Member

Posts: 22
Joined: Jun 2010
2010-08-13 03:01:22
GetFeed - displaying RSS feeds [beta]

Hi I can't get the twitter code working, yet see its fine on yours! can u help??
Find all posts by this user Quote this message in a reply
Oleg06 Offline
Posting Freak

Posts: 1,243
Joined: Apr 2010
2010-08-13 05:34:08
GetFeed - displaying RSS feeds [beta]

I put the code
Code:
<? php
if (return_page_slug ()==' sample-blogsearch-feed ') (
  getfeed_echo_posts ('http://blogsearch.google.com/blogsearch_feeds?lr=&q =% 22getsimple% 22 & ie = utf-8 & num = 10 & output = rss', 10);
)?>
and did not see http://neowebtime.ru/0/index.php?id=rss
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-08-13 05:39:05
GetFeed - displaying RSS feeds [beta]

daguy wrote:Hi I can't get the twitter code working, yet see its fine on yours! can u help??
Did it work with any other RSS feed besides Twitter?

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-08-13 05:45:34
GetFeed - displaying RSS feeds [beta]

Oleg06,

The code you posted has lots of extra space characters, did you insert them to post it here?

You must also change the 'if' to match your page's slug. In your example URL it would be:
Code:
<?php
if (return_page_slug()=='rss') {
  getfeed_echo_posts('http://blogsearch.google.com/blogsearch_feeds?lr=&q=%22getsimple%22&ie=utf-8&num=10&output=rss',10);
} ?>

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
vipdesign Offline
Junior Member

Posts: 5
Joined: May 2010
2010-09-01 00:47:32
GetFeed - displaying RSS feeds [beta]

I tried this plugin but i have problem with displaying for Vietnamese (Unicode)

I already updated the code here in getfeed.php

#Tell Magpie to use UTF-8 encoding
define('MAGPIE_INPUT_ENCODING', 'UTF-8');
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');

define('GETFEED_DATE_FORMAT', 'M jS, Y'); // default date format

define('MAGPIE_CACHE_DIR', GSDATAPATH.'/getfeedcache'); // where to store MagpieRSS cache files
require_once GSPLUGINPATH.'/getfeed/magpierss/rss_fetch.inc';

Thanks for any help.
Find all posts by this user Quote this message in a reply
Zegnåt Offline
Posting Freak

Posts: 972
Joined: Aug 2009
2010-09-01 05:53:25
GetFeed - displaying RSS feeds [beta]

Magpie might understand it, but is your server configured to output UTF8 pages?

In Firefox, right click the page and choose “View Page Info”. There you can see what encoding your server is telling the browser to use.

“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-09-01 06:38:15
GetFeed - displaying RSS feeds [beta]

vipdesign,

Please post here or send me (forum email or PM) some sample RSS feed, to do some test.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
vipdesign Offline
Junior Member

Posts: 5
Joined: May 2010
2010-09-01 08:56:55
GetFeed - displaying RSS feeds [beta]

hi Carlos,

<p><?php
if (return_page_slug()=='test-new-vietnam') {
getfeed_echo_posts('http://www.thanhnien.com.vn//_layouts/NewsRss.aspx?List=&MainCat=%C4%90%E1%BB%9Di+s%E1%BB%91ng',15);
} ?></p>

you can test above code for vietnamese.

Thanks
Find all posts by this user Quote this message in a reply
Oleg06 Offline
Posting Freak

Posts: 1,243
Joined: Apr 2010
2010-09-01 16:32:57
GetFeed - displaying RSS feeds [beta]

why such things? http://neowebtime.ru/000/index.php?id=rss
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-09-02 08:14:41
GetFeed - displaying RSS feeds [beta]

vipdesign, Oleg06: Thanks for your comments, and for testing this plugin!

Please test this patched version 0.2 beta:
http://www.cyberiada.org/cnb/data/upload....2beta.zip

Oleg: I hope to fix in another revision those notices you get when debug mode enabled.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Oleg06 Offline
Posting Freak

Posts: 1,243
Joined: Apr 2010
2010-09-02 16:21:42
GetFeed - displaying RSS feeds [beta]

Thanks, it works http://neowebtime.ru/000/index.php?id=rss
Visit this user's website Find all posts by this user Quote this message in a reply
Rene Offline
Member

Posts: 131
Joined: Aug 2010
2010-09-17 21:08:35
GetFeed - displaying RSS feeds [beta]

Call me stupid Wink but how is a php file read with the following contents?
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title></title>
<link></link>
<item>
    <title></title>
    <link></link>
    <pubDate></pubDate>
    <description><![CDATA[]]></description>
</item>
</channel>
</rss>
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-09-18 00:48:54
GetFeed - displaying RSS feeds [beta]

Sorry, I don't understand your question.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-09-18 00:54:47
GetFeed - displaying RSS feeds [beta]

Minor update. GetFeed 0.3 beta:
http://www.cyberiada.org/cnb/data/upload....3beta.zip

Suppreses notices when debug mode on, reported by Oleg06.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Rene Offline
Member

Posts: 131
Joined: Aug 2010
2010-09-19 00:57:50
GetFeed - displaying RSS feeds [beta]

@Carlos

I want to read a php file with mentioned XML context. When I call this file with
Code:
getfeed_list_titles('http://www.domain.nl/file.php',15);
nothing happens, only a blank screen?
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2010-09-19 01:09:33
GetFeed - displaying RSS feeds [beta]

Rene,
Please enable GetSimple debug mode and let me know what errors you get; Or else, PM or e-mail me the URL, to do some test.

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Oleg06 Offline
Posting Freak

Posts: 1,243
Joined: Apr 2010
2011-02-16 06:17:35
GetFeed - displaying RSS feeds [beta]

Why do not the links? http://artelena-photo.ru/news
Code:
http://www.digital-photo.ru/null/news/foto/id/186133
Folder null here quite superfluous
Visit this user's website Find all posts by this user Quote this message in a reply
Carlos Offline
Posting Freak

Posts: 2,226
Joined: Mar 2010
2011-02-16 07:51:06
GetFeed - displaying RSS feeds [beta]

Oleg,

Sorry I don't understand.
Please PM or email me the feed URL

News Manager 3.0: info + more
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)

Contact Us | GetSimple | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication
Generate Leads from Documents vCard Hosting