I am looking for some advice on custom web pages please.
I’m leaning towards letting WD generate the same web page that it always generates but then having a set of PHP pages that read the WD-generated page as a data stream and assemble the pages that I really want from that page. I think it might be a more stable solution like that and easier to test during the build cycle as I don’t need WD to do anything for me to see what my new pages look like.
The alternative is to use WD’s built-in template mechanisms and update those templates. I think that’s harder to test as they are in TXT format and so can’t be readily tested in an IDE such as Zend. You’d have to keep testing with them as PHP then rename them back to TXT to get WD to generate the next set of files etc.
Have you come across the Weather Display/PHP/AJAX Website Template Set that is very popular among WD users (including myself) and assembes pages from files that WD produces (it uses the same clientraw files that WDL uses, plus some more).
Well worth a look, even if you then decide to ‘roll your own’.
I’m just going through the process of re-vamping my whole site and I’ve decided to use the wxlocal*.html template method to create wx*.html pages for upload. According to Briam Hamilton you can create up to 40 different pages using this method (more than enough for me). I created a template which I called wxlocal.html and inside I coded for the data I wanted to display using the variable names from taglist.txt. For each page of different data I created another page (wxlocal2.html, wxlocal3.html etc) I did a couple of tests at the weekend and it seems to work fine. Qudos to Brian!!
I can’t be absolutley sure that I’ve not made any errors until my revamped site is live and on the web but it’s looking good.
Peter,
if you’re thinking about using multiple wxlocaln /WXn type of pages, have a look at my site. A couple, maybe 3 or more years ago, i did this to mine, pages to report and display almost everything WD produces. It was a tedious, but not difficult effort to set up the CSS and each WX local page, and it’s remained pretty much as-is for a couple of years. I like it, but truth be told, I get very few hits on most of the pages - some I think I’m the only visitor. If you’re interested, I can zip up my stuff and send on to you.
As an IT professional of long standing, I was always taught never to write something if someone else has written it already.
Excellent advice that you gave me above!!! It took a bit of fiddling as I wanted to put it in a different directory structure but nothing other than sticking the relative path in front of a few files. It’s almost finished now - I just need to find out where to get good radar images from, and to add in my videos for the day and last hour but that should be really easy.
Happy to help.
The real heroes are the team that put those templates together - and continue to develop them - e.g. the fairly recent Web Cam Images History script & template plugin.
I quite agree. And to that end I intend to make a financial donation - my time is money and they’ve saved my time. Also, in the ABOUT page after explaining about my weather page I left in place all of the credits that were in the template - I always believe in giving credit where it’s due.
I would make one simple suggestion for improvement: I would have a setting to say where your WD files are stored. I don’t think it’s reasonable to expect that someone will put these templates into the root of their web site. Yes they probably would if their site only contains weather, but my site contains loads of things and weather is only one aspect. I like to separate out everything to do with weather in one folder and it only contains my own pages and subfolders, one of those subfolders is dedicated to WD/WDL and the other is dedicated to my tailored version of these templates.
Some of the individual PHP files do have a setting to say where WD is located relative to the PHP file, and some don’t. What is needed is one entry in the settings.php that gets used everywhere.
Anyway, I need to give the feedback in the right place and this isn’t it - but at least here others know that it was easy and what kind of changes I needed to make.