1. Gary86's Avatar
    Ok so I DL the "HTC HERO WEATHER" widget from cydia. I know I have to SSH in order to change it to Hawaii weather, but what exactly do I edit?

    Thanks in advance.
    12-02-2009 05:44 PM
  2. big9erfan's Avatar
    12-02-2009 05:49 PM
  3. Gary86's Avatar
    thank you...sorry didn't do a quick srch i was in the process of stopping the new shepherd from peeing on carpet
    12-02-2009 05:52 PM
  4. Gary86's Avatar
    worked perfectly..thanks
    12-02-2009 06:27 PM
  5. big9erfan's Avatar
    Glad I could help
    12-02-2009 06:44 PM
  6. Gary86's Avatar
    When I first did it, it read military time like I had my phone set up for...now it's 200pm/1400 but reads 0200?! any thoughts on how to fix this
    12-02-2009 07:16 PM
  7. big9erfan's Avatar
    You're sure you only changed the configureme.js? Hummm,

    I'm not all that familiar with the gadget, though I know it's mostly HTML and javascript.

    You'll have to dig through the files, but look at HTC.html, from what I've see online it's around line 229 where it changes from non-military to military time. Look there.
    12-02-2009 07:32 PM
  8. Gary86's Avatar
    here's what the htc.html has

    <?xml version="1.0" encoding="UTF-8"?>
    <html><head>
    <base href="Private/"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <script type="text/javascript" src="configureMe.js"/>
    <script type="text/javascript" src="Wallpaper.js"/>

    <style>
    body {
    background-color: none;
    margin: 310px 0 0 25px;
    padding: 0px 0 0 0;
    height: 480px;
    width: 320px;
    }
    SPAN#clock
    {
    font-family: georgia;
    color: transparent;
    font-size: 30px;

    }

    SPAN#ampm
    {
    font-family: georgia;
    color: white;
    font-size: 15px;

    }

    TD#date
    {
    font-family: sans-serif;
    font-weight: bold;
    text-align: center;
    color: #b4b5b6;
    font-size: 16px;
    text-shadow: 0px 2px 2px black
    }


    </style>


    <script type="text/javascript">
    <!--
    var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday")
    var this_month_name_array = new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","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

    // -->
    <!--
    var this_weekday_name_array = new Array("Sun,","Mon,","Tues,","Wed,","Thurs,","Fri," ,"Sat,")
    var this_month_name_array = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","A ug","Sept","Oct","Nov","Dec") //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_month_name_array[this_month] + " " + this_date;//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 < PM ) ? "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 == 12 ) ? 12 : currentHours;

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

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

    function init2 ( )
    {
    timeDisplay = document.createTextNode ( "ampm" );
    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 < PM ) ? "AM" : "PM";

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

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

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

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

    //}

    // -->
    </script>

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



    <center><div id="icon" style="display:block;position: absolute;z-order:10; top: 180px; left: 100px; width: 145px; height: 90px;">
    <img id="weatherIcon" src=""/>
    </div></center>

    <div id="WeatherContainer">
    <div id="TextContainer">
    <p style="display:block;position: absolute; top: 192px;left:20px;right:0px;width: 220px;text-shadow: 0px 2px 2px black;font-size:1.4em;" id="city"></p>
    <p style="display:block; position: absolute; top: 219px; left:247px; width: 310px; text-shadow: 0px 2px 2px black;" id="temp"></p>
    <p style="display:block;position: absolute; top: 216px;left:20px;width: 50px;text-align: left;text-shadow: 0px 2px 2px black;font-size:1.0em;" id="desc"></p>
    <p
    </div>
    </div>
    <div id="Forecast" >
    <p style="display:block;position: absolute; top: 208px;left:285px;width: 310px;color: #CCCCCC;font-weight: bold;font-size:14px;" id="hi0" ></p>
    <p style="display:block;position: absolute; top: 222px;left:285px;width: 310px;color: #CCCCCC;font-weight: bold;font-size:14px;" id="low0" ></p>
    </div>

    </div>

    <table style="position: absolute; top: 160px; left: 170px; width: 180px; height: 461px;" cellspacing="0" cellpadding="0" align="LEFT">
    <tr align="CENTER" valign="top" border="0" cellpadding="0">
    <td height="12" valign="top" margin-left:150 >
    <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">
    <script language="JavaScript">document.write(this_date_str ing)</script>
    </td>
    </tr>

    <table style="position: absolute; top: -139px; left: 31px; width: 320px; height: 461px;" cellspacing="" cellpadding="" align="center">
    <td height="40" border="0">
    <img src="dg8.gif" name="hr1" width="50" heigth="69"><img
    src="dgb.gif" name="b1" width="2" heigth="69"><img
    src="dg8.gif" name="hr2" width="50" heigth="69"><img
    src="dgc.gif" name="c" width="35" heigth="69"><img
    src="dg8.gif" name="mn1" width="50" heigth="69"><img
    src="dgb.gif" name="b2" width="2" heigth="69"><img
    src="dg8.gif" name="mn2" width="50" heigth="69">
    </td></table>

    <script type="text/javascript"><!-- start

    dg0 = new Image();dg0.src = "dg0.gif";
    dg1 = new Image();dg1.src = "dg1.gif";
    dg2 = new Image();dg2.src = "dg2.gif";
    dg3 = new Image();dg3.src = "dg3.gif";
    dg4 = new Image();dg4.src = "dg4.gif";
    dg5 = new Image();dg5.src = "dg5.gif";
    dg6 = new Image();dg6.src = "dg6.gif";
    dg7 = new Image();dg7.src = "dg7.gif";
    dg8 = new Image();dg8.src = "dg8.gif";
    dg9 = new Image();dg9.src = "dg9.gif";
    dgc = new Image();dgc.src = "dgc.png";
    dgz = new Image();dgz.src = "dgz.png";
    dgb = new Image();dgb.src = "dgb.png";


    function dotime(){
    theTime=setTimeout('dotime()',1000);
    d = new Date();
    hr= d.getHours()+100;
    mn= d.getMinutes()+100;
    se= d.getSeconds()+100;
    if(hr==100){hr=112;am_pm='am';}
    else if(hr<112){am_pm='am';}
    else if(hr==112){am_pm='pm';}
    else if(hr>112){am_pm='pm';hr=(hr-12);}
    tot=''+hr+mn+se;

    if (se%2==0){document.c.src = 'dgz.gif';}
    else {document.c.src = 'dgc.gif';}
    document.hr1.src = 'dg'+tot.substring(1,2)+'.gif';
    document.hr2.src = 'dg'+tot.substring(2,3)+'.gif';
    document.mn1.src = 'dg'+tot.substring(4,5)+'.gif';
    document.mn2.src = 'dg'+tot.substring(5,6)+'.gif';

    }
    dotime();

    //end -->
    </script>

    </body></html>
    12-02-2009 07:36 PM
  9. big9erfan's Avatar
    Go to this line:

    else if(hr>112){am_pm='pm';hr=(hr-12);}

    Change it to this:

    else if(hr>112){am_pm='pm';}
    12-02-2009 08:14 PM
  10. Gary86's Avatar
    you're the man big9erfan...thanks again! it worked
    12-02-2009 08:59 PM
  11. big9erfan's Avatar
    Glad to see my years of programming came in handy for once LOL
    12-02-2009 09:17 PM
  12. Gary86's Avatar
    yeah b/c I never would have figured it out!
    12-02-2009 09:52 PM
  13. LVCIFER's Avatar
    Okay, I edited the configuration file. I changed the location to NYC. Now, the cydget is showing a blank clock, and NO location or weather at all. Any way to help?
    01-02-2010 05:31 PM
  14. LVCIFER's Avatar
    Disregard, I found my problem. There was a "=" sign as the last character in the *.js file, so I deleted and saved it, then replaced it and everything is working sweetly right now.
    01-02-2010 05:37 PM
  15. LVCIFER's Avatar
    However, what would I have to modify (and how) would I be able to enable it to accept your lock background like the other "htc cydget"? This one just has a basic black background.

    How do I fix that?
    01-02-2010 05:43 PM
  16. sargd66's Avatar
    I downloaded cydialer to go in my cydget. Problem cydialer comes with the lockscreen clock showing. I use lockscreen clock hide due to my theme ovation Z having a clock. For some reason the clock hide does not hide the cydialer clock, I want it gone!! Anyone know how and where I ssh into cydialer to get rid of that da***d clock. It's a minor annoyance but I like my themes to look perfect. Any help appreciated.
    01-02-2010 09:12 PM
LINK TO POST COPIED TO CLIPBOARD