Apple iPhone Forum und Community

Normale Version: NineHD Theme
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo nochmal, ich mache jetzt genau über 6 Stunden an dem Weather Theme rum und bekomme es nicht gebacken. Ich brauche dringend eure Hilfe bevor ich platze. Ich nutze das XHD Weather Theme in Nine HD Theme aber meine Lokalisierung stimmt nicht, es zeigt Amsterdam als Stadt an, wie ändere ich dies???

[Bild: 018c.png]

[Bild: 019kw.png]

*Leopard*

In der configure.js den StädteCode ändern.
Ich brauche auch noch Hilfe beim icon vom Game Center, der ist nicht so wie die anderen mit Rahmen, und die Infos unter der Uhr im Lockscreen sind auf Englisch, die möchte ich gerne noch in deutsch umändern. Wäre für Hilfen sehr dankbar.

Gruß Ramy
(26.10.2010, 17:36)*Leopard* schrieb: [ -> ]In der configure.js den StädteCode ändern.

Genau diesen Städte Code weiß ich nicht woher, meine Stadt ist "Ebersbach an der Fils" oder "Göppingen"

*Leopard*

Kommt drauf an woher die Weather App ihre Infos bekommt. Vermutlich von Yahoo


GMXX1802 für Ebersbach an der Fils
Danke für deine schnelle Antwort. Ich frag mich woher du das hast? Und eine Datei Namens configure.js habe ich in dem Theme Ordner leider nicht gefunden. Folgende sind vorhanden: appleAccuweatherStolen.js , yahooWeather.js und Weather.js !!!??? Welches ist denn die Configure Datei ?

*Leopard*

Entweder yahooWeather.js oder Weather.js.

Die Info habe ich von Yahoo. Wenn man den Städtenamen da eingibt und auf 10 Tages Vorschau klickt, dann wird der Code in der Adresszeile des Browsers angezeigt.
Ich gibs auf, dass hat keinen Wert mehr... ;-(
Vielleicht kann mir ja jemand einen schönen Wetter Theme zeigen, welches ich wohin kopieren muss und es endlich funkt...

*Leopard*

Na wer wird denn gleich aufgeben. 6 Stunden ist doch gar nichts *gg* .

Lad mir mal deine beiden .js Dateien hoch und ich trag das für dich ein.
Ich finde die Stelle, wo der Code eingesetzt werden soll nicht!?
Hier bitte die beiden Dateien

Weather.js :
Code:
    // WeatherWidget.theme
// Produced by Adam Watkins (http://www.stupidpupil.co.uk)

// 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 = "NLXX0002" //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 'oneLine' and 'split'.
// (Add your own to the CSS folder!)
var stylesheetWall = 'oneLine' //'split'|'oneLine'
var stylesheetLock = 'iconOnly' //See above.

// Supplied icon sets are 'HTC' 'mau', 'spils'
// Images must follow the same naming schema as the 'klear' set (borrowed from KWeather)
var iconSetWall = 'XHD' //'XHD'
var iconExtWall = ".png" //'.png'|.'gif' etc.
var iconSetLock = 'klear' //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

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

var descriptions =

[

"tornado",

"tropical storm",

"hurricane!",

"severe thunderstorms",

"thunderstorms",

"mixed rain and snow",

"mixed rain and sleet",

"mixed snow and sleet",

"freezing drizzle!",

"drizzle",

"freezing rain",

"showers",

"showers",

"snow flurries",

"light snow showers",

"blowing snow",

"snow",

"hail",

"sleet",

"dust",

"foggy!",

"haze",

"smoky",

"blustery",

"windy",

"cold",

"cloudy ",

"mostly cloudy",

"mostly cloudy",

"partly cloudy",

"partly cloudy",

"clear night",

"sunny",

"fair",

"fair",

"mixed rain and hail",

"hot",

"isolated thunderstorms",

"scattered thunderstorms",

"scattered thunderstorms",

"scattered showers",

"heavy snow",

"scattered snow showers",

"heavy snow",

"partly cloudy",

"thundershowers",

"snow showers",

"isolated thundershowers",

"not available",

]

var MiniIcons =
[
    "tstorm3",        //0     tornado
    "tstorm3",        //1     tropical storm
    "tstorm3",        //2     hurricane
    "tstorm3",        //3     severe thunderstorms
    "tstorm2",        //4     thunderstorms
    "sleet",        //5     mixed rain and snow
    "sleet",        //6     mixed rain and sleet
    "sleet",        //7     mixed snow and sleet
    "sleet",        //8     freezing drizzle
    "light_rain",        //9     drizzle
    "sleet",        //10     freezing rain
    "shower2",        //11     showers
    "shower2",        //12     showers
    "snow1",        //13     snow flurries
    "snow2",        //14     light snow showers
    "snow4",        //15     blowing snow
    "snow4",        //16     snow
    "hail",        //17     hail
    "sleet",        //18     sleet
    "mist",        //19     dust
    "fog",        //20     foggy
    "fog",        //21     haze
    "fog",        //22     smoky
    "cloudy1",        //23     blustery
    "cloudy1",        //24     windy
    "overcast",        //25     cold
    "cloudy1",        //26     cloudy
    "cloudy4_night",        //27     mostly cloudy (night)
    "cloudy4",        //28     mostly cloudy (day)
    "cloudy2_night",        //29     partly cloudy (night)
    "cloudy2",        //30     partly cloudy (day)
    "sunny_night",        //31     clear (night)
    "sunny",        //32     sunny
    "fair_night",        //33     fair (night)
    "fair",        //34     fair (day)
    "hail",        //35     mixed rain and hail
    "sunny",        //36     hot
    "tstorm1",        //37     isolated thunderstorms
    "tstorm2",        //38     scattered thunderstorms
    "tstorm2",        //39     scattered thunderstorms
    "tstorm2",        //40     scattered showers
    "snow5",        //41     heavy snow
    "snow3",        //42     scattered snow showers
    "snow5",        //43     heavy snow
    "cloudy1",        //44     partly cloudy
    "storm1",        //45     thundershowers
    "snow2",        //46     snow showers
    "tstorm1",        //47     isolated thundershowers
    "dunno",        //3200     not available
]

function constructError (string)
{
    return {error:true, errorString:string};
}

function findChild (element, nodeName)
{
    var child;
    
    for (child = element.firstChild; child != null; child = child.nextSibling)
    {
        if (child.nodeName == nodeName)
            return child;
    }
    
    return null;
}


function fetchWeatherData (callback, zip)
{
    url="http://weather.yahooapis.com/forecastrss?u=f&p=" //u=Farenheit, because accuWeather sucks
    
    var xml_request = new XMLHttpRequest();
    xml_request.onload = function(e) {xml_loaded(e, xml_request, callback);}
    xml_request.overrideMimeType("text/xml");
    xml_request.open("GET", url+zip);
    xml_request.setRequestHeader("Cache-Control", "no-cache");
    xml_request.send(null);    
    
    return xml_request;
}

function xml_loaded (event, request, callback)
{
    if (request.responseXML)
    {
         var obj = {error:false, errorString:null};
        var effectiveRoot = findChild(findChild(request.responseXML, "rss"), "channel");
        obj.city = findChild(effectiveRoot, "yweather:location").getAttribute("city");
        obj.realFeel = findChild(effectiveRoot, "yweather:wind").getAttribute("chill");//Only accounts for windChill
        
        conditionTag = findChild(findChild(effectiveRoot, "item"), "yweather:condition");
        obj.temp = conditionTag.getAttribute("temp");
        obj.icon = conditionTag.getAttribute("code");
        obj.description = conditionTag.getAttribute("text");
        callback (obj);
    }else{
        callback ({error:true, errorString:"XML request failed. no responseXML"});
    }
}


function validateWeatherLocation (location, callback)
{
    var obj = {error:false, errorString:null, cities: new Array};
    obj.cities[0] = {zip: location}; //Not very clever, are we?
    callback (obj);
}

var postal;
var demoMode = false;
var enabled;

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

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="Icon Sets/"+iconSet+"/"+"cloudy1"+iconExt;
        document.getElementById("city").innerText="Somewhere";
        document.getElementById("desc").innerText=descriptions[obj.icon];
        document.getElementById("temp").innerText="100º";
        
    }else{
    document.getElementById("weatherIcon").src="Icon Sets/"+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=descriptions[obj.icon];
        
        if(useRealFeel == true){
            tempValue = convertTemp(obj.realFeel);
        }else{
            tempValue = convertTemp(obj.temp)
        }
        document.getElementById("temp").innerText=tempValue+"º";
        document.getElementById("weatherIcon").src="Icon Sets/"+iconSet+"/"+MiniIcons[obj.icon]+iconExt;
        document.getElementById("WeatherContainer").className = "";    

        
    }else{
        //Could be down to any number of things, which is unhelpful...
        document.getElementById("WeatherContainer").className = "errorWeatherDataFetch";    
    }
    
    
}

function weatherRefresherTemp(){ //I'm a bastard ugly hack. Hate me.
    fetchWeatherData(dealWithWeather,postal);
    setTimeout(weatherRefresherTemp, 60*1000*updateInterval);
}


Und yahooWeather.js :

Code:
var MiniIcons =
[
    "tstorm3",        //0     tornado
    "tstorm3",        //1     tropical storm
    "tstorm3",        //2     hurricane
    "tstorm3",        //3     severe thunderstorms
    "tstorm2",        //4     thunderstorms
    "sleet",        //5     mixed rain and snow
    "sleet",        //6     mixed rain and sleet
    "sleet",        //7     mixed snow and sleet
    "sleet",        //8     freezing drizzle
    "light_rain",        //9     drizzle
    "sleet",        //10     freezing rain
    "shower2",        //11     showers
    "shower2",        //12     showers
    "snow1",        //13     snow flurries
    "snow2",        //14     light snow showers
    "snow4",        //15     blowing snow
    "snow4",        //16     snow
    "hail",        //17     hail
    "sleet",        //18     sleet
    "mist",        //19     dust
    "fog",        //20     foggy
    "fog",        //21     haze
    "fog",        //22     smoky
    "cloudy1",        //23     blustery
    "cloudy1",        //24     windy
    "overcast",        //25     cold
    "cloudy1",        //26     cloudy
    "cloudy4_night",        //27     mostly cloudy (night)
    "cloudy4",        //28     mostly cloudy (day)
    "cloudy2_night",        //29     partly cloudy (night)
    "cloudy2",        //30     partly cloudy (day)
    "sunny_night",        //31     clear (night)
    "sunny",        //32     sunny
    "mist_night",        //33     fair (night)
    "mist",        //34     fair (day)
    "hail",        //35     mixed rain and hail
    "sunny",        //36     hot
    "tstorm1",        //37     isolated thunderstorms
    "tstorm2",        //38     scattered thunderstorms
    "tstorm2",        //39     scattered thunderstorms
    "tstorm2",        //40     scattered showers
    "snow5",        //41     heavy snow
    "snow3",        //42     scattered snow showers
    "snow5",        //43     heavy snow
    "cloudy1",        //44     partly cloudy
    "storm1",        //45     thundershowers
    "snow2",        //46     snow showers
    "tstorm1",        //47     isolated thundershowers
    "dunno",        //3200     not available
]
    
var MiniIcons = //Translate this to whatever you want
[
    "Storm",            //0     tornado
    "Storm",            //1     tropical storm
    "Storm",            //2     hurricane
    "Gewitter",            //3     severe thunderstorms
    "Gewitter",            //4     thunderstorms
    "Schnee/Regen",        //5     mixed rain and snow
    "Schneeregen",        //6     mixed rain and sleet
    "Schneeregen",        //7     mixed snow and sleet
    "Schneeregen",        //8     freezing drizzle
    "Nieselregen",        //9     drizzle
    "Gefrierender Regen",        //10     freezing rain
    "Regen",            //11     showers
    "Regen",            //12     showers
    "Schnee",            //13     snow flurries
    "Schnee",            //14     light snow showers
    "Schnee",            //15     blowing snow
    "Schnee",            //16     snow
    "Hagel",            //17     hail
    "sleet",            //18     sleet
    "Nebel",            //19     dust
    "Nebel",            //20     foggy
    "Neblig",            //21     haze
    "Neblig",            //22     smoky
    "Stuermisch",        //23     blustery
    "Windig",            //24     windy
    "Kalt",                //25     cold
    "Wolkig",            //26     cloudy
    "meist Wolkig",        //27     mostly cloudy (night)
    "meist Wolkig",        //28     mostly cloudy (day)
    "teils Wolkig",        //29     partly cloudy (night)
    "teils Wolkig",        //30     partly cloudy (day)
    "Sternenklar",        //31     clear (night)
    "Sonnig",            //32     sunny
    "Klar",                //33     fair (night)
    "Schoen",            //34     fair (day)
    "Hagel",            //35     mixed rain and hail
    "Heiss",                //36     hot
    "Gewitter",            //37     isolated thunderstorms
    "Gewitter",            //38     scattered thunderstorms
    "Gewitter",            //39     scattered thunderstorms
    "Schauer",            //40     scattered showers
    "Schnee",            //41     heavy snow
    "Schnee",            //42     scattered snow showers
    "Schnee",            //43     heavy snow
    "teils Wolkig",        //44     partly cloudy
    "Gewitter",            //45     thundershowers
    "Schnee",            //46     snow showers
    "Gewitter",            //47     isolated thundershowers
    "Fehler",            //3200     not available
]

function constructError (string)
{
    return {error:true, errorString:string};
}

function findChild (element, nodeName)
{
    var child;
    
    for (child = element.firstChild; child != null; child = child.nextSibling)
    {
        if (child.nodeName == nodeName)
            return child;
    }
    
    return null;
}


function fetchWeatherData (callback, zip)
{
    url="http://de.wetter.yahoo.com/deutschland/baden-w%E3%BCrttemberg/ebersbachander-fils-646239/" //u=Farenheit, because accuWeather sucks
    
    var xml_request = new XMLHttpRequest();
    xml_request.onload = function(e) {xml_loaded(e, xml_request, callback);}
    xml_request.overrideMimeType("text/xml");
    xml_request.open("GET", url+zip);
    xml_request.setRequestHeader("Cache-Control", "no-cache");
    xml_request.send(null);    
    
    return xml_request;
}

function xml_loaded (event, request, callback)
{
    if (request.responseXML)
    {
         var obj = {error:false, errorString:null};
        var effectiveRoot = findChild(findChild(request.responseXML, "rss"), "channel");
        obj.city = findChild(effectiveRoot, "yweather:location").getAttribute("city");
        obj.realFeel = findChild(effectiveRoot, "yweather:wind").getAttribute("chill");//Only accounts for windChill
        
        conditionTag = findChild(findChild(effectiveRoot, "item"), "yweather:condition");
        obj.temp = conditionTag.getAttribute("temp");
        obj.icon = conditionTag.getAttribute("code");
        obj.description = conditionTag.getAttribute("text");
        callback (obj);
    }else{
        callback ({error:true, errorString:"XML request failed. no responseXML"});
    }
}


function validateWeatherLocation (location, callback)
{
    var obj = {error:false, errorString:null, cities: new Array};
    obj.cities[0] = {zip: location}; //Not very clever, are we?
    callback (obj);
}

Kannst du mir das auch gleich in deutsch umändern ???
Hier nochmal die Dateien:

Weather.js : http://www.loaditup.de/548658.html

yahooWeather.js : http://www.loaditup.de/548660.html

siehst du oben in deiner Wather.js das NLXX0002 ?????? Da kommt dein Code rein!!! GMXX..... je nachdem, wo du in D herkommst!!! Zwinkern

tarkan78

(24.10.2010, 12:30)Uhoffi schrieb: [ -> ]
(23.10.2010, 23:19)tarkan78 schrieb: [ -> ]Hi
wie ändere das icon für LiveClock?Hab das icon in LiveClock@2x benannt und in Bundles com.apple.springboard kopiert aber es ändert sich nicht.
Was muss ich machen damit sich das ändert?
Danke

Mfg tarkan78

iPhone4 iOS 4.1 JB

LiveClock aus Cydia installieren und das NineHD liveClock Theme in WB aktivieren.


Natürlich hab ich LiveClock aus Cydia runtergeladen wozu brauch ich wohl das icon.
Ich hab kein NineHD LiveClock in Winterboard
Kann mir jemand sagen wie ich das LiveClock icon hinkriege.

*Leopard*

@Ramy78 Die Weather.js war es
(26.10.2010, 19:03)*Leopard* schrieb: [ -> ]@Ramy78 Die Weather.js war es

Hey danke dir vielmals. Jetz versuche ich noch das alles irgendwie auf deutsch umzuändern. Und ich brauche noch wie tarkan78 das icon für die Uhr (Live Clock) und andere Wifi / 3G symbole sowie statusbar icons.

Bin für jede Antwort sehr dankbar!

M@rkus

Hat jemand ne Lösung zu den Push-Nachrichten??
Hallo @ all,

hat jemand ne Idee wie ich auch den Background beim laden in NineHD bekomm?

Ich würde gerne diesen schwarzen BG gegen einen zum NineHD passenden tauschen, aber finde da nicht wirklich eine Möglichkeit.

Ich habe hier ein Theme das dies unter OS 3.1.2 getan hat, aber das funzt nicht mehr seit dem ich iOS 4.1 drauf hab.

Gruß Edelprinz
Hallo,

hat denn keiner eine Idee zum Battery Background?

Gruß Edelprinz
@sneaker thanks, das rote ist klasse

ein problemchen hab ich noch:

Lockinfo dunkelt den lockscreen von oben bis kurz vor den slider ab, egal ob ein plugin aktiviert ist oder nicht. kann ich das irgendwie wegbekommen.

[Bild: bild_anzeigen_thumb.php?img=128086.png]

wenn ich lockinfo ganz deaktiviere ist die abdunkelung weg, also kommts totsicher von lockinfo, ich find aber nicht wie ich es weg bekomm...

Schau mal unter Lockinfo Settings>Lockscreen>Opacity
Da Deckkraft auf "Cells and Headers" oder "Cells only" oder ganz "Transparent" stellen. Je nachdem wie du es haben magst.
Besten Dank !!!