Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 08:38:31 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155552 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: RSS News Feed  (Read 1065 times)
david doc watson

Offline Offline

Posts: 49



« on: September 30, 2011, 02:28:06 PM »

Hi,

I've downloaded and installed the RSS New Feed module (rssnewsfeed_1.1.1.z ip) and installed it on my installation - WB2.8.1 Revision 1287.

I created a code block on the news page and entered the code: ShowRssNewsFeed();

When viewed, the page displays the logo, when clicked it generates a news feed page but the page contains no news item (there are two on the page).

The site is not yet live but the page can be viewed here:

http://81.19.183.3/~hellenic/pages/news.php

Does anyone have any bright ideas?

David "Doc" Watson
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6977


WWW
« Reply #1 on: September 30, 2011, 06:58:27 PM »

What is wrong with the WB News internal newsfeeder? Try http://81.19.183.3/~hellenic/modules/news/rss.php?page_id=xx (replace xx with the ID of your newspage)

Example: http://www.mini-rc-tutorials.com/modules/news/rss.php?page_id=35

The module you refer to is 3 years an a couple of WB Versions old ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

david doc watson

Offline Offline

Posts: 49



« Reply #2 on: October 02, 2011, 01:18:36 PM »

Hi Klaus,

Thanks for your advice.

I've created a link as you suggested (the news page is id=70)

http://81.19.183.3/~hellenic/modules/news/rss.php?page_id=70

As you can see, it manages to pull across the page title but doesn't seem to pull over the news items.

The news module is part of the WB2.8 core News v3.5.

Is there some documentation somewhere for this module - is there something else I need to do to make the rss work?

Thanks in advance.
Logged
david doc watson

Offline Offline

Posts: 49



« Reply #3 on: October 02, 2011, 01:22:30 PM »

I've looked at the source of the page that is generated and the <items.> apear to be there - the source look just the same as your Neues page from the RC Tutorials site.
Logged
Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #4 on: October 02, 2011, 04:42:35 PM »

What is wrong with the WB News internal newsfeeder? Try http://81.19.183.3/~hellenic/modules/news/rss.php?page_id=xx (replace xx with the ID of your newspage)

Example: http://www.mini-rc-tutorials.com/modules/news/rss.php?page_id=35


Klaus

Thanks for mentioning this... been fighting with News- and SiteRSS for some weeks...
but this is just is for most sites more then enough...

1 question: Is it possible to add more page id's news of more pages can be combined?...

Maybe this info can be placed on more prominent pace on the websitebaker website... even
google can't find about how to do this... tho... it's on the forum now Wink

Cheers..
« Last Edit: October 02, 2011, 04:48:06 PM by tez » Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
badknight
Security Team

Offline Offline

Posts: 246



WWW
« Reply #5 on: October 02, 2011, 04:54:13 PM »

Thanks for mentioning this... been fighting with News- and SiteRSS for some weeks...
but this is just is for most sites more then enough...

1 question: Is it possible to add more page id's news of more pages can be combined?...

Maybe this info can be placed on more prominent pace on the websitebaker website... even
google can't find about how to do this... tho... it's on the forum now Wink

Cheers..


Without modifying the file, only the contents of the page_id is in the output..

but you can add the group_id, so you only get news from the group xxx Wink
Logged

Ich würde gern die Welt verändern, doch Gott gibt mir den Quellcode nicht...
Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #6 on: October 02, 2011, 06:29:00 PM »

Well been busy for it for some time now... but the group_id is nice... but not what i'm looking for...
as group_id's are not 'sitewide'.. but only apply on one page...

Would love to have 2 RSS buttons, one for each language, but both with all news content from
that language... so multiple news sections... thinking of creating one 'news-page' per language
with all sections, and section-picker them on the right places... at least all news is one page Wink
A big con is that the rss-backlinks will link to the 'combi page'...

And another point... the RSS seems without any pub-date for the items.. it look slick Wink but re-using/parsing
this feeds gives several problems, gonna try work this out.
Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #7 on: October 02, 2011, 11:58:00 PM »

Had some time and modified the rss.php (from the news module) to a validated RSS 2.0..

(at least they say so lol)...
http://www.validome.org/rss-atom/validate?lang=en&viewSourceCode=1&url=http://demosite.vana
llerlei.com/modules/news/rss.php%3fpage_id=1&version=rss_2_0


With... GMT Date, some elements from RssNewsFeed (has been incarnated again...). The extra tags and date function was important for me as the RSS needs to be 'complete' to parse it again for syndication... so here it is.. feel free to add.. next stap is to list all news items from whole site..

Result:
http://demosite.vanallerlei.com/modules/news/rss.php?page_id=1 and
http://demosite.vanallerlei.com/modules/news/rss.php?page_id=38

the url sometimes (....?...) redirects to the homepage.. someone ideas...?

Download is attached with post

Cheers...
« Last Edit: October 03, 2011, 12:50:17 AM by tez » Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6977


WWW
« Reply #8 on: October 03, 2011, 12:03:57 AM »

The feed is also valid without these date/timestamps ... but they might be a good addition Cheesy
http://www.validome.org/rss-atom/validate?lang=en&url=http://www.mini-rc-tutorials.com/modu
les/news/rss.php%3fpage_id=35&version=rss_2_0

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #9 on: October 03, 2011, 12:11:56 AM »

The feed is also valid without these date/timestamps ... but they might be a good addition Cheesy
http://www.validome.org/rss-atom/validate?lang=en&url=http://www.mini-rc-tutorials.com/modu
les/news/rss.php%3fpage_id=35&version=rss_2_0

cheers

Klaus

Yeh true... but it was a minimal.. but solid and valid base Wink but I got problems with reparsing the rss.php cause
the lack of a prober date and the date-script I took from rss-news-feed I also had to mod.. so together.. just what I needed and maybe for others also good src stuff

Cheers...

Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
david doc watson

Offline Offline

Posts: 49



« Reply #10 on: October 03, 2011, 08:38:28 AM »

Hi Guys,

Has anyone worked out why my news items aren't being displayed? I tried the new version of rss.php hat was posted and this hasn't helped me. I really need to sort this out so any help would really be appreciated.

Thanks

Page: http://81.19.183.3/~hellenic/pages/news.php
Feed: http://81.19.183.3/~hellenic/modules/news/rss.php?page_id=70
Logged
Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #11 on: October 03, 2011, 07:36:37 PM »

Hi Doc,

yes noticed the problem but...

it should work...  rolleyes otherwise try to reinstall news 3.5 module and the new rss.php,
and start with basic-news items try to see what it does... one thing.. did give your database
fields a prefix with the install process?.

Cheers,

Tez
« Last Edit: October 03, 2011, 07:39:00 PM by tez » Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
david doc watson

Offline Offline

Posts: 49



« Reply #12 on: October 07, 2011, 07:56:50 AM »

Hey Tez,

No prefix on the database - just the standard tables with the out-of-the box names.

Thanks

Doc
Logged
Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #13 on: October 08, 2011, 05:58:22 PM »

Hi... pretty strange it still doesn't work, did u already tried to make a
new page, with one item on it and check it again..? Or reinstall the news module again?

Cheers,

Tez
Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #14 on: October 11, 2011, 10:49:36 PM »

Has anyone worked out why my news items aren't being displayed?

Looking at the feed in "source-view" shows there is a feed being sent.

The problem might be in the fact that some fields have a & in them.
In this case, these are taken from your website title. (Copyright 2011, The Hellenic Centre London | Venue Hire & Greek Cultural Centre)

Try replacing the & with &amp; in your website title and try again.
Logged

Professional WebsiteBaker Solutions
david doc watson

Offline Offline

Posts: 49



« Reply #15 on: October 12, 2011, 08:00:06 AM »

Ruud, you are an absolute star! That has solved the issue - thank you so much.
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #16 on: October 12, 2011, 09:02:02 AM »

@Tez

To get all newsitems from the website you need to change some code

first no need to redirect if no page is given, it could be what we want

change:
Code:
// Check that GET values have been supplied
if(isset($_GET['page_id']) AND is_numeric($_GET['page_id'])) {
$page_id = $_GET['page_id'];
} else {
header('Location: /');
exit(0);
}
to:
Code:
// Check that GET values have been supplied, no need to redirect anymore if there is no page given, it could be  what we want ;)
if(isset($_GET['page_id']) AND is_numeric($_GET['page_id'])) {
$page_id = $_GET['page_id'];
}

next give more options to db query, allow all pages, a page all groups, a group
change:
Code:
//Query

if(isset($group_id)) {
$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id=".$group_id." AND page_id = ".$page_id." AND active=1 AND ".$time_check_str." ORDER BY posted_when DESC";
} else {
$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id=".$page_id." AND active=1 AND ".$time_check_str." ORDER BY posted_when DESC";
}
to:
Code:
//Query  Build extra 'where' clause when a page or group is given
$page_group_check = '';
if(isset($page_id)) {
$page_group_check .= ' AND page_id='.$page_id;
}
if(isset($group_id)) {
$page_group_check .= ' AND group_id='.$group_id;
}
$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE active=1 AND ".$time_check_str." ".$page_group_check." ORDER BY posted_when DESC";

Didn't test this but it should work and it give you new pointers to achieve what you are after.

If you need RSS all pages per language you need to query the table pages and query each news item for that page with given language. Could be done. Could help if needed.
Would be something like:
make variable for language like rss.php?language=EN
test if language is given, if language is given query table pages for all pages with that language
per page query newsitems and show items

Wouldn't be hard, but I don't have multilanguage websites Wink


Have fun,
John.

« Last Edit: October 12, 2011, 09:07:49 AM by pcwacht » Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Tez Oner

Offline Offline

Posts: 50



WWW
« Reply #17 on: October 21, 2011, 04:56:59 PM »

Hey John,

thanks a lot.. yes this will help much essp the next stap, a full site RSS and yes the language
thing would be very nice also to have it automatically Wink

Cheers,

Tez
Logged

Tez | vanAllerlei
--------------------------------
Media • Design • Strategy
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!