Author: admin

  • Change your cursor or pointer to a hand on hover with css

    Sometimes when I create a link, the cursor doesn’t change to a hand to help the user understand they can click on element. Thus, its helpful to have the cursor change to a hand on hover. No need for javascript or jquery here, you can easily implement the effect with CSS. The CSS .myElement:hover {…

  • New Video for Gushijielong.net

    We produced a new video for Gushijielong.net. This new exciting website for Chinese users to enjoy “Choose Your Own Adventure” experience, but the users get to add to the adventure when they reach the end. http://gushijielong.net

  • Convert JSON Array to PHP Array

    To convert a JSON array into a PHP array, use the following script: <?php $json = file_get_contents(‘json/yourscript.json’); // Get the JSON data $phpObj = json_decode($json,true); // Convert to PHP Object print_r($phpObj); // Convert to PHP Array ?> file_get_contents(‘json/yourscript.json’); Allows you to get the JSON data easily. json_decode($json,true); Is a PHP function that converts your JSON…

  • HTML5 Quickstart Template – Mobile Viewport, CSS3, Google Font, Latest jQuery – All Ready

    Whenever I want to quickly make a webpage, I don’t want to have to build the whole page everytime. Here is my starter code for an HTML5 page. The key points are : HTML5 Doctype – Ready Viewport and Mobile – Ready Title tags, Character Set, Keyword and Description Meta, Favicon, Stylesheet tags – Ready…

  • How to get a substring of Chinese or Japanese text without cutting off characters in PHP?

    I used to try to get substrings of Chinese text and would get partial characters than came out as strange diamonds or squares…. until I found the mb_strcut() function! When using PHP, avoid using the substr() function, as it will often cut off Chinese and Japanese characters. For example: $text = ‘拿小锤锤的那个人好可爱的说,哈哈哈,生活太有爱了,加油加油了’; echo substr($text, 0,…

  • Kapianyingyu.com – English Vocabulary Online Flash Cards

    Kapianyingyu.com, is built to help Chinese speakers learn English and Japanese vocabulary quickly and conveniently. It’s designed to work on a full-screen desktop computer and mobile devices. It has a database over 4000 everyday English words and 140 useful categories. A card page consists of a small quiz, where the user must choose the correct…

  • Gushijielong.net - 故事接龙网

    We are excited to introduce a Chinese version of our Storyways.com website called Gushijielong.net (Chinese:故事接龙网). This new website offers the same great user experience as Storyways.com in Chinese. Both Gushijielong.net and Storyways.com allow users to go through a Choose Your Own Adventure story but when they reach the end, they have the chance to write…

  • New Web Adventuring : Storyways.com

    Looking for a Choose Your Own Adventure book with a twist? Check out Storyways.com, the new online community story building site. On Storyways.com, you choose a story and start your adventure. Each page gives you a piece of the story and you decide which direction to take. The exciting twist is that when you get…

  • Added Commenting Platform Disqus with Ajax

    Recently we’ve added commenting to our Driverstest.info license test question and quiz website. We used a third party comment platform provider called Disqus.com. Our goal was to add commenting but not increase the load time for our users. Fortunately, thanks to Paul Underwood’s article about adding Disqus with AJAX, we’ve added this great feature without…

  • Get only the Domain Name from HTTP_REFERRER in PHP

    $_SERVER[‘HTTP_REFERER’] gives you the URL from where the user came, which is the user’s previous page (whatever page that would appear if the user clicked “Back” in their browser) But $_SERVER[‘HTTP_REFERER’]  gives you the complete URL, something like this : driverstest.info/test/quiz.php?quizgroup=7 If you just want get the domain name .i.e. driverstest.info from the full URL, then you can…