Thread: Help with putting it on webpage.
Brought to you by:
iridium
From: Staci <sco...@wi...> - 2003-02-19 16:50:58
|
Hi! First, I'd like to ask what the heck happened in those instructions? You were so good in the Install and Config directions, spelled it out for those of us who could potentially be linux-illiterate, really did good. But once it was installed and I went to try to include it in my webpage, the instructions suddenly assume a knowledge of coding and/or php that I just don't have. Why are they so sketchy compared to the install directions?? I'd like some help with that. I have no experience using php or including php-stuff on my website. What exactly are the html-tags I have to insert? Do I have to do anything special other than put in a tag? Thanks, sl |
From: Max H. <ma...@fl...> - 2003-02-19 17:00:58
|
> Hi! Hi there, > First, I'd like to ask what the heck happened in those instructions? You > were so good in the Install and Config directions, spelled it out > for those > of us who could potentially be linux-illiterate, really did good. > But once > it was installed and I went to try to include it in my webpage, the > instructions suddenly assume a knowledge of coding and/or php that I just > don't have. Why are they so sketchy compared to the install directions?? I believe that PHPWeather was originally intended almost as a library, rather than a fully-fledged application (Martin?), and so its focus was for moderately experienced PHP programmers. It's not designed to be an application really, just something that you could include within one. > I'd like some help with that. I have no experience using php or including > php-stuff on my website. What exactly are the html-tags I have > to insert? Do > I have to do anything special other than put in a tag? You have to have a PHP page, rather than HTML. Might I suggest http://www.php.net/manual/en/tutorial.php as a decent introduction. (Navigation's a bit funny now, but you can turn the page with the links at the top, in the grey bar). If you need help with PHP, please mail me directly, rather off-topic for this list. Cheers, Max -- Logic merely enables one to be wrong with authority. * Doctor Who |
From: Martin G. <gim...@gi...> - 2003-02-19 21:23:19
|
"Max Hammond" <ma...@fl...> writes: >> But once it was installed and I went to try to include it in my >> webpage, the instructions suddenly assume a knowledge of coding >> and/or php that I just don't have. Why are they so sketchy compared >> to the install directions?? > > I believe that PHPWeather was originally intended almost as a > library, rather than a fully-fledged application (Martin?), and so > its focus was for moderately experienced PHP programmers. It's not > designed to be an application really, just something that you could > include within one. Yes, that's very much how I see it now... PhpWeather gives you the tools to put a weather report on a website, it gives you some tools to build dropdown boxes with lists of countries, stations and languages, and that's about it. So it's easiest to use when you have to experience with PHP. But perhaps we should make a wrapper function that does all this with one call? -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2003-02-19 21:35:37
|
Staci <sco...@wi...> writes: > Hi! > > First, I'd like to ask what the heck happened in those instructions? > You were so good in the Install and Config directions, spelled it > out for those of us who could potentially be linux-illiterate, > really did good. But once it was installed and I went to try to > include it in my webpage, the instructions suddenly assume a > knowledge of coding and/or php that I just don't have. Why are they > so sketchy compared to the install directions?? Probably because I wrote the INSTALL and README files first, and the HTML/PDF/... files much later when I was much better with PHP. So I've expected more knowledge of PHP --- people have to start somewhere with PHP, but I've never meant them to start with PhpWeather. > I'd like some help with that. I have no experience using php or > including php-stuff on my website. What exactly are the html-tags I > have to insert? Do I have to do anything special other than put in a > tag? The problem is, that you have to define exactly what it is you mean by 'include it into your webpage'? This means something different for every webpage. But you've got a point: we could make a wrapper function that would make the report, the icons and the dropdown boxes. There's no need to make things harder than necessary? :-) -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2003-02-21 11:52:02
|
Staci <sco...@wi...> writes: > On Wed, 19 Feb 2003, Martin Geisler wrote: > >> But you've got a point: we could make a wrapper function that would >> make the report, the icons and the dropdown boxes. There's no need >> to make things harder than necessary? :-) > > What a great way of thinking about it!! > > That would sure be nice.... > > I'd really like to just have the icons/message for the weather, > rather than the dropdown etc, I know where I live, my friends know > where I live, do I have to always have the dropdown? Well, no, that depends on the wrapper function. And that's exactly the problem with these functions: it's one size fits all --- to have configurable output you'll use the function from PhpWeather directly, to have the stock report-with-icons-and-drop-down you'll use a wrapper function. We could then make the wrapper function accept arguments that control whether or not the drop-down box should be rendered... but then we're adding complexity again :-) -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2003-02-21 23:08:25
|
Staci <sco...@wi...> writes: (Please direct your answers to the list and not to me personally.) > On Fri, 21 Feb 2003, Martin Geisler wrote: >> >> We could then make the wrapper function accept arguments that >> control whether or not the drop-down box should be rendered... but >> then we're adding complexity again :-) > > How about a workaround? > > Could you just let us choose the default, move my city to the top of > the dropdown list so it's the one that's there before a person > chooses one? That's already fairly easy to do with the methods presented today... And that's the key issue here: PhpWeather already gives you the pieces to build this kind of thing, it's just assumed that the user knows how to piece them together. > regarding adding complexity...it's up to you. I can't write it > myself, of course, so how much work you're willing to put into it is > up to you. (if you're going to say "none" tell me now and I'll start > looking for another tool. :P ) Well, it's not surposed to be that difficult - look at this code: <?php require('/some/path/to/phpweather/phpweather.php'); require(PHPWEATHER_BASE_DIR . 'pw_utilities.php'); require(PHPWEATHER_BASE_DIR . '/output/pw_text_en.php'); require(PHPWEATHER_BASE_DIR . '/output/pw_images.php'); $weather = new phpweather(); $text = new pw_text_en($weather); $icons = new pw_images($weather); $location = $weather->get_location(); $report = $text->print_pretty(); $sky = $icons->get_sky_image(); $wind = $icons->get_winddir_image(); $temp = $icons->get_temp_image(); ?> This gives you all available information in five variables, it's then up to you to put them into suitable HTML codes. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |