Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5

IBNtwilight hilfe beim umstellen der zeit
#1

nabend allerseits,

ich bin schon länger bei euch am stöbern und bin auch schon oft fündig geworden.

dafür erst mal ein großes lob, es wird einfach nicht langweilig hier.

bei der bearbeitung meiner themes, zb: 1st WEATHER, Weather Elements V3,weda panel und und und habe ich bisher noch keine größeren probleme gehabt.

nun habe ich mir von einer anderen seite IBNtwilight geladen und bin auch ganz angetan davon, nur kann ich das amerikanische zeitformat nicht umstellen.
ich bin mir nicht sicher ob verlinkungen zu fremden seiten erlaubt sind.
wenn ja, dan kann ich den link zu dem theme posten.

ich würde mich freuen wenn mir jemand weiterhelfen könte.

mfg

blaulichtfahrer    
Zitieren
#2

mir fällt gerade ein, ich könnte ja die configurime posten.



// The location field should be a relatively machine-legible string
// if using the default, Apple/AccuWeather parser (originally from Leopard's Weather.wdgt)
var locale = "xxxxxx" //e.g. 'Defiance, Ohio'|'Moscow, Russia'|'Ledyard, AT'|'London, UK'

// Set to 'false' if you'd prefer Farenheit
var isCelsius = true //true|false

// Use 'Real Feel' temperatures where possible, taking into account Wind Chill, Humidity etc.
var useRealFeel = false //true|false

/*––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/
//Enable Wallpaper and/or Lock Screen
var enableWallpaper = true; //true|false
var enableLockScreen = false; //true|false [Currently, it is suggested that the lockScreen is disabled.]

// Supplied styles are 'originalBubble', 'myopia', 'iconOnly' and 'split'.
// (Add your own to the CSS folder!)
var stylesheetWall = 'topright' //'originalBubble'|'myopia'|'iconOnly'|'split'|'oneLine'
var stylesheetLock = 'iconOnly' //See above.

// The only supplied icon set is 'klear'
// Images must follow the same naming schema as the 'springboard' set (borrowed from KWeather)
var iconSetWall = 'springboard' //'springboard'|'Lockscreen'
var iconExtWall = ".png" //'.png'|.'gif' etc.
var iconSetLock = 'springboard' //See above.
var iconExtLock = '.png' //See above.


/*––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/

// The other available source is 'yahooWeather' which for the 'locale'
// requires a US zip or location code (e.g. UKXX0085 or CHXX0008) from http://weather.yahoo.com
var source = 'appleAccuweatherStolen' //'appleAccuweatherStolen'|'yahooWeather'

// Please endeavour to set this to a sensible value if you really must change it...
var updateInterval = 35 //Minutes

und hier die wallpaper js:

var postal;
var demoMode = false;
var enabled;

if (location.href.indexOf("LockBackground") == -1){
stylesheet = stylesheetWall;
iconSet = iconSetWall;
iconExt = iconExtWall;
enabled = enableWallpaper;
}else{
stylesheet = stylesheetLock;
iconSet = iconSetLock;
iconExt = iconExtLock;
enabled = enableLockScreen;
}

if(enabled == true){
if(iconSet == null || iconSet == 'null' || iconSet == ""){
var iconSet = stylesheet;
}

var headID = document.getElementsByTagName("head")[0];
var styleNode = document.createElement('link');
styleNode.type = 'text/css';
styleNode.rel = 'stylesheet';
styleNode.href = 'Stylesheets/'+stylesheet+'.css';
headID.appendChild(styleNode);

var scriptNode = document.createElement('script');
scriptNode.type = 'text/javascript';
scriptNode.src = 'Sources/'+source+'.js';
headID.appendChild(scriptNode);
}

function onLoad(){
if (enabled == true){
if (demoMode == true){
document.getElementById("weatherIcon").src="IconSets/"+iconSet+"/"+"cloudy1"+iconExt;
document.getElementById("city").innerText="Somewhere";
document.getElementById("desc").innerText="Partly Cloudy";
document.getElementById("temp").innerText="100º";

}else{
document.getElementById("weatherIcon").src="IconSets/"+iconSet+"/"+"dunno"+iconExt;
validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal)
}
}else{
document.getElementsByTagName("body")[0].innerText='';
}
}

function convertTemp(num)
{
if (isCelsius == true)
return Math.round ((num - 32) * 5 / 9);
else
return num;
}

function setPostal(obj){

if (obj.error == false){
if(obj.cities.length > 0){
postal = escape(obj.cities[0].zip).replace(/^%u/g, "%")
document.getElementById("WeatherContainer").className = "";
weatherRefresherTemp();
}else{
document.getElementById("city").innerText="Not Found";
document.getElementById("WeatherContainer").className = "errorLocaleNotFound";
}
}else{
document.getElementById("city").innerText=obj.errorString;
document.getElementById("WeatherContainer").className = "errorLocaleValidate";
setTimeout('validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal)', Math.round(1000*60*5));
}
}

function dealWithWeather(obj){

if (obj.error == false){
document.getElementById("city").innerText=obj.city;
document.getElementById("desc").innerText=obj.description.toLowerCase();

if(useRealFeel == true){
tempValue = convertTemp(obj.realFeel);
}else{
tempValue = convertTemp(obj.temp)
}
document.getElementById("temp").innerText=tempValue+"º";
document.getElementById("weatherIcon").src="IconSets/"+iconSet+"/"+MiniIcons[obj.icon]+iconExt;
document.getElementById("WeatherContainer").className = "";


}else{
document.getElementById("WeatherContainer").className = "errorWeatherDataFetch";
}


}

function weatherRefresherTemp(){ //this is one of my nice works so far... dont forget to find me and thank me "ibnyaffa".
fetchWeatherData(dealWithWeather,postal);
setTimeout(weatherRefresherTemp, 60*1000*updateInterval);
}
//"ibnyaffa"

ich hoffe das hilft.


mfg
Zitieren
#3

Es sollte vermutlich auch ne Wallpaper.html drin sein.

Lade diese mal bitte hoch, müsste in dieser umgestellt werden wenn ich mich nicht irre.

Gruß

It`s all about Sneakers - *UNDFTD*
Zitieren
#4

nabend,

hier die IBNweather.html:

<?xml version="1.0" encoding="UTF-16"?>
<html><head>
<base href="Private/"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<style>
body {
background-color: none;
margin: -55;
padding: 55px 0 0 0;
height: 480px;
width: 320px;
}
</style>


<script type="text/javascript" src="configureMe.js"/>




<script type="text/javascript" src="Wallpaper.js"/>

</head>
<body onload="onLoad()">

<div id="WeatherContainer">
<div id="TextContainer">
<p id="city">Loading...</p>
<p id="temp">3º</p>
<p id="desc">-</p>
</div>
<img id="weatherIcon" src=""/>
</div>

</body></html>

mehr hab ich leider nicht.
ach hier doch noch fündig geworden, hier die widget .html

ist allerdings ein ellenlanges ding.


<html>
<head><title>newclock</title><base href="Private/"/></head>

<style>

SPAN#clock
{
font-family: Helvetica;
font-weight: bold;
color: #FFFFFF;
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.7);
/*text-shadow: #FFFFFF 0px 1px 0px;*/
font-size: 26px;


}

SPAN#ampm
{
font-family: Helvetica;
font-weight: bold;
color: #FFFFFF;
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.7);
/*text-shadow: #FFFFFF 0px 1px 0px;*/
font-size: 15px;

}

TD#date
{
font-family: Helvetica;
font-weight: bold;
text-align: left;
color: #FFFFFF;
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.7);
/*text-shadow: #FFFFFF 0px 1px 0px;*/
font-size: 13px;
text-transform: uppercase;

}

</style>

<script type="text/javascript">
<!--
var this_weekday_name_array = new Array("Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var this_month_name_array = new Array("January","February","March","April","May","June","July","August","September","October","November","December") //predefine month names


var this_date_timestamp = new Date()

var this_weekday = this_date_timestamp.getDay()
var this_date = this_date_timestamp.getDate()
var this_month = this_date_timestamp.getMonth()
var this_year = this_date_timestamp.getYear()

if (this_year < 1000)
this_year+= 1900;
if (this_year==101)
this_year=2001;

var this_date_string = this_weekday_name_array[this_weekday] + " " + this_date + " " + this_month_name_array[this_month]//concat long date string

// -->
function init ( )
{
timeDisplay = document.createTextNode ( "" );
document.getElementById("clock").appendChild ( timeDisplay );
}

function updateClock ( )
{
var currentTime = new Date ( );

var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );

// Pad the minutes and seconds with leading zeros, if required
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 12 : currentHours;

// Compose the string for display
var currentTimeString = currentHours + ":" + currentMinutes;

// Update the time display
document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}

function init2 ( )
{
timeDisplay = document.createTextNode ( "" );
document.getElementById("ampm").appendChild ( timeDisplay );
}

function amPm ( )
{
var currentTime = new Date ( );

var currentHours = currentTime.getHours ( );

// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 12 : currentHours;

// Compose the string for display
var currentTimeString = timeOfDay;

// Update the time display
document.getElementById("ampm").firstChild.nodeValue = currentTimeString;
}

function init3 ( )
{
timeDisplay = document.createTextNode ( "" );
document.getElementById("calendar").appendChild ( timeDisplay );
}

function calendarDate ( )
{
var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var this_month_name_array = new Array("January","February","March","April","May","June","July","August","September","October","November","December") //predefine month names

var this_date_timestamp = new Date()

var this_weekday = this_date_timestamp.getDay()
var this_date = this_date_timestamp.getDate()
var this_month = this_date_timestamp.getMonth()

//document.getElementById("calendar").firstChild.nodeValue = this_weekday_name_array[this_weekday] + " " + this_date + " " + this_month_name_array[this_month]//concat long date string

document.getElementById("calendar").firstChild.nodeValue = this_weekday_name_array[this_weekday] + "," + " " + this_month_name_array[this_month] + " " + this_date //concat long date string
}

// -->
</script>

</head>


<body >





<table style="position: absolute; top: 55px; left: 15px; width: 180px; height: 461px;" cellspacing="0" cellpadding="0" align="LEFT">
<tr align="LEFT" valign="top" border="0" cellpadding="0">
<td height="12" valign="top" margin-left="20" >
<span id="clock">
<script language="JavaScript">updateClock(); setInterval('updateClock()', 1000 )</script></span><span id="ampm">
<script language="JavaScript">amPm(); setInterval('amPm()', 1000 )</script>
</span>
</td>
</tr>
<tr>
<td id="date" valign="top">
<span id="calendar">
<script language="JavaScript">calendarDate(); setInterval('calendarDate()', 1000 )</script>
</span>
</td>
</tr>
</table>
<object data="IBNweather/IBNweather.html" type="text/html" height="480" width="420">
<p>Place IBNweather in Subthemes</p>
</object>

</body>
</html>
Zitieren
#5

ändere mal folgendes, rot markiert.

bin zwar net so der html fachmann ab als ableitung von meiner .html würde ich dies mal so ändern. teste mal, vorher backup deiner orignalen zur sicherheit

(08.03.2010, 21:03)blaulichtfahrer schrieb:  // Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 24) ? currentHours - 12 : currentHours;

// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 0 : currentHours;

It`s all about Sneakers - *UNDFTD*
Zitieren
#6

Oho, hast da aber nen pöhses kleines, grünes Icon in der unteren Mitte...
Zitieren
#7

(09.03.2010, 18:00)Shadewalkerz schrieb:  Oho, hast da aber nen pöhses kleines, grünes Icon in der unteren Mitte...


ja, wenn ich da drauf drücke kann ich telefonieren Zwinkern

mfg
Zitieren
#8

so , ich habe mal rumprobiert jedoch ohne erfolg, die zeit wird immernoch im falschen format angezeigt.

aber letztendlich kann ich damit leben.

also vielen dank für die mühe


mfg
Zitieren




Benutzer, die gerade dieses Thema anschauen: 4 Gast/Gäste