Page 241 of 614 FirstFirst ... 141191231239240241242243251291341 ... LastLast
Results 4,801 to 4,820 of 12265

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: UniAW7

  1. #4801
    Quote Originally Posted by sabbagh View Post
    Thanks for your reply. Widgetweather.xml is present in the documents folder and is updating fine.

    What do you mean by "the Maine's file". I installed UniAW 7,1 from post #1 and changed the main.js as noted. Still
    i get black screen.
    He means "main.js", please copy & paste here the edits you made to the main.js file, like KOH says, sometimes when copying & pasting for some reason the inverted comma's may get messed up, he just wants to see exactly what you have in your main.js to be sure it's correct before looking elsewhere.
    Last edited by <Ian Nicoll/>; 2015-03-21 at 04:14 PM.

  2. #4802
    Quote Originally Posted by ;7242914
    In main.js look for this code & add the two slashes (in red) exactly as shown below (directly in front of the second "else if" statement), see if that fixes it.
    Code:
    // NO SUNNY DESCRIPTION FOR NIGHT CONDITION
    if ((obj.code[0] == 32) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[31] + wind_description; }
    else if ((obj.code[0] == 34) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[33] + wind_description; }
    //else if ((lang == "am") || (lang =="en") && (WeatherSource == "widgetweather")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[0]] + wind_description; }
    else { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[0]] + wind_description; }
    Tried this but it broke the widget

    -imageuploadedbymodmyi1426947322.269038.jpg

  3. #4803
    Quote Originally Posted by <Ian Nicoll/> View Post
    He means "main.js", please copy & paste here the edits you made to the main.js file, like KOH says, sometimes when copying & pasting for some reason the inverted comma's may get messed up, he just wants to see exactly what you have in your main.js to be sure it's correct before looking elsewhere.
    Thanks Ian.

    This is what i have in the main.js:

    function updateWeather() {
    if (iOS == false) { var url = "widgetweather" + xmlnumber + ".xml"; } else { var url = "file:///private/var/mobile/Documents/widgetweather" + xmlnumber + ".xml"; }
    //jQuery.get(url, function(data) {
    groovyAPI.do ( { read: "widgetweather" + xmlnumber + ".xml" }, function(data){
    obj.updatetimestring = $(data).find('updatetimestring').text();

  4. #4804
    Quote Originally Posted by laMe View Post
    Tried this but it broke the widget
    It shouldn't break the widget, I can't really tell looking at it your screen shot in iFile, please use the attached main.js, only difference between this one and the one from post 1 link is the 2 slashes
    Download it, unzip the file & replace your main.js with this one (not edited for GroovyPlus stuff).
    Attached Files Attached Files

  5. The Following User Says Thank You to <Ian Nicoll/> For This Useful Post:

    laMe (2015-03-21)

  6. #4805
    Quote Originally Posted by sabbagh View Post
    Thanks Ian.

    This is what i have in the main.js:
    The code is good, and since you have an updating xml file I would say WW2 is also good.
    So GroovyPlus has issue, first re-install them (no need to first remove them) be sure to check your screen at end of install that all 3 end with code 0, code 0 means it installed correctly.

    I can't remember (I don't use GroovyPlus stuff) but I think you are better to install GroovyAPI+ twice (one after the other) to be sure your folder permissions are correctly set.
    Last edited by <Ian Nicoll/>; 2015-03-21 at 04:36 PM.

  7. The Following User Says Thank You to <Ian Nicoll/> For This Useful Post:

    kristatos (2015-03-21)

  8. #4806
    Here is my main.js

    https://www.dropbox.com/s/4hzwrnpp78ybqw7/main.js?dl=0

    Others are breaking widget for some reason

  9. #4807
    Quote Originally Posted by laMe View Post
    Here is my main.js
    Others are breaking widget for some reason
    All I did here was add the slashes, can't check it as this is old version, it also has groovyPlus switch + I also see a fail function missing, but you can try it, if it doesn't work I think you must update to latest version from post 1.
    Attached Files Attached Files

  10. The Following User Says Thank You to <Ian Nicoll/> For This Useful Post:

    laMe (2015-03-21)

  11. #4808
    My iPhone is a Part of Me signori's Avatar
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    918
    Thanks
    689
    Thanked 758 Times in 397 Posts

    Hey guys. I fixed my fair problem yesterday by doing a couple of things. In the main.js file under the // NO SUNNY DESCRIPTION FOR NIGHT CONDITION. I deleted that section and added this code(below). The code is from an older version of Uniaw7. Also I only tested it with uniaw7 not 7.1 yet.

    if ((obj.code[stateD] == 32) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[31] + wind_description; }
    else { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[stateD]] + wind_description; }

    document.getElementById("Day0Icon").src = "Icon Sets/"+iconSet+"/"+AdjustIcon(obj.code[stateD], where)+".png";
    $("#Day0Lo").html(lowtext + '<span class="FontcolorCold">' + obj.low[stateD] + tempUnit_HiLo + '</span>');
    $("#Day0Hi").html(hightext + '<span class="FontColorHot">' + obj.high[stateD] + tempUnit_HiLo + '</span>');

  12. #4809
    Quote Originally Posted by signori View Post
    Hey guys. I fixed my fair problem yesterday by doing a couple of things. In the main.js file under the // NO SUNNY DESCRIPTION FOR NIGHT CONDITION. I deleted that section and added this code(below). The code is from an older version of Uniaw7. Also I only tested it with uniaw7 not 7.1 yet.
    Won't work with latest version of 7.1, it doesn't use stateD anymore (used for liveForecast), it also no longer has the classes FontColorCold & FontColorHot, so I think your fix is only for your version & others using any of your mods.

    I work with one version & just keep updating it so I have no old versions to check with.
    Last edited by <Ian Nicoll/>; 2015-03-21 at 05:20 PM.

  13. The Following User Says Thank You to <Ian Nicoll/> For This Useful Post:

    Marty McFly (2015-03-22)

  14. #4810
    Quote Originally Posted by <Ian Nicoll/> View Post
    The code is good, and since you have an updating xml file I would say WW2 is also good.
    So GroovyPlus has issue, first re-install them (no need to first remove them) be sure to check your screen at end of install that all 3 end with code 0, code 0 means it installed correctly.

    I can't remember (I don't use GroovyPlus stuff) but I think you are better to install GroovyAPI+ twice (one after the other) to be sure your folder permissions are correctly set.
    I re-installed all again with 0 code. I get black screen on both Lockscreen and SpringBoard. Could you post permissions of each folder? For example:
    mobile/mobile - read, write, execute

  15. #4811
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by <Ian Nicoll/> View Post
    In main.js look for this code & add the two slashes (in red) exactly as shown below (directly in front of the second "else if" statement), see if that fixes it.
    Code:
    // NO SUNNY DESCRIPTION FOR NIGHT CONDITION
    if ((obj.code[0] == 32) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[31] + wind_description; }
    else if ((obj.code[0] == 34) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[33] + wind_description; }
    //else if ((lang == "am") || (lang =="en") && (WeatherSource == "widgetweather")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[0]] + wind_description; }
    else { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[0]] + wind_description; }
    I don't think that will quite nail it.. because in the 'else' expression you'll still be calling for the 48 code Yahoo description which still uses Fair - unless changed somewhere in the translation.js..

    I think you would leave the 'else if' expression - but change the 'then clause'.. So use this instead:
    Code:
    else if ((lang == "am") || (lang =="en") && (WeatherSource == "widgetweather")) { document.getElementById("Day0desc").innerHTML = obj.desc + wind_description; }
    This will pull the actual description from weather.com itself (in the xml) rather than use the Yahoo 48-code table to determine Day0desc. And weather.com (our xml) doesn't use the term "Fair" - at least not regularly..

  16. The Following User Says Thank You to NewD For This Useful Post:

    #m37h{ (2015-03-22)

  17. #4812
    My iPhone is a Part of Me signori's Avatar
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    918
    Thanks
    689
    Thanked 758 Times in 397 Posts

    Quote Originally Posted by <Ian Nicoll/> View Post
    Won't work with latest version of 7.1, it doesn't use stateD anymore (used for liveForecast), it also no longer has the classes FontColorCold & FontColorHot, so I think your fix is only for your version & others using any of your mods.

    I work with one version & just keep updating it so I have no old versions to check with.
    I figured it probably wouldn't work with 7.1. I like using uniaw7 instead of 7.1 is for the forecast animations. I love weather animations I guess.

  18. #4813
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by signori View Post
    I love weather animations I guess.
    7.1 also has weather animations... Not sure what you meant there..

  19. #4814
    My iPhone is a Part of Me signori's Avatar
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    918
    Thanks
    689
    Thanked 758 Times in 397 Posts

    Quote Originally Posted by NewD View Post
    7.1 also has weather animations... Not sure what you meant there..
    Sorry I meant the day forecast animations. When you touch a different day in the forecast it will show you what the weather will be like that day. Its gone in 7.1.

  20. #4815
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    I swear the more I code - the more I realize that there are just 'gaps' in my knowledge.. In studying more of Ian/Dacal's code here today - I discovered another 'way' of doing an if/then statement...

    I saw this:
    Code:
    obj.temp = (UseCelsius == true) ? $(data).find('condition').attr('temp')*1 : Math.round(($(data).find('condition').attr('temp') * 9/5) + 32);
    Which after some reading I've learned it just another way to write:
    Code:
    if (UseCelsius == true) { obj.temp =  $(data).find('condition').attr('temp')*1; }
    else { obj.temp Math.round(($(data).find('condition').attr('temp') * 9/5) + 32); }
    WHO KNEW??!! Not me.. I'm sure there are reasons when one syntax is preferable over the other... Haven't figured that out yet..

  21. The Following 2 Users Say Thank You to NewD For This Useful Post:

    #m37h{ (2015-03-22), bliken (2015-03-21)

  22. #4816
    Quote Originally Posted by NewD View Post
    I swear the more I code - the more I realize that there are just 'gaps' in my knowledge.. In studying more of Ian/Dacal's code here today - I discovered another 'way' of doing an if/then statement...

    I saw this:
    Code:
    obj.temp = (UseCelsius == true) ? $(data).find('condition').attr('temp')*1 : Math.round(($(data).find('condition').attr('temp') * 9/5) + 32);
    Which after some reading I've learned it just another way to write:
    Code:
    if (UseCelsius == true) { obj.temp =  $(data).find('condition').attr('temp')*1; }
    else { obj.temp Math.round(($(data).find('condition').attr('temp') * 9/5) + 32); }
    WHO KNEW??!! Not me.. I'm sure there are reasons when one syntax is preferable over the other... Haven't figured that out yet..
    You might not noticed this before, but this has been around for a very long time. Mainly in any 12hour AM/PM clock function and leading zero for single number hours/minutes/seconds.
    Here is a clock function from UniAW 6.4 with 3 examples in it.
    Code:
    function updateClock() {
    	var currentTime = new Date();
    	var currentHours = currentTime.getHours();
    	var currentMinutes = currentTime.getMinutes() < 10 ? '0' + currentTime.getMinutes() : currentTime.getMinutes();
    	var currentSeconds = currentTime.getSeconds() < 10 ? '0' + currentTime.getSeconds() : currentTime.getSeconds();
    	var mil = currentTime.getMilliseconds();
    	var currentDate = currentTime.getDate() < 10 ? '' + currentTime.getDate() : currentTime.getDate();
        time_to_change_wall = currentHours + currentMinutes / 60;
        timeOfDay = (currentHours < 12) ? "am" : "pm";
    It basically translate as
    Code:
    Condition ?(true or false) Action if condition is true : Action if condition is false
    Last edited by rasputin007; 2015-03-21 at 11:45 PM.
    Nothing is impossible only miracles take a bit longer!

  23. The Following 4 Users Say Thank You to rasputin007 For This Useful Post:

    #m37h{ (2015-03-22), <Ian Nicoll/> (2015-03-22), Marty McFly (2015-03-22), NewD (2015-03-21)

  24. #4817
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,712
    Thanks
    8,338
    Thanked 16,467 Times in 7,697 Posts

    Quote Originally Posted by rasputin007 View Post
    You might not noticed this before, but this has been around for a very long time. Mainly in any 12hour AM/PM clock function and leading zero for single number hours/minutes/seconds.
    Here is a clock function from UniAW 6.4 with 3 examples in it.
    Code:
    function updateClock() {
    	var currentTime = new Date();
    	var currentHours = currentTime.getHours();
    	var currentMinutes = currentTime.getMinutes() < 10 ? '0' + currentTime.getMinutes() : currentTime.getMinutes();
    	var currentSeconds = currentTime.getSeconds() < 10 ? '0' + currentTime.getSeconds() : currentTime.getSeconds();
    	var mil = currentTime.getMilliseconds();
    	var currentDate = currentTime.getDate() < 10 ? '' + currentTime.getDate() : currentTime.getDate();
        time_to_change_wall = currentHours + currentMinutes / 60;
        timeOfDay = (currentHours < 12) ? "am" : "pm";
    It basically translate as
    Code:
    Condition ?(true or false) Action if condition is true : Action if condition is false
    Indeed! Technically in the first two expressions from 6.4 - there should be ( ) around the condition as with the ampm. It really should read -
    var currentSeconds = ( currentTime.getSeconds() < 10 ) ? '0' + currentTime.getSeconds() : currentTime.getSeconds();

    But we all know -code is forgiving.. sometimes...

  25. The Following User Says Thank You to NewD For This Useful Post:

    #m37h{ (2015-03-22)

  26. #4818
    Quote Originally Posted by <Ian Nicoll/> View Post
    In main.js look for this code & add the two slashes (in red) exactly as shown below (directly in front of the second "else if" statement), see if that fixes it.
    Code:
    // NO SUNNY DESCRIPTION FOR NIGHT CONDITION
    if ((obj.code[0] == 32) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[31] + wind_description; }
    else if ((obj.code[0] == 34) && (where == "night")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[33] + wind_description; }
    //else if ((lang == "am") || (lang =="en") && (WeatherSource == "widgetweather")) { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[0]] + wind_description; }
    else { document.getElementById("Day0desc").innerHTML = WeatherDesc[obj.code[0]] + wind_description; }
    thank you;this works for me uniaw7.1 lates ios 8.1.2
    but it looks like it breaks the widget that has main.js converted for GB+/GL+
    here is mine on non GL+

  27. The Following User Says Thank You to #m37h{ For This Useful Post:

    <Ian Nicoll/> (2015-03-22)

  28. #4819
    Theme Modder Sital's Avatar
    Join Date
    Jun 2012
    Location
    New England
    Posts
    2,495
    Thanks
    1,655
    Thanked 10,986 Times in 2,040 Posts

    Second of three mods coming this weekend....

    Window+V69_UW7.1_Sital (UniAW 7.1)



    Made with June's 69 theme in mind.

    Default setting is for GroovyBoard+. Instructions for converting back to GroovyBoard (SBHTML) included.

    HomeScreenDesigner plist file included for iP6.

    Alternate wall included.

    Download: https://www.dropbox.com/s/6hmcs8nu05...Sital.zip?dl=0

    Credit to Ian, Dacal, the WW2 team and June'sIphone.

  29. The Following 15 Users Say Thank You to Sital For This Useful Post:

    #m37h{ (2015-03-22), <Ian Nicoll/> (2015-03-22), Boots (2015-03-23), chevymusclecar (2015-03-22), haylazz (2015-07-24), jawonder (2015-03-22), jm26200 (2015-03-23), JoeGee278 (2015-10-16), kristatos (2015-03-22), lostinthemes (2015-03-30), Marty McFly (2015-03-22), metaserph (2015-03-22), Papichulo74 (2015-03-22), Pibe77 (2015-03-22), Wayne Ross (2015-03-24)

  30. #4820
    Quote Originally Posted by meth357 View Post
    thank you;this works for me uniaw7.1 lates ios 8.1.2
    but it looks like it breaks the widget that has main.js converted for GB+/GL+
    here is mine on non GL+
    Thanks meth, I updated the link with this change yesterday, I know it works as I also personally use it. With this I am just forcing it to use our descriptions from the translation.js file rather than the description from the xml file.
    Last edited by <Ian Nicoll/>; 2015-03-22 at 02:24 AM.

  31. The Following 4 Users Say Thank You to <Ian Nicoll/> For This Useful Post:

    #m37h{ (2015-03-22), bliken (2015-03-22), chevymusclecar (2015-03-22), NewD (2015-03-22)

Page 241 of 614 FirstFirst ... 141191231239240241242243251291341 ... 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
  •