Page 6 of 10 FirstFirst ... 45678 ... LastLast
Results 101 to 120 of 193

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


Thread: Free Cydgets

  1. #101
    OK, here is an updated screenshot



    The question now is, if I am able to read the plist file my Settings Menu created, what about other plist files???
    Now that would open up opportunities. LOL
    Last edited by rasputin007; 2015-01-20 at 09:43 AM.
    Nothing is impossible only miracles take a bit longer!

  2. #102
    Quote Originally Posted by June'sIphone View Post
    Basic Template for iPhone 5, 5s, 6, 6+
    LINK
    One thing I dont fully understand is the width and height of the iphone models. When i create walls for the i5/s i use 1136 x 640, and when i create them for the i6 i use 1334 x 750. However, when I look at html/js/css files, I always see different height and width. In this template you define the i5/s, then use conditionals to test for screen size then apply scaling for the i6 and i6 plus. All o fthat makes sense, I just don't understand why we don't use the actual screen size. Thanks for the free cydgets, and all of the resources and help, @June'sIphone

    EDIT: Wow.. lol.. can't believe I just now realized the pattern. all of the size are half of the full screen size.. because of retina display.. wow, this is huge. Modifying other LS/SB html themes has always been challening for me to reposition elements because I never understood the grid.. This is going to help in so many ways
    Last edited by michaelrw; 2015-01-20 at 10:32 AM.

  3. #103
    Quote Originally Posted by rasputin007 View Post
    OK, here is an updated screenshot


    The question now is, if I am able to read the plist file my Settings Menu created, what about other plist files???
    Now that would open up opportunities. LOL
    All plists. For example I use the winterboard plist to see what theme is selected. Then I check if it has the bundle com.JunesiPhone.LockBuilder exists in that theme, if it does I use all the icons in it to change all the icons within LockBuilder.

  4. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    Beta19 (2015-01-31), rasputin007 (2015-01-21)

  5. #104
    Quote Originally Posted by Doesel View Post
    Thanks a lot. So there's a lot to play around with and everything from iOS Dev Reference can somehow be integrated
    Correct. I finally figured out a good way to get Favorite contacts.

    http://moby.to/wm1m95

  6. The Following 2 Users Say Thank You to June'sIphone For This Useful Post:

    Doesel (2015-01-21), Splatty79 (2015-01-20)

  7. #105
    iPhoneaholic Splatty79's Avatar
    Join Date
    Jan 2012
    Location
    Melbourne, Australia
    Posts
    499
    Thanks
    434
    Thanked 711 Times in 235 Posts

    Quote Originally Posted by June'sIphone View Post
    Correct. I finally figured out a good way to get Favorite contacts.

    http://moby.to/wm1m95
    Wow June, thats awesome. Well done!!

    Would there be any way to preview mail on the lockscreen with cydgets? Love this feature with lockinfo and intelliscreenx, and the ability to then mark as read, delete reply etc.

  8. #106
    Quote Originally Posted by Splatty79 View Post
    Wow June, thats awesome. Well done!!

    Would there be any way to preview mail on the lockscreen with cydgets? Love this feature with lockinfo and intelliscreenx, and the ability to then mark as read, delete reply etc.
    Thanks, I am sure there is a way. Figuring these things out is very difficult at times, but i'd say it's possible.

  9. The Following User Says Thank You to June'sIphone For This Useful Post:

    Splatty79 (2015-01-21)

  10. #107
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,466 Times in 7,697 Posts

    Default Free Cydgets
    June & Ras,
    Reading your exchanges in the last couple of weeks has been very educational. I'm learning a bunch. Thx!

    June, I too learned early on that style and script go in the <head> then divs in the body. Was surprised it only worked for Ras with divs first.
    Last edited by NewD; 2015-01-21 at 05:35 AM.

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

    rasputin007 (2015-01-21)

  12. #108
    Quote Originally Posted by NewdestinyX View Post
    June & Ras,
    Reading your exchanges in the last couple of weeks has been very educational. I'm learning a bunch. Thx!

    June, I too learned early on that style and script go in the <head> then divs in the body. Was surprised it only worked for Ras with divs first.
    Most likely because I put the scripts in body as well.
    Nothing is impossible only miracles take a bit longer!

  13. #109
    Default Free Cydgets
    It doesn't matter where styles go, but scripts should almost always go right before the end of the body not the head.
    Last edited by June'sIphone; 2015-01-21 at 12:11 PM.

  14. #110
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,466 Times in 7,697 Posts

    Default Free Cydgets
    Quote Originally Posted by June'sIphone View Post
    It doesn't matter where styles go, but scripts should almost always go right before the end of the body not the head.
    Wonder why the code book and few online materials I've read say otherwise. About script needing to be in the head.

  15. #111
    Quote Originally Posted by NewdestinyX View Post
    Wonder why the code book and few online materials I've read say otherwise. About script needing to be in the head.
    yeah i have a theme im working on slowly, and i have script in the head.. not sure if its proper, but it seems to work. didnt want to put it late because its important it gets executed early, IMO

    Code:
        <script>
            if(screen.width == 375){
                var ScreenSize = "i6";
                document.write("<object data='Files/Battery/Battery.html' type='text/html' style='position:absolute; top:45px; left:10px; width:376px; height:667px; z-index:100;'></object>");
                } else {
                    if(screen.width == 414){
                    var ScreenSize = "i6plus";
                    document.write("<object data='Files/Battery/Battery.html' type='text/html' style='position:absolute; top:45px; left:10px; width:415px; height:736px; z-index:100;'></object>");
                    } else {
                        var ScreenSize = "i5";
                        document.write("<object data='Files/Battery/Battery.html' type='text/html' style='position:absolute; top:45px; left:10px; width:321px; height:569px; z-index:100;'></object>");
                    }
                }
        </script>
    I suppose it could be run down in the body, though.. what do i know?

  16. #112
    I also learned that you put style before closing head tag, then scripts go between closing head tag and opening body tag and div's go into body. Oldster told me that there is a difference in behaviour if you place a script tag for an external file in the head section or the body section. He was right, way back in iOS 6 times, I used a script tag to call a php file in the head section, but it was not working the way I intended it to work, so Oldster told me to move that script tag into the body section and after that it worked perfectly, just as it was supposed to work.
    Another example is the use of external js and css files. Look at UniAW and in the html you do not see any css style or javascripts, only script tags to external files and div's. I tried that with MYO, as everything is just in one file, so I moved all javascript out into as js file and all style code went into a css file with just the references to these external files and the div's remaining in the html. Well, the result was safe mode every time.
    So, there you go, identical code in both cases, but one used external js and css files and causes safe mode and the other has everything in one html file and works perfectly.
    Why?
    Another question somewhere on my "to do" list. LOL
    Nothing is impossible only miracles take a bit longer!

  17. The Following 2 Users Say Thank You to rasputin007 For This Useful Post:

    RKO1195 (2015-01-21), Simon (2015-01-21)

  18. #113
    Superbad Modder-ator Simon's Avatar
    Join Date
    Nov 2007
    Location
    Bermuda
    Posts
    48,875
    Thanks
    8,108
    Thanked 17,645 Times in 8,025 Posts

    Quote Originally Posted by rasputin007 View Post
    I also learned that you put style before closing head tag, then scripts go between closing head tag and opening body tag and div's go into body. Oldster told me that there is a difference in behaviour if you place a script tag for an external file in the head section or the body section. He was right, way back in iOS 6 times, I used a script tag to call a php file in the head section, but it was not working the way I intended it to work, so Oldster told me to move that script tag into the body section and after that it worked perfectly, just as it was supposed to work.
    Another example is the use of external js and css files. Look at UniAW and in the html you do not see any css style or javascripts, only script tags to external files and div's. I tried that with MYO, as everything is just in one file, so I moved all javascript out into as js file and all style code went into a css file with just the references to these external files and the div's remaining in the html. Well, the result was safe mode every time.
    So, there you go, identical code in both cases, but one used external js and css files and causes safe mode and the other has everything in one html file and works perfectly.
    Why?
    Another question somewhere on my "to do" list. LOL
    Found this to be the case myself. Every time I try and use UNIAW method of pointing to external js files in the head I have run into issues. For my own widgets I almost always put the scripts in the body now at the bottom.

  19. The Following 2 Users Say Thank You to Simon For This Useful Post:

    NewD (2015-01-21), rasputin007 (2015-01-21)

  20. #114
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,466 Times in 7,697 Posts

    Sorry guys, that's what I meant.. Script stuff between head and body.. Then div tags in body. Two of my code softwares will actually refer to a style tag, outside of the head, as a code error.

  21. #115
    Scripts

    1. Scripts will block the page from loading, therefore you add them at the end of the body after the "page" is loaded. Unless async is declared.

    2. You cannot modify something that is not there. A lot of JavaScript modifies html elements. If you put a script in the head and modify something that is in the body it will NOT work. The only way you could get this to work is delaying the script to load when the document has rendered. <body onload=""> or window.onload etc

    Example of the wrong way.

    Code:
    <head><script>document.getElementById('divId').innerHTML="FAIL";</script></head>
    <body><div id="divId"></div> </body>
    if I put a script in the head before the body is even loaded it will fail as the javascript runs first. Meaning when I say hey Javascript get the element with the id of "divId" it will look through the document and find that "divId" does not exist.

    Example of the right way

    Code:
    <head></head>
    <body>
    <div id="divId"></div>
    <script>document.getElementById('divId').innerHTML="success";</script>
    </body>
    The script runs after the "divId" element is created, therefore will write success in it.

    Example of the right way

    Code:
    <head><script>function writeDiv(){document.getElementById('divId').innerHTML="success";}
    </script></head>
    <body onload="writeDiv()"><div id="divId"></div> </body>
    Notice we have a script in the head, but we delay the function from loading until the body has loaded.

    3. Things that don't matter. jQuery can be loaded in the head as it is a library that does not edit the html elements it just furthers JavaScript. Most other library's are the same.


    CSS

    Css can go in the head or directly in the element itself (within body). If it is a style tag
    Code:
    <style></style>
    it goes in the head. If you want to add a style in the body then add it to the element by
    Code:
    <div style=""></div>

    Example of a place would need to put style directly on the element instead of in the head.

    Wrong

    Code:
    <html>
    <head>
    	<title></title>
    	<style>#blank{display: none;}</style>
    </head>
    <body>
    <div id="blank"></div>
    <script>var display = document.getElementById('blank').style.display;alert(display);</script>
    </body>
    </html>
    The alert would display nothing.

    Right

    Code:
    <html>
    <head>
    	<title></title>
    </head>
    <body>
    <div id="blank" style="display:none;"></div>
    <script>var display = document.getElementById('blank').style.display;alert(display);</script>
    </body>
    </html>
    The .style in javascript is basically reserved for inline styles. You could also create a function that would return the <style> value.

    Right

    Code:
    <html>
    <head>
    	<title></title>
    	<style>#blank{display: none;}</style>
    </head>
    <body>
    <div id="blank"></div>
    <script>
    function getStyle(oElm, strCssRule){
    	var strValue = "";
    	if(document.defaultView && document.defaultView.getComputedStyle){
    		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
    	}
    	else if(oElm.currentStyle){
    		strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
    			return p1.toUpperCase();
    		});
    		strValue = oElm.currentStyle[strCssRule];
    	}
    	return strValue;
    }
    var display = getStyle(document.getElementById("blank"), "display");
    alert(display);
    </script>
    </body>
    </html>
    This would work fine, and is very similar to jQuery $('#blank').css('display');
    Last edited by June'sIphone; 2015-01-21 at 08:20 PM.

  22. The Following 5 Users Say Thank You to June'sIphone For This Useful Post:

    Doesel (2015-01-22), NewD (2015-01-21), rasputin007 (2015-01-22), RKO1195 (2015-01-21), Simon (2015-01-21)

  23. #116
    Quote Originally Posted by michaelrw View Post
    yeah i have a theme im working on slowly, and i have script in the head.. not sure if its proper, but it seems to work. didnt want to put it late because its important it gets executed early, IMO

    Code:
        <script>
            if(screen.width == 375){
                var ScreenSize = "i6";
                document.write("<object data='Files/Battery/Battery.html' type='text/html' style='position:absolute; top:45px; left:10px; width:376px; height:667px; z-index:100;'></object>");
                } else {
                    if(screen.width == 414){
                    var ScreenSize = "i6plus";
                    document.write("<object data='Files/Battery/Battery.html' type='text/html' style='position:absolute; top:45px; left:10px; width:415px; height:736px; z-index:100;'></object>");
                    } else {
                        var ScreenSize = "i5";
                        document.write("<object data='Files/Battery/Battery.html' type='text/html' style='position:absolute; top:45px; left:10px; width:321px; height:569px; z-index:100;'></object>");
                    }
                }
        </script>
    I suppose it could be run down in the body, though.. what do i know?
    Even though document.write() is frowned upon and not the best practice, there is no reason why this code wouldn't work in the head.

  24. #117
    The user profile Cydget is my fav, thanks for all ur hard work as usual mate.

    Especially thanks for the in depth tutorials you have provided here. Makes it easier to customize altho u make coding look way too easy lol

  25. The Following 2 Users Say Thank You to jokerg7 For This Useful Post:

    June'sIphone (2015-01-21), rasputin007 (2015-01-22)

  26. #118
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,710
    Thanks
    8,337
    Thanked 16,466 Times in 7,697 Posts

    Quote Originally Posted by June'sIphone View Post
    Scripts

    1. Scripts will block the page from loading, therefore you add them at the end of the body after the "page" is loaded. Unless async is declared.

    2. You cannot modify something that is not there. A lot of JavaScript modifies html elements. If you put a script in the head and modify something that is in the body it will NOT work. The only way you could get this to work is delaying the script to load when the document has rendered. <body onload=""> or window.onload etc
    Makes total sense, June. "Real world" coding.. not 'book coding'.. Thanks for the continued education!

  27. #119
    Quote Originally Posted by jokerg7 View Post
    The user profile Cydget is my fav, thanks for all ur hard work as usual mate.

    Especially thanks for the in depth tutorials you have provided here. Makes it easier to customize altho u make coding look way too easy lol
    It comes easier with practice

  28. #120
    What's Jailbreak?
    Join Date
    Feb 2012
    Location
    Cologne
    Posts
    19
    Thanks
    13
    Thanked 3 Times in 3 Posts

    Hey,
    got a little problem... since this morning the cydget isn't working any more. None of the values/badges will be displayed, but I didn't change anything (checked timestamp of index.html which is two days old). I respringed (?) several times, en-/disabled cydgets or changed their order, nothing helped. Your other cydget work though.

    Edit: so, I realised what I did yesterday evening.. I activated an alarm for the first time with the "official" clock app from Apple (normally using 3rd party app). When I disable it all badges will be shown again. I'm curious because none of the other cydgets is affected. But as I'm writing this I think I know what the problem is - good that we've spoken about it
    Last edited by Doesel; 2015-01-22 at 01:13 PM.

Page 6 of 10 FirstFirst ... 45678 ... 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
  •