MooTools is one of the most flexible, modular, and well written JavaScript frameworks available. So many people use it but many of them don’t optimize their code. This post will provide you with fifteen simple tips for making your MooTools code shorter, faster, and stronger. 1. Create Your Own MooTools Build or Pull From Google AJAX [...]
Continue reading...tirsdag, februar 16, 2010
Kommentarer slået fra
In this tutorial we’ll be creating a system which will convert messages including text smilies into messages including icon smilies ( text => smilie icons ). Preknowledge For this tutorial it’s prefered that you’ve got some preknowledge about php variables, arrays, functions and the foreach loop. If not, I’d recommend you to have a look at the [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
During the this tutorial I’m going to take you through building a simple slider that will scroll a personal microsite. We’ll use the GreenSock Timeline Lite class and demonstrate just how straight-forward it can make your Flash animation workflow. Final Result Preview Let’s take a look at the final result we will be working towards: Introduction From time to [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
Today, we’ll be creating a nice user poll script using jQuery and PHP utilizing AJAX and animation effects of jQuery to spice up the user interface and provide a rich user experience. Let’s get started. Set up the database For storing poll questions, options and votes, we’ll be using a MySQL database. Here is the database structure [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
You must have seen the drag to share functionality on Mashable that lets visitors share the content on popular social networks intuitively. Just drag one of the images in an article and you’ll be able to share the article on your favorite social network by dropping the dragged image over its icon. Even, Nettuts has [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
In this tutorial you will learn how to create an romantic Valentine’s day postcard. You will also learn how to create a nice 3D box with a pattern applied to it in different perspectives. I am sure someone will be happy if will receive a card on valentine’s day. Want to download this PSD file ? Register for [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
Technique #1 <?php function trunc($phrase, $max_words) { $phrase_array = explode(' ',$phrase); if(count($phrase_array) > $max_words && $max_words > 0) $phrase = implode(' ',array_slice($phrase_array, 0, $max_words)).'...' return $phrase; } ?> Technique #2 function limit_words($words, $limit, $append = ' …') { // Add 1 to the specified limit becuase arrays start at 0 $limit = $limit+1; // Store each individual word as an array [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
The example here is if you had a form on a website that when submitted, needed to use that information to go to a special URL where the login information was all appeneded to the URL. You could have the form post with method GET, but that is limited to the typical ?variable=foo&variable2=bar format. HTML Form Typical [...]
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
This is like a replacement for PHP’s SCRIPT_NAME with JavaScript. location.href.split('/').pop(); For example with this URL: http://css-tricks.com/examples/ScriptName/index.php This code: document.write( location.href.split('/').pop() ); Would write to the page: “index.php” Link til artiklen (Læse tid 7 sek) Tags: CSS, IP, Java, JavaScript, php, script, URL
Continue reading...lørdag, februar 13, 2010
Kommentarer slået fra
This has only really been tested on Media Temple (gs) servers. In the folder with the JavaScript, the .htaccess file should include: <FilesMatch "^.*?api.*?$"> SetHandler php5-script </FilesMatch> In that above example, any file that includes the string “api” will be processed as PHP. Feel free to alter that RegEx. Then in the JavaScript file itself, set the ContentType back to JavaScript: <?php [...]
Continue reading...
torsdag, februar 18, 2010
Kommentarer slået fra