plaintext-rss.php help please

Hi folks

I would like this script to output only 1 item, i.e. the 1st forecast day which is normally today’s

How can i modify the script to do this please?

The reason i need this is because on my facebook page i us a RSS app that grabs my forecast
and places it on my wall, sadly the app aint great as it jumbles up the the order of the days
such as, monday, wednesday, saturday, tuesday, never in blooming order so, if i can get the
script to just output 1 day then this would be great… :slight_smile:

Hey Bashy,

All you need to do is change line 155 from

for ($i=0;$i<count($WXSIMday);$i++) {

to

for ($i=0;$i<1;$i++) {

That will give you the first box, I have mine set for 2 to give them a today and tonight forecast.

If your using RSS graffiti I haven’t had any problems with it and it seems to work good.

-Dennis

Hi Dennis, Yep its RSS Graffiti that im using, im using it here and you can see that its added Saturday
instead of tonights forecast lol, unless ive set something wrong in the RSS Graffiti settings?

http://www.facebook.com/pages/Northants-Weather/124626317605058

Thanks ever so much for the edit though, i can use this till their support gets back to me :slight_smile:

Hi again Dennis, yours looks great on your FB page, I just tested your RSS in graffiti and
i get the same issue so its deffo a graffiti problem on my page anyway…

I have noticed you’ve got you current conditions posted also, My current conditions
rss is different to yours, all your items such as temp, wind, hum and so on are all in one
item but mine are separate (turn it off in graffiti for now) is yours a different rss script
to mine as seen here http://www.northantsweather.com/rssfeed_CurrentObs.php or
do i play with the settings in graffiti to get it like yours?

Just had a thought, are you using the twitter side things of it to for your current obs?

Just found the details, this is how it posted the forecast yesterday

1 day, 8 hours ago Published story ‘This afternoon, Mostly Cloudy, High: 2C’ on your wall. Facebook post ID: 124626317605058_124628850938138. More info.
1 day, 8 hours ago Published story ‘Sunday, Partly Cloudy, High: 10C’ on your wall. Facebook post ID: 124626317605058_124628827604807. More info.
1 day, 8 hours ago Published story ‘Tuesday, Mostly Cloudy , High: 1C’ on your wall. Facebook post ID: 124626317605058_124628810938142. More info.
1 day, 8 hours ago Published story ‘Friday, Freezing Rain , High: 6C’ on your wall. Facebook post ID: 124626317605058_124628790938144. More info.
1 day, 8 hours ago Published story ‘Saturday, Mostly Cloudy, High: 12C’ on your wall. Facebook post ID: 124626317605058_124628774271479. More info.
1 day, 8 hours ago Published story ‘Tonight, Partly Cloudy , Low: -4C’ on your wall. Facebook post ID: 124626317605058_124628757604814. More info.
1 day, 8 hours ago Published story ‘Tuesday night, Mostly Cloudy , Low: -2C’ on your wall. Facebook post ID: 124626317605058_124628730938150. More info.
1 day, 8 hours ago Published story ‘Thursday night, Rain and Snow , Low: 0C’ on your wall. Facebook post ID: 124626317605058_124628710938152. More info.
1 day, 8 hours ago Published story ‘Thursday, Fog a.m. , High: 4C’ on your wall. Facebook post ID: 124626317605058_124628697604820. More info.
1 day, 8 hours ago Published story ‘Sunday night, Fog , Low: -1C’ on your wall. Facebook post ID: 124626317605058_124628674271489. More info.
1 day, 8 hours ago Published story ‘Saturday night, Chance rain, Low: 8C’ on your wall. Facebook post ID: 124626317605058_124628634271493. More info.

Hey Simon. I use to use rss graffti also to post my data to my wall, and had the same issues you are having with it. i switched to “smart twitter” a few months ago, and its been working great ever since.

I used the current obs script like that, but instead of it outputting a bunch of mini RSS feeds, I combined them all into one. Like so,

PrintRSSItem("Current Conditions in East Masonville @ ". $rssdate , ucwords($WD['WeatherDesc']).'; Temperature: '.$WD['TempF'].'°F, Wind: '. $WD['WindDirectionTxt'] .' '. $WD['WindAvgSpeedMph'] .'mph -> '. $WD['MaxGust'] .'mph, Barometer: '. $WD['BarometerInch'] .'inHg, Rain Today: '. $WD['DailyRainInch'] .'in, Humidity: '. $WD['Humidity'] .'%',"","");

I am using that rss, its called http://eastmasonvilleweather.com/RSS/cr2rss.php and I have it in RSS graffiti to post every other hour using that URL as my feed URL.

Hopefully I answered all your questions,
-Dennis

Thanks Mark, I dont use twitter at present and it looks like that app is only for twitter?

Hi Dennis, thanks for the help, I think i got it somewhere close now, I aint figured out how to
have just the current conditions show with no link and have the title linked only, like in yours
only this part is linked Current Conditions in East Masonville @ Wed, Jan 5 2011 10:28 AM EST
then the actual conditions are not linked, does that make sense lol? Im confused now…

Sorry Simon,

I didn’t show the whole code only the business end.

Here is the code and the important parts that I am using. http://eastmasonvilleweather.com/downloads/CurrRSS.zip

The original code is here http://discourse.weather-watch.com/t/30573

Hopefully to help with the confusion,
-Dennis

Thats fantastic, thank you very much, the current obs is working great now, it looks so much
better like that :slight_smile:

With regards to the issue with the forecast days being jumbled when using graffiti, not heard anything
back from them yet, hopefully soon…

Still not heard back from graffiti, also social rss on FB throw up the same issue
so i ran the rss through feed validator and its thrown up a few issues, im wondering
if this is causing my problem on FB?

Could some one take a gander please?

http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.northantsweather.com%2Fplaintext-rss.php

Not even trying to validate now, says its not a feed :frowning:

Simon,

Check your site, it’s gone!! 8O 8O 8O

It’s replaced with one of those domain parking pages.

George

Looks ok to me?

Simon… see attached


Where do you see that?

When you go to your page, thats what it shows. try clearing your temp internet files and cookies then you should see it too.

Oh poo, thanks guys, i didnt get a warning email about it, best try to fix that quick lol

Whoa, that’s bad 8O

isnt it once a site is parked, its easier to get a new domain than to get the old one back? Hopefully thats not the case for Simon.

Yeah, ya not kidding, its my own darn fault, :oops: good thing is its held for about 29 days, downside is
its through a reseller account i set up and they need a minimum of $100 to refill the account, not
got that at present and im about 20 cents under the $9 needed to renew pmsl…

Im waiting for support to get back to me cause there is a way around it but i cannot do it until
the domain is active, im hoping they will sort it, but i got a bad feeling they will stitch me and say
i have to refill the account because the domains expired…

Will just have to wait and see… thank god its safe for a mo though :slight_smile:

Normally Mark, but im hoping its safe through this

Currently, we offer a non-guaranteed 29-day grace period for renewal for many TLDs. Each registry has different rules for their grace periods. There is no guaranteed grace period.

“non-guaranteed 29-day grace period” that doesn’t sound very encouraging :frowning: