Page 1 of 3

iPhone Webpage Question

Posted: Tue 10 Jul 2012 7:06 pm
by SJG1976
Can someone have a look at my iPhone Page please?

http://www.vp1.cm2weather.co.uk/iPhone/

It seems to display ok on an iPad and an iPod touch, but when I click on today, I though I'd be able to click on weather to get back to the main index page, or is this not how it's meant to work?

I seem to be getting more and more visits on the iPhone pa of my website now, so want to improve it some more if possible.

Also seem to have the same on the original site as well.

http://www.cm2weather.co.uk/iPhone/

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 8:46 pm
by gemini06720
I (as well as many other users) would really appreciate if your messages were signed... ;)

With that written...

It appears the script (by David Jamieson) you are using might not be installed properly - I would even suggest that you install the script by itself, without all the 'garbage' (commercial) stuff, until you get the script working properly... :roll:

The [link removed] script has been available to my users for almost 2 years - true, as is expected from me, I have made some modifications to the original script but I only slightly modifications to the required templates (unfortunately, I can only test the script with Safari as I do not and will not buy an Apple products).

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 8:51 pm
by SJG1976
Ok,

Thanks for looking.

Sorted it out now, it was where I was trying to add a cookie control part on there.

Stupid legislation...

Anyway, seems to be working now.
Thanks for looking



Steve

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 8:57 pm
by duke
Your cookie pop up script is not working as it was intended.

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 9:38 pm
by SJG1976
Thanks Duke,

Just can't seem to get it working.

I seem to have a slider bar on there.

Will have to have a play around another day, given up again for now.
Tempted to do a Similar page to what you have done..




Steve

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 9:55 pm
by gemini06720
Steve, I have been planning on starting a new message thread where I would go through the steps of converting the Cumulus 'standard' HTM templates (pages) into PHP templates. That might be the proverbial 'kick in the posterior' to get you going with PHP 'en route' to pages similar to those produced by Mark... ;)

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 10:35 pm
by SJG1976
Thanks Ray,

I've keep thinking of re-designing the whole site at the moment, but really need a test server (locally) that I can play with.

I've started on the Saratoga weather templates, but I've hacked it up so bad it needs a lot of work.

Only got my SteelSeries Gauges lined up better the other night, but just don't seem to get the time lately to do much.

And also not being able to code doesn't help either :bash:

I'd like to pull some data from the metoffice datapoint site using XML or JSON

Had a look at th W3Schools Tutorials for a while and got lost.

If I ever get round to it, I'll build a test server and can try pages out on that and then put them all live, but a steep learning curve for me.

As if I can break a cut and paste script, I can't see me starting a site from scratch at the moment.

Just out of interest, how do you all go about designing a new template?

Is it on paper first, and then code, or straight to the coding?


Steve

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 10:43 pm
by SJG1976
Just had a look at youriphone pages, very nice indeed.

I gather as I'm already uploading php webtags, I just need to learn how to format the pages now.

Steve

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 11:16 pm
by gemini06720
Steve, technically, if one wants to design a web page from 'scratch' (and do not know if that expression is familiar with people outside North America :? ) one should start that design on a piece of paper. But, now-a-day, no one starts (or needs to) from 'scratch' with the Internet availability of so many free and paid-for basic templates - there are probably millions of templates available out there on the Internet... :mrgreen:

Before you go any further 'hacking' templates, you need to download and install XAMPP, an Apache distribution containing MySQL, PHP and Perl - it is available for Windows, Linux, Mac OS X and Solaris - XAMPP is also free of charge... ;)

Once XAMPP has been installed on your computer, running XAMPP 'turns' your computer into a local hosting server. Having a local hosting server makes it easier to create, modify and test templates without having to upload them first - instead of using a link such as 'http://www.cm2weather.co.uk/index.htm' to access your main page, you would use a link such as 'http://localhost/index.htm' to access the same page on your local XAMPP server... ;)

Steve, a few years back, I started learning PHP using Ken True's 'PHP/AJAX Website template set' (known then as the Saratoga templates). My first modifications were simple - I then tried for more drastic modifications - eventually, I got more comfortable with PHP - with a bit of assistance from Ken, I even produced a set of canadian bilingual templates.

So, Steve, do not expect everything to be correct/right the first time and all the time - PHP has (needs) to be experimented with before one gets comfortable with PHP. :)

Re: iPhone Webpage Question

Posted: Tue 10 Jul 2012 11:30 pm
by SJG1976
Thanks for the encouraging words,

I've was planning on getting an old PC and using that as a server to "test" on

I think they only changes I've made so far to Kens templates are change the colours a bit, and set the WU Forecasts up....

I don't hope to just cut and paste all the templates, it's nice to learn as you go along, tousle with doing it on a live server on the web everyone else can see your mistakes as well :x

Anyway FWIW my php pages are at www.vp1.cm2weather.co.uk/wxindex.php

And the OS one is at www.cm2weather.co.uk/wxindex.php

Only the other day I learnt about htaccess files, which was exciting for me, so I could get the php page as the index.

Since removing all the website data an uploading it again that another thing I've not got round to putting back yet.


Thanks for he heads up on the XAMPP I'll give that a go tomorrow....

Well bedtime for me, got to go back to VLANs and Faulty network cables tomorrow at work... :bash:



Steve

Re: iPhone Webpage Question

Posted: Fri 13 Jul 2012 8:32 pm
by SJG1976
Finally got round to installing XAMPP

Had a bit of trouble getting it to work on Windows 7 stupid UAC....
And have set up a Dummy Copy fom Laptop A where the weather software runs to Laptop B where the XAMPP SofAtware is.

I've out a copy of my vp1 website onto here now, for testing.

For some reason, when I try going to the http://localhost I dont get anything

If I do a http://localhost/index.htm I get the old website data, but it doesn't seem to like my index.php page.

Now for the fun bit, wipe all the old website and start a fresh.

Any ideas of a good starting point?


Should I just re-download the Saratoga templates, and start from there?


Thanks for the heads up on the XAMPP software, should make testing much easier.

Re: iPhone Webpage Question

Posted: Fri 13 Jul 2012 10:45 pm
by gemini06720
SJG1976 wrote:Finally got round to installing XAMPP
Good first steps, Steve...
SJG1976 wrote:And have set up a Dummy Copy fom Laptop A where the weather software runs to Laptop B where the XAMPP SofAtware is.
Are the two computers connect to a local network? That would make it easier if both computers were on the same (internal) network - drives on one computer could become a 'mapped' drives on the other computer... ;)
SJG1976 wrote:I've out a copy of my vp1 website onto here now, for testing.

For some reason, when I try going to the http://localhost I dont get anything
The question is 'where have you copied the templates (files) required for the creation of the web site"? I, obviously have your answer - in an area that is not accessible by the server software... ;)

A quick lesson on server software... For safety reasons, only one of the server directory (and sub-directories) can be accessed through a browser or a FTP software, the remaining directories being invisible to any browsers/FTP software. For XAMPP, by default, the Apache server software will only give access to the 'htdocs' 'web' directory ('web' as in accessible from a browser or an FTP software). So, if you have installed XAMPP on your 'C' drive, then the 'web' directory would be 'C:\xampp\htdocs'. Any templates (files) used for the production of a web page have to be located inside that directory.

But, before you start installing everything into the 'C:\xampp\htdocs' directory, I will tell you to IMMEDIATELY STOP! Many many many years ago, as I started getting involved with the Internet, I had an excellent instructor who kept repeating the same important advice "do not install any of the web templates into the root directory"!

The root directory is the top-most directory a software or, in the case of a web server, the top-most directory a browser can access. By default, with the XAMPP package (and the default setting of the Apache server), the root directory is called/named 'htdocs'.

May I suggest that you immediately create a new sub-directory, such as 'vp1' for example - the directory tree structure will thus be 'C:\xampp\htdocs\vp1' - all the templates and directories you have copied over from you other computer will now have to be moved into the 'vp1' sub-directory.

Once you have moved all the templates (and the required sub-directories) into the 'vp1' directory, then you can point your browser to

Code: Select all

http://localhost/vp1/
SJG1976 wrote:Now for the fun bit, wipe all the old website and start a fresh....

Should I just re-download the Saratoga templates, and start from there?
DO NOT DO THAT - deleting everything and starting anew is NOT the solution to solving a problem, any problems!! :evil:

One does not learn anything by starting again and again - one learns something by trying to find a solution to what is causing the problem, not by deleting everything and starting again - the solution to the problem could be as simply the wrong name being used, a missing semi-colon, as you will soon find out with PHP... 8-)

In order to better learn PHP, I STRONGLY recommend that you activate the PHP debugging functions by placing the following at the beginning of every PHP templates (files):

Code: Select all

<?php
#
#  templatename.php - Last modified: 15 Jul 2012 @ 12h34 <== time the template was last modified
#
##############################################################################################
# Template Group Name
##############################################################################################
#
#   Project:    Weather Templates
#   Module:     templatename.php
#   Purpose:    Purpose of the template
#   Authors:    Author's name <author_sitename.com>
#
#   Copyright:  (c) 2012 Author's Name
#
##############################################################################################
#
//error_reporting(E_NOTICE);
//error_reporting(E_ERROR);
error_reporting(E_ALL);
//error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
//error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 1);
//ini_set('log_errors', 1);
//ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
#
##############################################################################################
?>
The above bit of code/text is multi-purpose, such as identifying the template, its purpose, the last time it was modified, and the original author(s) and whomever has been involved with the development of the template.

The above bit of code/text also activates the full debugging functions of PHP (in the line "error_reporting(E_ALL);") - once the code of the template is correct (such as not showing any error whatsoever) then the debugging functions of PHP can be modified to either "error_reporting(E_ERROR);" (preferred function) or "error_reporting(E_NOTICE);" (not that informative).

Re: iPhone Webpage Question

Posted: Sat 14 Jul 2012 1:39 am
by SJG1976
Phew....


Got carried away, didn't see the time, it's just gone past 2am here..

As for the config..

2 Local Laptops, both on same network.

I've done the default root folder a second way.

On an external which is E:

I have a folder called www inside I have 3 subdirectories.

E:\www\vp1
E:\www\os1
E:\www\test

The Weather PC has a drive mapped to the Server PC and uploads the CUTags.php to there.

After finding where to change the default docs part in the conf find in apache config.
I've put the new Saratoga templates here and changed all the bits I didn't like about.

Tomorrow ill add the default debug and version control text.
As I keep getting stuck on the WU updates at the moment.

I did have success in changing the Status Page, to include some Davis CRC Error checking, and had to modify some WebTgs to get it to work, which I was quiet plee with.


Well eyes hurt now so off to bed for me.

I'll try and open up a Firewall port tomorrow so my experiment can be seen.


Thanks for the good advice.




Steve

I can't seem to get it to pull the right forecast.

Re: iPhone Webpage Question

Posted: Sat 14 Jul 2012 2:37 am
by gemini06720
Steve, placing the root directory on another drive is OK with me - I have my XAMPP installed on drive 'E' and my root directory (and all the sub-directories) installed on their own drive 'O'.

But I do not agree with changing the name of the root directory from 'htdocs' to 'www' - this might eventually result in some problems... do not come calling for help when there are some operations you cannot do. :shock:

I would strongly recommend that you re-establish 'htdocs' as the root directory (as it was designed and planned in the Apache configuration file). Then, move the 'www' directory into the 'htdocs' root directory...

One thing you have to remember, to make things easier, is the way your online web server is designed (the directory structure). If you keep a similar arrangement of the drive structure (on both your online and your home) then templates modified on your home server can be upload to your online server without further modifications.

I have about 4 years of experimentation with XAMPP and two years with Abyss (a bit less with WAMP and easyPHP). I do not know everything about XAMPP but I do not consider myself just a beginner...

Re: iPhone Webpage Question

Posted: Sat 14 Jul 2012 1:29 pm
by SJG1976
OK I've made the following Changes:

Directory Stucture is now

E:\htdocs
\Davis
\Oregon

Should be able to see it live (if the laptop is switches on anyway)

http://cm2weather.dyndns.tv

Not very nice Start Page just a HTML Bit.
Will tidy that up later.

Have changed some of the XML Flyout Menu's, got my WU Forecasts Working.

SO getting there now.

(or At least I think)


Steve