Page 15 of 66
Re: NEW frontpage.html - request comments
Posted: Monday 02 February 2015 17:40
by mvveelen
@ FutureCow : how did you get the Skycons (?) in there? If they are Skycons
?
Can you share your code? Maybe others like to use (some of) it.
Re: NEW frontpage.html - request comments
Posted: Monday 02 February 2015 17:54
by FutureCow
mvveelen wrote:@ FutureCow : how did you get the Skycons (?) in there? Can you share your code?
After more than one hour of trying, i gave up...
I've made a gif for every icon, took me only 10 minutes for all the icons... I can share the gifs, but with the background!(i can create white with black background if people are interested)
Re: NEW frontpage.html - request comments
Posted: Monday 02 February 2015 18:33
by mvveelen
If you can make both? Or, can't you make them with a transparent background?
I don't understand why it isn't possible to add the Skycons..... jan_nl ? bbqkees ?
Re: NEW frontpage.html - request comments
Posted: Monday 02 February 2015 19:53
by floris74
I guess it's possible to save them as *.png file, which supports transparent as far as I know.
Jan_nl, about the icons directory and his files! where do I get them? In what version of front page.html or whatever where they in?
Re: NEW frontpage.html - request comments
Posted: Monday 02 February 2015 20:20
by SwordFish
How do i get the the sunrise and sunset in a cell?
Re: NEW frontpage.html - request comments
Posted: Monday 02 February 2015 21:00
by mvveelen
jan_nl wrote:Added some sort of traffic info, max 4 traffic-jams, the text is clickable and brings you to
http://www.anwb.nl/verkeer (which is not configurable (not yet anyway)).
Changes in frontpage.css (cell2_3), frontpages_settings.js and frontpage.js
I also added a script (wget_verkeer.sh) to get an rss feed from verkeerplaza, so this propably only works in the Netherlands. This scripts must run via crontab (changes about every minute)
Would it be possible to post the pieces of code, stating where you have to put them, and in which file? That way people can use the pieces they want.
This method is used by bulletin boards, when they make 'mods' (modifications). I think this will make it a lot easier for everybody to help improve the frontpage.
Sure, this will take a some more energy and time, but what about he users who have other ideas from which everyone can profit?
Example (it shows which file to edit and where to add or replace a piece of code -> see how important the comments are
?) :
Code: Select all
<edit file>
Themes/default/Display.template.php
</edit file>
<search>
// Show the anchor for the top and for the first message. If the first message is new, say so.
</search>
<replace>
global $bar_exps, $bar_posts;
// Show the anchor for the top and for the first message. If the first message is new, say so.
</replace>
(source:
http://wiki.simplemachines.org/smf/Manu ... on_of_mods)
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 9:33
by thorbj
jan_nl wrote:And yet another update.
Changes are the possibility to add sunrise/sunset to a cell.
Changes are in frontpage_settings.js (enabling option and 3 new var's) and frontpage.js bottom and top of main refresh function
If you use the included css, remember it is made smaller to fit my 7" tablet.
Great work with the sunrise/sunset option jan_nl!
I noticed the weather icons were somewhat dragged in the latest release. I changed the width to the same value as the height to get the right dimentions. Worked for the current weatherstatye here, haven't controlled the others yet.
Anyway, here's the code-part form frontpage.js:
Code: Select all
// replace forecast (text) with an image
if (vdata == 'Sunny' ) {
vdata=new String(vdata).replace( "Sunny","<img src=icons/day_sun.png width=155 height=155>");
}
if (vdata == 'Partly Cloudy' ) {
vdata=new String(vdata).replace( "Partly Cloudy","<img src=icons/day-partlycloudy.png width=155 height=155>");
}
if (vdata == 'Cloudy' ) {
vdata=new String(vdata).replace( "Cloudy","<img src=icons/day-cloudy.png width=155 height=155>");
}
if (vdata == 'Clear' ) {
vdata=new String(vdata).replace( "Clear","<img src=icons/day_sun.png width=155 height=155>");
}
if (vdata == 'Rain' ) {
vdata=new String(vdata).replace( "Rain","<img src=icons/day-rain.png width=155 height=155>");
}
if (vdata == 'Snow' ) {
vdata=new String(vdata).replace( "Snow","<img src=icons/day-snow.png width=155 height=155>");
}
if (vdata == 'Fog' ) {
vdata=new String(vdata).replace( "Fog","<img src=icons/day-fog.png width=155 height=155>");
}
if (vdata == 'Hail' ) {
vdata=new String(vdata).replace( "Hail","<img src=icons/day-hail.png width=155 height=155>");
}
if (vdata == 'Thunderstom' ) {
vdata=new String(vdata).replace( "Thunderstorm","<img src=icons/day-thunder.png width=155 height=155>");
}
if (vdata == 'Sleet' ) {
vdata=new String(vdata).replace( "Sleet","<img src=icons/day-sleet.png width=155 height=155>");
}
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 10:27
by thorbj
I took the liberty to rewrite the time/date function in frontpage.js so it would display the date in the following format: 3. feb 2015 hh:mm
Code: Select all
//Return current time: dd. month yyyy hh:mm
function currentTime() {
var today=new Date();
var h=today.getHours().toString();
h = h.trim();
if (h.length == 1) {
h = '0'+ h;
}
var m=today.getMinutes().toString();
m = m.trim();
if (m.length == 1) {
m = '0'+ m;
}
var day=today.getDate().toString();
day = day.trim();
//Change the months to reflect your preferred translation
var month = new Array();
month[0] = "jan.";
month[1] = "feb.";
month[2] = "mar.";
month[3] = "apr.";
month[4] = "may";
month[5] = "jun.";
month[6] = "jul.";
month[7] = "aug.";
month[8] = "sept.";
month[9] = "oct.";
month[10] = "nov.";
month[11] = "dec.";
var month = month[today.getMonth()];
var year=today.getFullYear();
//To display month first, change the following string to
//var ret_str=month+" "+day+". "+year+" "+h+":"+m;
var ret_str=day+". "+month+" "+year+" "+h+":"+m;
return ret_str;
}
If someone wants it to display "the american way" like Month Day. Year, you can switch the second-last string with:
Code: Select all
var ret_str=month+" "+day+". "+year+" "+h+":"+m;
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 14:57
by thorbj
Is it possible to add °C after the value in temp cells?
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 17:38
by SwordFish
Can someone please tell me howto use the sunrise/sunset option
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 18:44
by thorbj
SwordFish wrote:Can someone please tell me howto use the sunrise/sunset option
Code: Select all
['29','Sun', 'cell21', '','0','0','color:#17E213;font-size:50$'],
in frontpage_settings.js worked for me.
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 18:59
by SwordFish
thorbj wrote:SwordFish wrote:Can someone please tell me howto use the sunrise/sunset option
Code: Select all
['29','Sun', 'cell21', '','0','0','color:#17E213;font-size:50$'],
in frontpage_settings.js worked for me.
Thanks, but do i have to make a dummy switch for the sunrise and sunset?
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 19:30
by jannl
No you don't. Take care, better use 0 instead of 29. And you now can use SunBoth, SunRise and SunSet as well.I had some stand issues when using an existing idx by accident.
I downloaded the icons from a link on this forum. I will post them here in several files today of tomorrow
@mvveelen: I understand the need for mods, however I don't really understand how. Comments in the code are present, more or less. But I will make it more clear with future changes
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 20:01
by vanputten80
Is it possible to add NS train information?
And can I make the second page as start page?
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 20:18
by SwordFish
jan_nl wrote:No you don't. Take care, better use 0 instead of 29. And you now can use SunBoth, SunRise and SunSet as well.I had some stand issues when using an existing idx by accident.
I downloaded the icons from a link on this forum. I will post them here in several files today of tomorrow
@mvveelen: I understand the need for mods, however I don't really understand how. Comments in the code are present, more or less. But I will make it more clear with future changes
Thanks that works. But now i want to get sunsrise in one cell en sunset in another cell. I have now set idx '0' and value 'Sun'. when i put 'SunRise' in the value i get nothing? Is there something i have to change?
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 20:42
by bbqkees
I missed a few days over here and in the mean time this topic kind of exploded.
Is everything working right now in respect to dimming, thermostat and the correct amount of swipe-able pages?
Seems so.
I looked into the skycons issue, but I have not resolved that yet. The alternative solution with the GIF files could be an easy sidestep of the problem.
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 21:30
by jkimmel
@bbqkees
I created a virtual setpoint device, I now see I need to send another command for those devices.
/json.htm?type=command¶m=udevice&idx=93&nvalue=0&svalue=21.5
But I can fix that this weekend.
Is this fixed already?
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 21:43
by floris74
For now i created 2 virtual push buttons;
on, with 'aan actie' and 'uit actie'
http://192.168.1.56:1720/json.htm?type= ... value=17.5
off, with 'aan actie' and ´uit actie'
http://192.168.1.56:1720/json.htm?type= ... value=15.5
I haven't tried it since your last update with the thermostat, which didnt work.
bbqkees, did it all worked wel with building the house?
Floris
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 21:48
by jesper
Hi
Is it possible to get battery level and if the device is online/offline?
Re: NEW frontpage.html - request comments
Posted: Tuesday 03 February 2015 23:38
by BobbyNL
I have entered my IDX doorbell and my frontdoorcamera is working in frontpage. But when I press the doorbell there will be no popup. How can I make it work .
I tried Chime, On and Group On but no luck.