Page 1 of 2 12 LastLast
Results 1 to 15 of 25

This is for those who are good at modding themes. I'm pretty good at it, ... Apple iPhone forum

  1. #1
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397

    AnyCity Weather Theme Modding...??

    Advertisement



    This is for those who are good at modding themes. I'm pretty good at it, but I can't figure this one part out....once I do this, my iPhone will be 2% away from being PERFECT

    Okay, So I downloaded AnyCity Weather (via Cydia) and I love it....BUT, on the springboard, there is a little bar that displays the weather, I like it a lot, but I want to know how to edit the color (or minimize the opacity) of the bar. I've attached an screenie and circled the bar in red.

    Anyone know how to mod this? I would greatly appreciate ANY help
    Attached Images Attached Images

  2. #2
    calm_tiger's Avatar
    calm_tiger no está en línea Stack level 5
    Join Date
    Oct 2006
    Posts
    1,418
    Did you try to edit it via SSH?
    Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A400 Safari/528.16

  3. #3
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    Yeah, I've been looking around for the image, with NO luck. I'm pretty good at finding these sorta things, but I'm stumped on this one and it's bugging me LOL

  4. #4
    neorabid's Avatar
    neorabid no está en línea Device Pro
    Join Date
    Sep 2008
    PIN/ID
    neorabid
    Posts
    752
    Im not near a wifi connection so I cant SSH into my phone but I would look into the images into the theme folder and see if there is an image of a small bar that is black opaque and then delete it or replace it with a transparent PNG, then look in the setting files for any type of Hex Code such as #FFFFFF [which is straight white] for the text output color.

    Thats where I would start from, just my .02
    Quotes to live by:
    • Inspiration is like a lost sock. When your searching you can never find it, and when it appears, you least expect it.
    • There are no exceptions to the rule that everybody likes to be an exception to the rule.
    • Ideas are the factors that lift civilization. They create revolutions. There is more dynamite in an idea than in many bombs.
    • Realize deeply that the present moment is all you ever have.

  5. #5
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    Thanks neo....yeah, I've been browsing through the theme folder (AnyCity Theme) and I cannot find an image that even looks like that LOL, I'm thinking it might be in the Wallpaper.html file. I'm gonna look right now.

    Thanks guys, always VERY helpful

    Here is what the Wallpaper.html file shows (below). What do you think it is Neo?



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

    <style>
    body {
    background-color: none;
    margin: 0;
    padding: 20px 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()" background="/private/var/mobile/Library/LockBackground.jpg">

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

    </body></html>
    Last edited by beeshabo; 10-09-2009 at 07:13 PM.

  6. #6
    calm_tiger's Avatar
    calm_tiger no está en línea Stack level 5
    Join Date
    Oct 2006
    Posts
    1,418
    Beeshabo what's really strange is that I just installed this theme but my bar is solid black and not red?!? I will post a pic in a few.
    Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A400 Safari/528.16

  7. #7
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    Well mine is opaque, it's not solid, I put the red around the bar just to point it out to you guys.....

  8. #8
    calm_tiger's Avatar
    calm_tiger no está en línea Stack level 5
    Join Date
    Oct 2006
    Posts
    1,418
    Gotcha still kind of odd though.
    Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A400 Safari/528.16

  9. #9
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    yes it is....I'm sure it's an image, if not, then it's in one of the .html pages....damn!!!!

  10. #10
    neorabid's Avatar
    neorabid no está en línea Device Pro
    Join Date
    Sep 2008
    PIN/ID
    neorabid
    Posts
    752
    <script type="text/javascript" src="configureMe.js"/>
    <script type="text/javascript" src="Wallpaper.js"/>


    post the sources for those plz
    Quotes to live by:
    • Inspiration is like a lost sock. When your searching you can never find it, and when it appears, you least expect it.
    • There are no exceptions to the rule that everybody likes to be an exception to the rule.
    • Ideas are the factors that lift civilization. They create revolutions. There is more dynamite in an idea than in many bombs.
    • Realize deeply that the present moment is all you ever have.

  11. #11
    neorabid's Avatar
    neorabid no está en línea Device Pro
    Join Date
    Sep 2008
    PIN/ID
    neorabid
    Posts
    752
    <style>
    body {
    background-color: none;
    margin: 0;
    padding: 20px 0 0 0;
    height: 480px;
    width: 320px;
    }
    </style>

    Im pretty sure thats for making the box around the text but I still want to see the javascript source.
    Quotes to live by:
    • Inspiration is like a lost sock. When your searching you can never find it, and when it appears, you least expect it.
    • There are no exceptions to the rule that everybody likes to be an exception to the rule.
    • Ideas are the factors that lift civilization. They create revolutions. There is more dynamite in an idea than in many bombs.
    • Realize deeply that the present moment is all you ever have.

  12. #12
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    That's what I figured...here is Wallpaper javascript

    var postal;
    var demoMode = false;
    var enabled;

    var xmlReq = new XMLHttpRequest();
    var launchReq = new XMLHttpRequest();

    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(){

    update();

    if (enabled == true){
    if (demoMode == true){
    document.getElementById("weatherIcon").src="Icon Sets/"+iconSet+"/"+"cloudy1"+iconExt;
    document.getElementById("city").innerText="Somewhe re";
    document.getElementById("desc").innerText="Partly Cloudy";
    document.getElementById("temp").innerText="100º";
    document.getElementById("forecast").innerText="Sun ";
    }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").classN ame = "";
    weatherRefresherTemp();
    }else{
    document.getElementById("city").innerText="Not Found";
    document.getElementById("WeatherContainer").classN ame = "errorLocaleNotFound";
    }
    }else{
    document.getElementById("city").innerText=obj.erro rString;
    document.getElementById("WeatherContainer").classN ame = "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.desc ription.toLowerCase();

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

    /*ProductRed*/
    lastResults = new Array;
    lastResults[0] = {daycodebj.daycode, iconbj.icon, hibj.hi, lobj.lo, nowbj.temp};
    var c = obj.forecast.length;
    if (c > 6) c = 6; // just to be safe
    var i = 0;
    while (i < c)
    {
    var forecast = obj.forecast[i];

    document.getElementById('day'+i).innerText = forecast.daycode;
    document.getElementById('hi'+i).innerText = convertTemp(forecast.hi)+"º";;
    document.getElementById('low'+i).innerText = convertTemp(forecast.lo)+"º";;

    document.getElementById('wIcon'+i).src="Icon Sets/"+iconSet+"/"+MiniIcons[forecast.icon]+iconExt;

    lastResults[i+1] = {daycode:forecast.daycode, icon:forecast.icon, hi:forecast.hi, lo:forecast.lo};

    i = i + 1;
    }
    /*ProductRed*/

    document.getElementById("WeatherContainer").classN ame = "";


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


    }

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

    function showElement(name)
    {
    document.getElementById(name + "Icon").style.display = 'inline';

    if (xmlReq.responseXML.getElementsByTagName("MMS")[0].firstChild.nodeValue == "1") {
    document.getElementById("MMSNumber").innerHTML = "<img src='imgs/mms.png' />1 New Multimedia Message";
    } else {
    document.getElementById("MMSNumber").innerHTML = "<img src='imgs/mms.png' />" + xmlReq.responseXML.getElementsByTagName("MMS")[0].firstChild.nodeValue + " New Multimedia Messages";
    }

    if (xmlReq.responseXML.getElementsByTagName("SMS")[0].firstChild.nodeValue == "1") {
    document.getElementById("SMSNumber").innerHTML = "<img src='imgs/sms.png' />1 New Text Message";
    } else {
    document.getElementById("SMSNumber").innerHTML = "<img src='imgs/sms.png' />" + xmlReq.responseXML.getElementsByTagName("SMS")[0].firstChild.nodeValue + " New Text Messages";
    }

    if (xmlReq.responseXML.getElementsByTagName("Call")[0].firstChild.nodeValue == "1") {
    document.getElementById("CallNumber").innerHTML = "<img src='imgs/call.png' />1 Missed Call/Voicemail";
    } else {
    document.getElementById("CallNumber").innerHTML = "<img src='imgs/call.png' />" + xmlReq.responseXML.getElementsByTagName("Call")[0].firstChild.nodeValue + " Missed Calls/Voicemails";
    }

    if (xmlReq.responseXML.getElementsByTagName("Mail")[0].firstChild.nodeValue == "1") {
    document.getElementById("MailNumber").innerHTML = "<img src='imgs/mail.png' />1 New E-Mail";
    } else {
    document.getElementById("MailNumber").innerHTML = "<img src='imgs/mail.png' />" + xmlReq.responseXML.getElementsByTagName("Mail")[0].firstChild.nodeValue + " New E-Mails";
    }

    if (xmlReq.responseXML.getElementsByTagName("IM")[0].firstChild.nodeValue == "1") {
    document.getElementById("IMNumber").innerHTML = "<img src='imgs/im.png' />1 New Instant Message";
    } else {
    document.getElementById("IMNumber").innerHTML = "<img src='imgs/im.png' />" + xmlReq.responseXML.getElementsByTagName("IM")[0].firstChild.nodeValue + " New Instant Messages";
    }
    }

    function hideElement(name)
    {
    document.getElementById(name + "Icon").style.display = 'none'; }

    function updateIcon(name)
    {
    var show = 0;
    try
    {
    if (xmlReq.responseXML.getElementsByTagName(name)[0].firstChild.nodeValue != "0")
    show = 1;
    }
    catch(error)
    {
    }

    if (show)
    showElement(name);
    else
    hideElement(name);
    }

    function processXml()
    {
    if (xmlReq.readyState != 4)
    return;

    if (xmlReq.status != 200 && xmlReq.status != 0)
    return;

    updateIcon("Calendar");
    updateIcon("Call");
    updateIcon("RSS");
    updateIcon("MMS");
    updateIcon("SMS");
    updateIcon("IM");
    updateIcon("Mail");
    updateIcon("Silent");
    }

    function update()
    {

    xmlReq.onreadystatechange = processXml; xmlReq.timeout = 2000;
    xmlReq.open("GET", "http://127.0.0.1:16322/status", true);
    xmlReq.send();

    setTimeout(update, 3000);
    }

    function iconClick(name)
    {
    }
    Last edited by beeshabo; 10-09-2009 at 07:44 PM.

  13. #13
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    Here is the ConfigureMe javascript..some parts won't show

    // 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 = "91767" //"OCN|AU|VIC|MELBOURNE" //"ASI|PH|RP077|MAKATI" //e.g. 'Defiance, Ohio'|'Moscow, Russia'|'Ledyard, AT'|'London, UK'

    // Set to 'false' if you'd prefer Farenheit var isCelsius = false //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 = true; //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 = 'split_bk' //'originalBubble'|'myopia'|'iconOnly'|'split'|'oneL ine'
    var stylesheetLock = 'twoLine' //See above.

    // The only supplied icon set is 'klear'
    // Images must follow the same naming schema as the 'klear' set (borrowed from KWeather) var iconSetWall = 'katra' //'klear'|'tango'
    var iconExtWall = ".png" //'.png'|.'gif' etc.
    var iconSetLock = 'minis' //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

  14. #14
    neorabid's Avatar
    neorabid no está en línea Device Pro
    Join Date
    Sep 2008
    PIN/ID
    neorabid
    Posts
    752
    <style>
    body {
    background-image: 'trans.png';
    margin: 0;
    padding: 20px 0 0 0;
    height: 480px;
    width: 320px;
    }
    </style>

    find a transparent PNG and place it in the theme folder then use the directory for background image.
    or

    <style>
    body {
    margin: 0;
    padding: 20px 0 0 0;
    height: 480px;
    width: 320px;
    }
    </style>

    either delete or comment out the background color from the original. place // before background-color to comment out
    Quotes to live by:
    • Inspiration is like a lost sock. When your searching you can never find it, and when it appears, you least expect it.
    • There are no exceptions to the rule that everybody likes to be an exception to the rule.
    • Ideas are the factors that lift civilization. They create revolutions. There is more dynamite in an idea than in many bombs.
    • Realize deeply that the present moment is all you ever have.

  15. #15
    beeshabo's Avatar
    beeshabo no está en línea Stack level 6
    Join Date
    Nov 2007
    Posts
    2,397
    I understand now, I can make a transparent .png and name it trans.png

    Then, should I just place it into the AnyCity Weather.theme folder? or into Bundles etc. etc.

    I'lll try the image one fist

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •