LexfordPARC

Our family website

Eastbourne -
Temp.  ° - Feels like  °
Relative Humidity %
Wind. 

About Us

Lexfordparc is an amalgamation of Leicester, Sussex and Oxfordshire representing where we were born and Paul, Alison, Rebecca and Christopher.

We are fortunate to live by the beautiful south coast of England just outside of Eastbourne. Our village is called Stone Cross and has a windmill for a landmark.
<   September 2010   >
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   

Music we're listening to

Categories

  • Index page
  • Computing
  • Environment
  • Family
  • General
  • Home Automation

Search

Statistics

One small change

Posted by: Paul

If anyone is currently viewing the webpage you may have noticed the addition of weather information for where we live in the top right-hand corner of the header?

It is a small addition that was working on my home server but not on my hosted website. Basically I use a web hosting package from Zen Internet, they also provide our broadband connection. The Linux based web hosting server was running PHP version 4.x and the Nucleus plugin needed libaraies only included in PHP 5.x Fortunately Zen have started upgrading the underlying servers and cPanel interface, Zen Linux Upgrade, the new platform allows PHP 5.0 as well as many other benefits over the previous version. I raised a support ticket to have my domain moved to a new serer rather than wait for my existing cPanel server to be upgraded. I requested this on Tuesday and by Thursday I was being hosted on the new platform. Nice one Zen.

So why did I need PHP 5.x? Well the weather information as I said comes from a Nucleus plugin, NP_WeatherReport, which pulls an XML feed from The Weather Channel. It uses the SimpleXML library that is part of the core php 5.0 release. Really didn't fancy re-writing the plugin to do a page scrape especially as I am new to PHP.

One problem I did have to resolve was the original plugin used the call, file_get_content which is considered a security risk by Zen Webhosting, they aren't the only ones judging by the number of hits on Google. So I had to find another call that was supported, thankfully this was in the form of the CURL library. I also found a nice blog entry explaining the basic use of CURL to grab an XML feed.

So then it was just a case of updating the plugin to use CURL instead of Get_Content.

A small addition to the site but quite a lot of changes to implement!

12 July, 2008

« Prev item - Next item »
-------------------

Comments

Posted by: Ed Davies05 August, 2008 - 13:48:26

You might like to know that your weather information appears under the site title in the banner line in Firefox 2.0 & 3.0, Opera 9.50 and Konqueror 3.5.8 on Linux and Firefox 1.07 on Windows XP.

It appears, as you intend to the right of the title text, in Internet Explorer 6.0 but I believe this is a bug in IE. The reason is that the title and subtitle text is positioned absolutely so, according to the information I have (CSS Pocket Reference, 2nd Edition, Eric A. Meyer), should not be included in the width of the containing element. Consequently, the left hand table cell in the title row is only a few pixels wide and the weather information is displayed pretty much immediately to the right of this in the standard compliant browsers.

Maybe there's an updated version of the stylesheet available.

Leave comment




© 2008 lexfordparc.co.uk | Design by: styleshout | Ported to Nucleus CMS: Suvoroff        Home |  Archive |  RSS Feed