Page 3 of 3 FirstFirst 123
Results 41 to 51 of 51

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


Thread: WidgetWeather2 Now Available in Cydia!

  1. #41
    So, on a different note.. i did a bit of digging, and i see that widgetweather basically dumps all of the data into widgetweather.xml..
    So, im guessing that basically this info can be called on with HTML and then styled with CSS.. is this about right?
    Oh, yeah.. the one thing that is different about the theme I gave you for conversion.. the javascript is in the html documents.. which i know is "fine", but I find it a bit messy.. I was going to try to cut the code into its own script files and then write a link to them in the html head.

    Ive gotten "pretty good" with html recently -- defining new elements and their attributes -- as well as CSS styling.. and have started to branch out into learning javascript - specifically looking at how the JS is linked with the various html elements .. but wow, there is a lot to learn.. it's fun though

  2. The Following User Says Thank You to michaelrw For This Useful Post:

    King_O_Hill (2015-02-04)

  3. #42
    Quote Originally Posted by NewdestinyX View Post
    Marty's a coding beast. Converting the older dBar code is no small project.. and that particular widget was a mish mash of 3-4 HTML files which isn't standard coding either.. Not sure I'd use that conversion as your coding lesson.. Plenty of simpler examples I could share with you.. ..
    yeah i know its been a nightmare quite honestly. i could tell its a mashup.. when i first got it, all of the styling, html and JS were all in one *.html file.. i then proceeded to organize it by moving css into css files, renaming some of the assets into english (from german), adding a battery bar and script (from some other theme i had laying around).. then removed some extraneous elements that were either not in use, or not needing to be coded that way (like using tables instead a simple /div)

    Youre right, I shouldve given a different theme.. it may take me a while to pick through the modifications..
    I would love to see a nice, organized, full-featured theme that is relatively new (maybe html 5?), then have that integrated to WW2 and then learn from that

  4. The Following User Says Thank You to michaelrw For This Useful Post:

    King_O_Hill (2015-02-04)

  5. #43
    The 02_base that comes with WW2 is there for exactly that reason. To be used as a base for any widget. It is coded very well and tested very thoroughly. Also, you are correct in that all the data is organized into the ww.xml file in your Documents folder.

    Let us know if we can help.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  6. The Following 3 Users Say Thank You to King_O_Hill For This Useful Post:

    Marty McFly (2015-02-04), michaelrw (2015-02-04), NewD (2015-02-04)

  7. #44
    Quote Originally Posted by King_O_Hill View Post
    The 02_base that comes with WW2 is there for exactly that reason. To be used as a base for any widget. It is coded very well and tested very thoroughly. Also, you are correct in that all the data is organized into the ww.xml file in your Documents folder.

    Let us know if we can help.
    ok yeah, i guess my primary hesitation with starting with the 02_base is its size.. it is simply huge and has so many different divs, thus is a bit intimidating to someone like myself. that being said, since it is cleanly coded, it shouldnt be too hard to break it down into smaller size and remove any of the components that i dont want, then add other (non-weather) components, such as battery bar and RAM stats.
    Will definitely let you know if I need help making sense of something (which im sure i will at some point). Thx

  8. #45
    Yes, we wanted to make sure that it used every element that was available in the xml file. So I agree that there is quite a bit of info in there, at least it is all there. Plus it runs very light, as all it does is pull data from a local file. So eliminating things only reduces file size and has no effect on battery or performance.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  9. The Following 2 Users Say Thank You to King_O_Hill For This Useful Post:

    michaelrw (2015-02-04), NewD (2015-02-04)

  10. #46
    You can piggyback html files, but most people that code from scratch will only use one. Along with a js file and a css file. But I've seen complex widgets get piggybacked too. I will suggest it to beginners that are just looking to get 2 widgets in one LS.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  11. The Following 2 Users Say Thank You to King_O_Hill For This Useful Post:

    Marty McFly (2015-02-04), michaelrw (2015-02-04)

  12. #47
    Quote Originally Posted by Marty McFly View Post
    OK bro. Anyway, give it a try and let me know if you'd like any further changes...
    So, remember I'm really new to writing this, so pardon my ignorance:

    I originally wrote:

    Code:
    	<div id="clockContainer">
    		<a id="clock">
    			<script type="text/javascript">updateClock(); setInterval('updateClock()', 1000 )</script>
    			<a id="ampm">
    				<script type="text/javascript">amPm(); setInterval('amPm()', 1000 )</script>
    			</a>
    		</a>
    	</div>
    you basically took all the divs and removed them from any container, like:
    Code:
    <body bgcolor="Transparent" onload="init()">
    	<div id="clock"></div>	  
    	<div id="ampm"></div>	
    	.....
    	.....
    </body>
    As you can see, i made a container for both the clock and the ampm function. the reason i did this was so, in CSS, i could set ampm to position:relative and position it to the right side of the clock. Since the clock changes time, and thus the width of the clock is dynamic, this was the only way I knew how to keep the am/pm element from having variable distance from the end of the time display. When it's 1pm it may look like [1:00 PM] but at 1259pm it may be [12:59PM]. I hope Im explaining this correctly. The other thing I use the container div for is so i can easily move both the clock and ampm elements at the same time and not have to worry about their position relative to each other, only worry about their position relative to everything else.

    So, my question is: Is there a better way to do what I am describing?
    Last edited by Simon; 2015-02-06 at 01:49 AM.

  13. The Following User Says Thank You to michaelrw For This Useful Post:

    King_O_Hill (2015-02-05)

  14. #48
    if youre having trouble reading my last post, in particular the code, please see: http://modmyi.com/forums/site-sugges...ml#post7217721

    the two code blocks were:

    Code:
    <div id="clockContainer">
    <a id="clock">
    <script type="text/javascript">updateClock(); setInterval('updateClock()', 1000 )</script>
    <a id="ampm">
    <script type="text/javascript">amPm(); setInterval('amPm()', 1000 )</script>
    </a>
    </a>
    </div>

    Code:
    <body bgcolor="Transparent" onload="init()">
    <div id="clock"></div>	
    <div id="ampm"></div>	
    
    </body>
    Last edited by Simon; 2015-02-06 at 01:48 AM.

  15. The Following User Says Thank You to michaelrw For This Useful Post:

    King_O_Hill (2015-02-05)

  16. #49
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,709
    Thanks
    8,337
    Thanked 16,464 Times in 7,696 Posts

    Michael.. Make sure your code goes inside a pair of code tags when you're writing on the forum.

    [c o d e][/c o d e] with the spaces removed of course. Then there will be no problem with it displaying on the forum.

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

    King_O_Hill (2015-02-05)

  18. #50
    Default WidgetWeather2 Now Available in Cydia!
    Quote Originally Posted by NewdestinyX View Post
    Michael.. Make sure your code goes inside a pair of code tags when you're writing on the forum.

    [c o d e][/c o d e] with the spaces removed of course. Then there will be no problem with it displaying on the forum.
    I always do. If you follow that link (above) to my post about problems I'm experiencing on the site, it'll give more detail. I wrapped it in code tags the first time I posted it, but as you can see in the screenshot I linked to, the preview of my post doesn't show any of the code, just empty code boxes.

  19. #51
    Quote Originally Posted by michaelrw View Post
    if youre having trouble reading my last post, in particular the code, please see: http://modmyi.com/forums/site-sugges...ml#post7217721

    the two code blocks were:

    -----------------------------------------------------------
    <div id="clockContainer">
    <a id="clock">
    <script type="text/javascript">updateClock(); setInterval('updateClock()', 1000 )</script>
    <a id="ampm">
    <script type="text/javascript">amPm(); setInterval('amPm()', 1000 )</script>
    </a>
    </a>
    </div>[/CODE]

    -------------------------------------------------------------

    <body bgcolor="Transparent" onload="init()">
    <div id="clock"></div>
    <div id="ampm"></div>
    .....
    .....
    </body>
    No need to go through all this, just put a place holder in the time if the hour is less than 10 bro.

    Or you can set the colon and then align left of it for hours and align right for minutes. The put your am/pm where you want it. That's what I find works best.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0

  20. The Following 2 Users Say Thank You to King_O_Hill For This Useful Post:

    Marty McFly (2015-02-05), michaelrw (2015-02-05)

Page 3 of 3 FirstFirst 123
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •