FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 Idiots guide to using the scripts View next topic
View previous topic
Post new topicReply to topic
Author Message
zebrafactory



Joined: 03 Jan 2007
Posts: 6
Location: Perth, Australia

PostPosted: Wed Jan 03, 2007 10:21 pm Reply with quoteBack to top

I've been trawling and no matter I can't seem to get items with dates in the future to NOT display.

I tried the NOFUTUREITEM thing in both the URL of the general RSS2HTML call as well as in the HTML template itself.

I also tried doing the following in the HTML template without success.

~~~BeginItemsRecord~~~
<?php
$okayToDisplay = 0;

// Only find the time/date of an item if there was a PubDate
if ("~~~ItemPubDate~~~" != "" ){
$pubDateTime = strtotime("~~~ItemPubDate~~~");
$now = time();
if ((0 <= ($now - $pubDateTime)) {
$okayToDisplay = 1;
}
}

if ($okayToDisplay == 1) {
echo "<h3>~~~ItemTitle~~~</h3>";
echo "<p>~~~ItemDescription~~~</p>";
echo "<hr size="1" noshade="noshade">";
}
?>
~~~EndItemsRecord~~~

I have a project with 11 different feeds that are being integrated. If I was to go the FutureRSS route do I need to somehow integrate a separate PHP script for each XML file? How then do I apply my HTML template like in RSS2HTML? Do I use the new PHP script, the original XML and the HTML like in RSS2HTML?

Basically, I'm not too sure how to use the FutureRSS script as the instructions are a bit cryptic.

Feeling a bit thick at the moment.
View user's profileVisit poster's website
zebrafactory



Joined: 03 Jan 2007
Posts: 6
Location: Perth, Australia

PostPosted: Wed Jan 03, 2007 10:53 pm Reply with quoteBack to top

So... mucked it (and it worked) with Future RSS but not sure if it's the best way.

Essentially I renamed FutureRSS to 'genericnews.php' and entered the original XML file (genericnews.xml) in the appropriate place in the script. My RSS2HTML call then became:

http://www.mydomain.com/rss2html.php?XMLFILE=http://www.mydomain.com/genericnews.php&TEMPLATE=http://www.mydomain.com/template.html&MAXITEMS=X;

As mentioned before I have 11 feeds so I'm not too sure if there is a better way other than me cloning FutureRSS 11 times (?)

Not such a techhead so any help appreciated.
View user's profileVisit poster's website
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Thu Jan 04, 2007 6:15 am Reply with quoteBack to top

zebrafactory wrote:
I've been trawling and no matter I can't seem to get items with dates in the future to NOT display.

I tried the NOFUTUREITEM thing in both the URL of the general RSS2HTML call as well as in the HTML template itself.

I also tried doing the following in the HTML template without success.

~~~BeginItemsRecord~~~
<?php
$okayToDisplay = 0;

// Only find the time/date of an item if there was a PubDate
if ("~~~ItemPubDate~~~" != "" ){
$pubDateTime = strtotime("~~~ItemPubDate~~~");
$now = time();
if ((0 <= ($now - $pubDateTime)) {
$okayToDisplay = 1;
}
}

if ($okayToDisplay == 1) {
echo "<h3>~~~ItemTitle~~~</h3>";
echo "<p>~~~ItemDescription~~~</p>";
echo "<hr size="1" noshade="noshade">";
}
?>
~~~EndItemsRecord~~~

I have a project with 11 different feeds that are being integrated. If I was to go the FutureRSS route do I need to somehow integrate a separate PHP script for each XML file? How then do I apply my HTML template like in RSS2HTML? Do I use the new PHP script, the original XML and the HTML like in RSS2HTML?

Basically, I'm not too sure how to use the FutureRSS script as the instructions are a bit cryptic.

Feeling a bit thick at the moment.


Okay, the simplest place to start is with a very simple template and rss2html.php?buildURL. In there fillin your feed and use the sample template and check the "no future items" check box. After clicking on submit click on the test link.

If you are still having problems, we can help you more with the real URLs

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
zebrafactory



Joined: 03 Jan 2007
Posts: 6
Location: Perth, Australia

PostPosted: Thu Jan 04, 2007 9:48 pm Reply with quoteBack to top

Hi

Basically it's the situation where someone will be doing the various updates on a Monday. They might want to hold an article until that coming Thursday but won't be in front of the machine then to republish the feed.

I've managed to get the result I need using the following:

http://www.thermomix.com.au/beta/rss2html.php?XMLFILE=http://www.thermomix.com.au/beta/genericnews.php&amp;TEMPLATE=http://www.thermomix.com.au/beta/02-template.html&MAXITEMS=20;

Item 2 is set for a publication date of Jan 27.

The genericnews.php file is a clone of FutureRSS.php with a reference to the original XML file included therein.

The problem is that I have 11 separate feeds and I can't help but imagine that there has to be a more elegant solution than to use a clone of the FutureRSS for every XML file.

I tried mucking around in Javascript with the following but it's a bit like Latin for me --- The concept feels right but it doesn't work in 'reality':

~~~BeginItemsRecord~~~
<script type="text/JavaScript">
<!--
function checkdate() {

var pubWhen = ~~~ItemPubDate~~~;
var nowWhen = new Date();
var pubDateTime = pubWhen.getTime();
var nowDateTime = nowWhen.getTime();
var ShoworNo = nowDateTime - pubDateTime;

if (ShoworNo > 0) {
document.write('<h3>~~~ItemTitle~~~</h3>');
document.write('<p>~~~ItemDescription~~~</p>');
document.write('<hr size="1" noshade="noshade">');
}
}
//-->
</script>
~~~EndItemsRecord~~~

URL for that is:
http://www.thermomix.com.au/beta/rss2html.php?XMLFILE=http://www.thermomix.com.au/beta/genericnews.xml&amp;TEMPLATE=http://www.thermomix.com.au/beta/03-template.html&MAXITEMS=20;
View user's profileVisit poster's website
zebrafactory



Joined: 03 Jan 2007
Posts: 6
Location: Perth, Australia

PostPosted: Thu Jan 04, 2007 9:50 pm Reply with quoteBack to top

Some how got mucked up by C + P

Links should be:

http://www.thermomix.com.au/beta/rss2html.php?XMLFILE=http://www.thermomix.com.au/beta/genericnews.php&TEMPLATE=http://www.thermomix.com.au/beta/02-template.html&MAXITEMS=20;

&

http://www.thermomix.com.au/beta/rss2html.php?XMLFILE=http://www.thermomix.com.au/beta/genericnews.xml&TEMPLATE=http://www.thermomix.com.au/beta/03-template.html&MAXITEMS=20;
View user's profileVisit poster's website
zebrafactory



Joined: 03 Jan 2007
Posts: 6
Location: Perth, Australia

PostPosted: Thu Jan 04, 2007 11:39 pm Reply with quoteBack to top

http://www.thermomix.com.au/beta/rss2html.php?XMLFILE=http://www.thermomix.com.au/beta/genericnews.xml&TEMPLATE=http://www.thermomix.com.au/beta/02-template.html&MAXITEMS=20&NOFUTUREITEMS=1;

Don't know why it didn't work before, but it seems to work now. As most of the users will be using the website rather than Readers then that fulfils the requirements.
View user's profileVisit poster's website
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Fri Jan 05, 2007 8:06 am Reply with quoteBack to top

zebrafactory wrote:
http://www.thermomix.com.au/beta/rss2html.php?XMLFILE=http://www.thermomix.com.au/beta/genericnews.xml&TEMPLATE=http://www.thermomix.com.au/beta/02-template.html&MAXITEMS=20&NOFUTUREITEMS=1;

Don't know why it didn't work before, but it seems to work now. As most of the users will be using the website rather than Readers then that fulfils the requirements.


Glad it works.

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
vickywebworld



Joined: 29 Dec 2009
Posts: 1

PostPosted: Tue Dec 29, 2009 12:54 pm Reply with quoteBack to top

Is this code still working

i will like to use it for my site

http://ultrasoundeducation.blogspot.com/

_________________
http://ultrasoundeducation.blogspot.com/
View user's profile
FeedForAll Sales



Joined: 10 Jun 2009
Posts: 252

PostPosted: Tue May 04, 2010 9:04 am Reply with quoteBack to top

The FutureRSS.php script is still working. More information is at http://www.feedforall.com/future-rss.htm

Documentation is at http://www.feedforall.com/forum/viewtopic.php?t=1015

_________________
FeedForAll Sales
View user's profileVisit poster's website
jerryTheJerry



Joined: 22 Aug 2011
Posts: 1
Location: San Francisco, CA

PostPosted: Mon Aug 22, 2011 7:25 pm Reply with quoteBack to top

I know this is an easy one, but I'm new to this stuff and am trying to figure out how to add links to a few RSS feeds on my PHP site, Bay area junk removal
. Can anyone point me in the right direction?
View user's profileSend e-mailVisit poster's website
Tech Support



Joined: 27 Aug 2004
Posts: 2783

PostPosted: Wed Aug 24, 2011 12:47 pm Reply with quoteBack to top

The best way to start would be to download our program FeedForAll and give the trial version a shot. It'll take you through creating and uploading an RSS feed to your website.

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
simonwalker



Joined: 18 Aug 2016
Posts: 1
Location: Austin, TX, USA

PostPosted: Thu Aug 18, 2016 4:44 am Reply with quoteBack to top

The script didn't work first but finally the script worked.

http://www.feedforall.com/future-rss.htm
View user's profileVisit poster's website
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme