Author: Mark

  • Allowing WordPress to accept more uploadable file formats

    I was trying to update a html file I uploaded and got the error: File type does not meet security guidelines. Try another. Very annoying. Luckily googling led me to the solution fairly easily. In the functions.php file in your theme add this add_filter(‘upload_mimes’, ‘custom_upload_mimes’); function custom_upload_mimes ( $existing_mimes=array() ) {     // add your…

  • Unity to Android checklist

    After Unity to Windows 8 Checklist and Unity to iOS Checklist, this is the Andriod version: To test on Andriod devices you will need to download the ‘Andriod SDK’ which also requires “Java SE Development Kit”. you need to download a “platform” from your Andriod SDK folder under “tools/andriod”. After that, still in your SDK…

  • Gravity and Hit Detection in Unity

    To add gravity to your main hero (for example) so he falls to physics: Place the image of the character into the scene and in the inspector click ‘add component’ and select ‘box collider 2d’ or circle collider 2d’ depending on the shape you want to have. Add the component ‘Rigidbody 2D’, so the object…

  • Demonfall Week 1 Progress

    Going to try recording my progress each week mainly as a motivator to get things done. Here’s week one: So we have the guy character. He’s affected by the global gravity and is constantly falling. When he hits the platform he jumps back up. The 2 X boxes the left and right are the controls,…

  • Side Ads

    This little demo puts promotional ads on the left and right of the webpage. To do this, the HTML is structure is like this: <body> <div id=”mainContainer”>     Main Website Content. </div> <div class=”adContainer”>     <div class=”leftAd”><a href=”http://www.google.com” target=”_blank”>left ad text</a>     </div>     <div class=”rightAd”><a href=”http://www.google.com” target=”_blank”>right ad text</a>     </div>    </div> </body>…

  • HTML Email Template

    Below is a link to a HTML file that has some CSS and code for starting a mobile friendly email. Here are also some tips: Don’t use margins: Outlook doesn’t like it Padding: give the containing table a width but no padding and then the inner table’s data cell padding but no width. No padding on…

  • Slide Out Buttons

    Here is an example of 2 buttons that when pressed, slide out the main content revealing new content. This could be used for mobile navigation/search/quick links etc. The HTML is like so: <body>     <div class=”container”>         <a href=”#” class=”leftBtn”><i class=”fa fa-bars”></i></a>         <a href=”#” class=”rightBtn”><i class=”fa fa-user”></i></a>         /* rest of main content    …

  • Responsive Tabs

    Here is an example of tabs that change into an accordion on mobile. The HTML structure for the desktop tabs is like so: <ul class=”classA”>     <li class=”current”><a>tab 1</a></li>     <li><a>tab 2</a></li>     <li><a>tab 3</a></li> </ul> ..and the HTML for the tab contents including the mobile tabs: <ul class=”classB”>         <li><a href=”#”>mob tab 1</a>        …

  • Responsive Rotating Banner

    I like to use the responsive rotating banner from mobify.js. It’s swipable on iOS, Andriod and Windows phones. It even swipes on desktop so you can tell when it’s not working easier. I’ve added auto rotating in myself and swapping in another images for mobile (because it’s unreadable when just scaled down). You can change…

  • Making long links wrap

    This is particularly important for mobile sites so the links don’t break the layout. Here’s the CSS: a.longLink{ /* required for windows 8 phone and ie10,11 */ -ms-word-break: break-all; word-break: break-all; display:inline-block; /* Non standard for webkit */ word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } Tested on an iPod Touch 3rd…