
Can you share your code? Maybe others like to use (some of) it.
Moderator: leecollings
After more than one hour of trying, i gave up...mvveelen wrote:@ FutureCow : how did you get the Skycons (?) in there? Can you share your code?
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.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)
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>
Great work with the sunrise/sunset option jan_nl!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.
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>");
}
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;
}
Code: Select all
var ret_str=month+" "+day+". "+year+" "+h+":"+m;
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$'],
Thanks, but do i have to make a dummy switch for the sunrise and sunset?thorbj wrote:SwordFish wrote:Can someone please tell me howto use the sunrise/sunset optionin frontpage_settings.js worked for me.Code: Select all
['29','Sun', 'cell21', '','0','0','color:#17E213;font-size:50$'],
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?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
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.
Users browsing this forum: No registered users and 1 guest