Open JoshuaKimsey opened 7 years ago
Hi J95!
I just updated the master with a few updates. • single config file; config.php • editing channels should be easier as the new arrays don't require a number so its easier to delete one from the middle & you dont have to worry about renumbering etc. • made some slight CSS changes which makes a start on resizing for various screens. Namely the temp & headlines text which resize based on the window width.
Next I think your idea "control forecast days, channels, and custom sites more easily" is great & hope to get that going.
KTV is nice, sounds like a channel I like that, but KitchenTV is so descriptive! It's obvious what it is right away ;-)
Any comments & ideas are welcome :-)
Updated ~ Now number of weather days & location is set in config.php
The clock face PNG & background gradients JPG would be more efficient as CSS but not as easy for people to customise. Like this its very easy for people to swap the images. Its only about 30KB for the icons & backgrounds, almost nothing by today's standards. But no harm in also having a CSS option for the background for those that prefer it.
Background img for the weather would be good. It would be fun for people to change those to their local town or dream holiday destinations etc
For me the web browsing part doesnt work well & is slow (using pi in kitchen) - The point was so you can get recipes on screen etc. If you use that feature you will start noticing many websites don't allow loading in a frame, so you get a blank page. Not sure how to get around that though.
Outstanding! I will pull the new changes and check them out! They all sound awesome to me, especially the separating the HTML and PHP code. :)
With my fork of the project, I am going to upload the latest changes I made there so you can see if you like any. Otherwise, I will take my changes and adapt them to your code! Tell me which if any of the features I added that you like, as I'll make another branch of your new code to add them! :)
Ok, I added my final improvements to my fork of the code! Granted of courses it's still in the old format, but you should still be able to see the ideas I was going for by making those changes! Let me know which of them you like and I'll try incorporating them into the new version of the code! :)
*Hint: It might be easier to look through the commits to see exactly what I changed if you can't easily see it by looking at the code
I like what you did loading Wunderground in the frame. I think this can be explored further with some other useful reference website. (tides, typhoons, tornados, sunrise, webcams!)
Yeah, I mainly did that because my limited internet data plan would die if I left YouTube streaming constantly, but it also has the nice benefit of having a dynamically updating weather page easily accessible. I absolutely agree that it could be exploited further! I had intentions of having one for a news site. Problem is that since news sites tend to be quite dynamic, even a site like the Drudge Report, it makes it difficult to easily have it autoscroll to where it needs to be on the webpage in the frame. I like your idea of having other weather options available to show! Being in the Southern US, one for severe weather would be quite handy! :)
Also, no I don't live in Beverly Hills! I just needed a default location that wasn't my own! 😝
Should be possible to pull out sections from a website to load in that frame area, in a similar way to how the BBC RSS feed is cherry picked for the bits needed.
$file=file_get_contents("http://abc.com/page.html");
preg_match_all("%<title>(.*?)</title>%s", $file, $titles,PREG_PATTERN_ORDER,920);
This will extract all the content between the tags
Interesting! I'm not sure that would work for Weather Underground, as that is sorta predefined. However, it would probably work great for a news site! Does this mean the news ticker on the side might be able to pull from multiple sources, besides just the BBC? I like the BBC quite a lot, but some of the British domestic policy means very little to me. It'd be nice to have the ability to have a variety of sources to see news from.
Ok, I have added back my additions I made to the new code you added. For now it is just a rough copy and paste, as I'm sure I wiped out some of your work with the CSS doing what I did. I will go back and hand compare with code can get changed over or not. Until then, this is a working branch with the new code! I love how much easier it is to deal with the config file now! 😃
https://github.com/hsoj95/kitchenTV/tree/Improved-Code-with-Revisions
One bug I found though, when you set the temperature setting, either C or F in the config file, it changes the temperature itself, but fails to update the letter by the temperature. So it will say 75, but have a C by it. All that needs to be changed is how it interacts with the weather plugin file as to insure the letter gets updated. Not knowing PHP well though, you will probably need to do that. 😕
The BBC headlines come from the BBC RSS news feed, so it will work for any news site with an RSS feed. (XML news feed) Although it will need modifying (easy) for other sites as i am sure they layout of the feed is different. Perhaps we could have say 4 pre-defined news sites to choose from from various global sources.
Your branch seems to be coming along nicely :-) Yes there are some CSS corrections to finish, but otherwise working ok. The digital clock/date needs some CSS work to correctly position it for the right side instead of the left, it was lost off the edge of the screen for me.
The C/F is set in weather.js I didnt move that over to the config file, but will do!
ºC/ºF now in config. Alternate news feeds added to config (at bottom) - needs testing over time because odd characters & unexpected content in the feeds can cause the javascipt to fall over.
Awesome! As for the odd characters messing up the JS, I'm not totally surprised by that! From my experience, things like ampersands and quotes can act weirdly in HTML and JS. I guess it all depends on how the code is being implemented.
Lol! I should apologize for how badly broken my part of the fork was since your last update! I didn't realize I had broken the ability to actually even open the streams part of the program until I was working with with part of Materialize! That will be fixed in my next update of my fork! 😁
So I figured It'd be a good idea to have a central list of ideas that we could implement in the future for the KitchenTV!
Here's the one's I have so far, based on what you and I have said:
*This list will be edited to include new features you or I think of in the future