Author Topic: Stupid iframes...  (Read 7201 times)

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Forcing Custom web processing (Re: Stupid iframes...)
« Reply #15 on: August 05, 2015, 11:03:37 PM »
Dear X-Air and WeatherCat website spinners seeking privacy . . .

All "development" stopped. Thunderstorms have knocked out the power... finally!

Hope your equipment is no worse for the trauma.

I also realized I may not want WC making updates to several pages! All I really want is for it to upload the dozens of images.

Some of the templates you are using are using WeatherCat's CGI interface and indeed do not need to be processed by WeatherCat custom web.  If you have pages that are a mix of graphs and CGI, you might want to have a "bare bones" page that contains the graphs you need to have uploaded and have WeatherCat process that.

You are correct about he custom graphs. But I just changed the custom graphs to 600 pixels wide, so that means I'll have to start thinking about the 'mobile' event sooner! [banghead]

It is possible to have a separate website displayed for mobile devices.  I use this simple one:

http://athena.trixology.com/index.php?topic=213.0

That way you can have a "lush" website for those with computers and tablets, but still have something that is easy to read on an iPhone.  That template is so nice that I never bothered to setup WeatherCat for iPhone to outside of our local WiFi network.

I have WC setup to update only every 5 minutes. Even as slow as I type, I often upload a page between those updates and you then get the tags instead of what they turn in to. Might as well change all those in WC Prefs...

Stu added a little known AppleScript feature that allows you to force WeatherCat to upload custom web pages on command.  This tiny AppleScript will cause WeatherCat to process custom web pages and upload them to your server:

Quote
-- Force processing of WeatherCat custom web.
--
-- Running this script will cause WeatherCat to immediately
-- process custom web templates and upload them to your
-- server

tell application "WeatherCat"
   set RunCustomWeb to true
end tell

I've attached the AppleScript (in .spt format) for you or anyone else who might find this tool handy.  For ultimate laziness, save it as an application and you could just double-click on it to force WeatherCat to update all your custom web pages.

I'm still paranoid about putting my location for public perusal in any map. I don't even have my email address visible on the site, that's one reason I stuck with the Contact form.

I understand your concern, but you might play with the Google interface just out of curiosity and to see if you could make vague enough to feel comfortable.  My map has a scale on the order of 100 square miles, so that isn't going to help anybody figure out where I am.  To be really secure, you could give an entire state view.  That would be good enough for someone to have a general idea of where this weather data is coming from without compromising your privacy in any real way.

Cheers, Edouard

xairbusdriver

  • Storm
  • *****
  • Posts: 3130
Re: Stupid iframes...
« Reply #16 on: August 06, 2015, 04:15:43 AM »
Not sure when the power came back on. We had dinner invites from friends and they still had power, so we went and enjoyed warm food while the live-in relatives stayed home in the dark!!!! [blush]

WC Updates: I created a page with not much besides a list of WC tags, earlier than the storms. I had one already doing nothing in it except the MOVIE$ or WEBCAM$ tag and the snapshots. Don't really use the snapshots, but I just added the other tags to that page. I didn't get a chance to go back and delete many of the "Additional pages" items, yet.

Most professional web designers suggest writing "mobile first"... of course, I'm not a professional! [rolleyes2] One of the reasons I decided to not use the WC updated pages is exactly because there is no way to add CSS to the <img> HTML that the app creates for you. Just having the images uploaded is all I really want.
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
"Hidden" pages will upload images for you. (Re: Stupid iframes...)
« Reply #17 on: August 06, 2015, 11:44:51 PM »
Dear X-Air and WeatherCat web spinners,

Not sure when the power came back on.

You don't have some of those "ancient" clocks with analogue movements and are plugged into the AC?  :D


Just having the images uploaded is all I really want.
. . . .
WC Updates: I created a page with not much besides a list of WC tags, earlier than the storms.

That is probably the best strategy if you want to use CSS to define how the images appear.  Create minimalist HTML page(s) that do nothing more than list the images you want to use in the rest of the website.  Have WeatherCat process those web pages to cause it upload the images you desire to include in the other web pages.  Then create your web pages as you desire them and reference the image names directly instead of using the WeatherCat tags.  So long as there isn't any link to the minimalist HTML page(s), nobody will know they exist on your web server.

Most professional web designers suggest writing "mobile first"... of course, I'm not a professional! [rolleyes2]

I'm not sure that is a suggestion based on technical reasons so much as trends in usage.  As people use their mobile devices increasingly as their main source of Internet access, it is increasingly important that a website look best within the limitations of those small screens. 

You have to decide for yourself how interested you are in such issues.  Personally, I find the ipwx template very well suited to my needs on my iPhone.  I don't spend extended periods away from home and when I do, usually I have my iPad with me so I can view my regular website and all the information it includes.  However, everybody is different and you need to decide how serious you are about having a website with a significant following.  I keep my website low-key as part of my strategy to maintain my privacy.

Cheers, Edouard

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1563
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Stupid iframes...
« Reply #18 on: August 07, 2015, 02:21:30 AM »
I had the ipwx file as default for iPhones on my site, but changed it to an option. The very few viewers that contacted me prefer the full site. Personally, I have a "desktop" icon/app on my own iPhone and iPad that takes me directly to the Steel Series gauges for a quick, clear view of current conditions. I prefer it even over the WeatherCatMobile app.
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

xairbusdriver

  • Storm
  • *****
  • Posts: 3130
Re: Stupid iframes...
« Reply #19 on: August 07, 2015, 03:19:22 AM »
Quote
everybody is different and you need to decide how serious you are about having a website with a significant following
No expectations of any "following"! [lol] The station just provides me with dynamic stuff to play with on the web! Just a learning experience, the fact that the data can be of benefit other collectors is a big bonus!

One reason to do "mobile first" is that it's easier to "get fat" than it is to "slim down"! [rockon] If you've ever tried to lose weight, you'll know that's true! But I'm spoiled by my 27" iMac and do as little 'surfing' on the iPhone as I can. The iPad is much better, but mine doesn't have cellular capabilities, so surfing on it is limited to home and rare trips where WiFi is in the over-night accommodations. Still, I'll probably use something like the template you mentioned and pick and choose what to display on the smallest devices.

My main project, right now, is to get my Leuven table NWS/NOAA weather warnings converted to html/CSS! I'm learning a lot about php just by studying Wim's stand-alone scripts!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

xairbusdriver

  • Storm
  • *****
  • Posts: 3130
Re: Stupid iframes...
« Reply #20 on: August 11, 2015, 01:12:59 AM »
I've decided to 'throw in the towel' for a while, the one that 'wipes' out some of the NOAA data when used on the Contact page. [banghead] It keeps the main text and some others but it can't find the image folder at all. Most confusingly, it 'forgets' the 'from' and 'until' date times. No ererz, just blank output and the 'broken image' symbol. All I can figure is that it is the result of the 'noaaWarning.php' and the 'start.php' being 'included' in the "contact-header.php". All the other pages are 'pure' html, but the 'Contact' page is actually a collection of php files.

BTW, all php files are in one directory, one level up from 'root'. CSS files are, also. The 'NOAA_icons_small' is an additional directory. The warnings/advisories work just fine in all the 'html' pages. I spent most of the day changing these warnings into just html from the original table method. Tables are too complicated! [rolleyes2] Oh yeah, I changed the gradients to horizontal so there is no longer an unintended repeat when the page gets longer than the browser thought at first download. Also discovered Micro$oft has finally developed a gradient capability, probably for the latest version or two. I don't usually bother using anything for Exploder, but a couple of lines doesn't add much weight to the files! [rolleyes2] I haven't tested the page in that browser, yet. I think there is still a free site or two that will give you a screen shot for numerous browsers/platforms... later...

Next project: get some forecasts working! [cheer]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Should warnings be on all pages anyway? (Re: Stupid iframes...)
« Reply #21 on: August 11, 2015, 11:27:38 PM »
Dear X-Air and WeatherCat web spinners, . .

I've decided to 'throw in the towel' for a while, the one that 'wipes' out some of the NOAA data when used on the Contact page. [banghead]

I hadn't noticed that you put the warnings on all the pages but Contact.  Maybe that just doesn't make any sense anyway.  I had set up my website to display warnings generated from my WC Storm Monitor AppleScript, but I only displayed them on the current conditions page.  I suppose it could make sense to display warnings on other pages that might be relevant to the current conditions like the graphs page.  However, it does seem a bit silly to display that on the description of your weather station hardware and certainly you hope that people don't visit the contact page looking for warnings.

I agree that it gives you website a more uniform appearance, but perhaps that's not a good idea either.  My website changes appearance with the warnings which immediately calls attention to a regular visitor that something different is going on.  Perhaps instead of displaying a banner with the message: "There are no active watches, warnings or advisories for the Mid-South area," could you only have that banner displayed when there is a significant announcement from the national weather service?

Next project: get some forecasts working! [cheer]

I know that goes against the grain of most WeatherCat web spinners, but something to think about is whether or not you want to display information from other sources on your website.  If you put a link to your local national weather service website, a visitor has no allusions about where the forecast came from.  If you display a forecast gleaned from another source, a web visitor is able to get all their weather information in one stop and thus is more likely to rely on your website as their single source of information.  That's good if you want a popular website, but that's bad if you don't want people to come back to you complaining that they did something based on your website and effectively "it rained on their parade."

I know that most weather station owners prefer a glitzy website with all the bells and whistles, but it never hurts to think about the alternatives.

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3130
Re: Stupid iframes...
« Reply #22 on: August 12, 2015, 12:09:53 AM »
I agree with most of your opinions. ;) OTOH, I don't want anyone bookmarking one of my pages and not seeing a severe weather notice. We had those probably more often than in your area. Right now, a 'warning' of approaching rain might cause an "advisory"!! ;) OTOH, not many people will even need/use a "Contact" page and even fewer would bookmark it!

Secondly, the "Nothing dangerous is happening" line changes color (different colors for different levels of severity) and takes up only one line, normally. There is no point in having an alert system if it's not seen on all the pages, in my opinion. Things can change rapidly around here, just because there wasn't a warning while watching the mesmerizing time-lapse video doesn't mean there is a tornado warning popping up that you won't see if you leave the site from that page. OTOH, (I've lost count of how many virtual hands we're at...), the warnings may not be updated until another page is visited...

I understand your concern about getting 'blamed' for a bad forecast, but he 'weather department' seems to live through most of those problems. Additionally, I have a red-lettered warning at the top and the bottom of every page reminding people to depend only on a NWS site. That would include not depending on any private radio or TV station, no matter how many meteorological diplomas their people may have. [rolleyes2] Your safety is not their reason to exist. [banghead]

Bottom line, I think many people would expect to see some kind of forecast displayed on a "weather" site, not just a link to another one. Finally, it's my site and I will make it the way I want! :P ...assuming I can get the php working... and I don't run out of time or my allowance...   [woohoo] [blush] [computer]

Even with this selfish attitude, however, I really do appreciate others opinions! [cheer] [bounce]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
It's a free country - at least for weather websites! (Re: Stupid iframes...)
« Reply #23 on: August 12, 2015, 11:12:42 PM »
Dear X-Air and WeatherCat web spinners, . . .

I agree with most of your opinions. ;) OTOH,

Oh! Brother!! . . .  [wink]

Secondly, the "Nothing dangerous is happening" line changes color (different colors for different levels of severity) and takes up only one line, normally.

Okay, that makes it less likely that someone would miss an alert because the alert bar is part of the "wallpaper" of your website.

I understand your concern about getting 'blamed' for a bad forecast, but he 'weather department' seems to live through most of those problems.

It is just something to think about.  There is a natural desire to create a very nice looking website.  It is a point of pride like keeping your yard tidy, your car clean, and all the rest.  Still, I think we all need to be honest about how much web traffic we are likely to receive on these websites.  If in the end the most frequent visitors to our own websites are going to be ourselves, family, and friends - perhaps they can be more personal in that way.  As such, they don't require all the bells and whistles that a commercial weather website is expected to have.

Additionally, I have a red-lettered warning at the top and the bottom of every page reminding people to depend only on a NWS site. That would include not depending on any private radio or TV station, no matter how many meteorological diplomas their people may have. [rolleyes2] Your safety is not their reason to exist. [banghead]

Well, . . . when I learned to be a scuba instructor, I was taught explicitly to remind the students many times of the risks they were taking as part of a carefully orchestrated program by the certification agency to avoid attempts to sue scuba instructors.  Even so, students find lawyers to manage to sue anyway, even if they were "warned."  I have to admit the experience was traumatizing that I only taught a few advanced classes and gave up.  I didn't want that burden on my head.

To this day, I don't find disclaimers very reassuring.


Finally, it's my site and I will make it the way I want! :P

Now this remains true  [cheer] . . . until the government puts its nose in yet something else it has no business interfering . . .  [rolleyes2]


...assuming I can get the php working... and I don't run out of time or my allowance...   [woohoo] [blush] [computer]

 ;). . . . Now in this, you might yet be licked! . . . .


Even with this selfish attitude, however, I really do appreciate others opinions! [cheer] [bounce]

 ;) . . . I repeat . . . Oh! Brother!! . . .  [wink]

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3130
Re: Stupid iframes...
« Reply #24 on: August 12, 2015, 11:22:15 PM »
... and you'll be hearing from my lawyer, any day, now...  [lol2]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6512
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Remember? . . . . (Re: Stupid iframes...)
« Reply #25 on: August 12, 2015, 11:36:08 PM »
Dear X-Air and WeatherCat "strollers down memory lane . . . . "

... and you'll be hearing from my lawyer, any day, now...  [lol2]

Remembering how I became a scuba instructor and all the liability worries, I had a bumper sticker on my trusty wagon when she was known as "da' divemobile."  I first learned to scuba dive in the early 1990s when the AIDS epidemic was raging and at the same time resorts and certification agencies would certify just about anybody - even those in marginal health.  At that time I found the bumper sticker that summarized the lunacy perhaps too well:

Remember when sex was safe . .
and scuba diving was dangerous?


Things sure have changed . . . and I'm not sure for the better! . . .  :o

Edouard