User Tag List

  1. michaelrw's Avatar
    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
    2015-02-03 11:29 PM
  2. michaelrw's Avatar
    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
    2015-02-03 11:35 PM
  3. King_O_Hill's Avatar
    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
    2015-02-04 12:57 AM
  4. michaelrw's Avatar
    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
    2015-02-04 01:34 AM
  5. King_O_Hill's Avatar
    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
    2015-02-04 01:38 AM
  6. King_O_Hill's Avatar
    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
    2015-02-04 04:43 AM
  7. michaelrw's Avatar
    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 12:49 AM.
    2015-02-04 05:20 PM
  8. michaelrw's Avatar
    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 12:48 AM.
    2015-02-04 05:44 PM
  9. NewD's Avatar
    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.
    2015-02-04 07:02 PM
  10. michaelrw's Avatar
    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.
    2015-02-04 09:06 PM
  11. King_O_Hill's Avatar
    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
    2015-02-05 12:48 AM
51 123
LINK TO POST COPIED TO CLIPBOARD