wordpress Posting Content via XML RPC

WordPress XMLRPC – Posting Content From Outside WordPress Admin Panel

Many WordPress blog owners these days prefer to post their blog content from outside. This facilitates the site owners to post blog posts without even loging into their WordPress admin panel. WordPress supports XMLRPC which can take requests and perform specific operations i.e. ‘Add Post’, ‘Edit Post’, ‘View Recent Posts’ or ‘Save a draft’.

Lets start coding now, but before we go into any details lets ensure that our WordPress installation is allowing XMLRPC (default is turned off). Go to WordPress Admin => Settings => Writing and ensure the XML-RPC is enabled. Click save after checking the enable box. We are good and our WordPress is ready to take XML-RPC commands.

XML-RPC is by default enabled in WordPress 3.5+ that’s cool. On the other hand what if you are not using XMLRPC you can anytime disable it like this. Just place the following line of code in your themes functions.php file and you are all set.

But for the sake of our article, i assume you will not disable XMLRPC.

We will use IXR Library to incorporates both client and server classes, as it is designed to hide as much of the workings of XML-RPC from the user as possible. A key feature of the library is automatic type conversion from PHP types to XML-RPC types and vice-versa. This should enable developers to write web services with very little knowledge of the underlying XML-RPC standard.

Download IXR_Library.php.inc (rename it to IXR_Librabry.php.inc) or download the latest version from Incutio

Add a WordPress Blog Post via php

Get Recent 10 WordPress Blog Posts via php

Edit WordPress Blog Post via php

Posting Images and Marking Featured Via WordPress XMLRPC

The new wordpress thumbnail feature is so great, now all you have to do is upload an image and mark it as featured. If this is something you are looking for via WordPress XMLRPC then look at the following code

Code Explanation

Here is how it works

1. We are assuming you have already uploaded the file in your application, all you need to do is read the image file by this code

2. Connect to your WordPress XMLRPC

3. Now, upload the file to wordpress via XMLRPC

Finally lets see the full code example, how this uploaded image is marked as featured in your WordPress site.

Based on the code given below you can define your own logic of posting images in your article. Suppose you want to show the uploaded image within your content, you can append the $thumbnail_image within your $body object e.g.

I have made a centralized Word-press control panel where i am posting blog posts in more than 20 different blogs using the same admin area. There is no need to log into 20 blog accounts to post my content. I would love to hear your thoughts on this. Please leave me a comment and let me know. Don’t forget to subscribe our RSS to receive latest updates.our RSS to receive latest updates.


Top 10 Firefox Addons For Web Developers

Web developers often require tools to test, analyze and benchmark their web pages and to do so they use various web development products for different purposes.

Those who are familiar with Firefox and use it extensively knows that Firefox browser supports added extensions/addons which can be freely downloaded from the Firefox addon site.

Firefox community is constantly working and adding new addon’s all the time they are even upgrading their addon’s to stay in touch with the time. There is a huge list of Firefox addon’s related to web development still i am presenting you a list of top 10 Firefox addons for web Development.

1. Firebug

Firebug is an extremely popular Firefox addon widely used by the web developer community. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. Extremely popular addon and can be said as the king of all web development Firefox addons.

2. YSlow

YSlow is typically a performance measuring Firefox addon to analyze and benchmark website performance. YSlow works on yahoo’s performance metrics and analyze live pages for speed, load and other parameters.

3. HTML Validator

HTML Validator does one thing and does pretty well. It Validates and adds HTML Validations inside Firefox. Web Developers can easily concentrate on the number of errors marked by these extension.

4. GeaseMonkey

GreaseMonkey is a cool Firefox Addon which allows you to customize the way a webpage displays using small bits of JavaScript.

5. CSS Viewer

CSS Viewer With this extension you can view CSS properties of related page elements. Very handy, when You got large CSS file with styles overlapping each other, to analyze why something is not displayed in the way You wanted.

6. JavaScript Debugger

JavaScript Debugger gives you the flexibility of debugging live pages on Firefox and Mozila based browsers.

7. FireShot

FireShot is a Firefox extension that creates screenshots of web pages. Unlike other extensions, this plugin provides a set of editing and annotation tools, which let users quickly modify captures and insert text and graphical annotations.

8. Font Finder

Font Finder is a very handy tool to get all CSS styles of selected text in Firefox / Thunderbird. Just highlight and right click to see all of the styling information you could require including font-size, font-family, color (in both hex and RGB), line-height, letter-spacing, and much much more.

9. Server Switcher

Server Switcher is a navigational help tool for web developers. It allows you to easily switch between sites on your development (hosting the temporary version you are currently working on) and live servers, so that you can immediately see the differences.

10. Selenium IDE

Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly. Why Selenium is best for web app testing?. Read the quick guide to selenium IDE.

So, what’s are your favorite Firefox plugins? Please leave us a comment and share your view with us.

MooTools v/s jQuery

MooTools v/s jQuery is a hot topic as with the advent of technology every developer is using JavaScript in one way or another. Picking up a library is not an easy task specially if you are working somewhere where they already have a set pattern or their libraries defined. Ideally, every company is either working with Moo Tools or jQuery based on their past experiences or developement expertise. Although, both of the This article will bring some of the points to your notice before choosing between Moo Tools or jQuery as your library.

Apart from Moo Tools and jQuery there are other frameworks too which are used quite extensively like Dojo, Ext, YUI and Prototype. But, we are not going much into these framework at this moment and will only consider Mootools and jQuery. I will write an analysis covering all the JavaScript framework later.

Ease Of Learning

jQuery is quite easy to learn and has a good community support. If you are not a JavaScript freak still jQuery will be easier to learn and accomplish things where Moo Tools will require you to spend more time. In one line we can say that learning curve will be steep in Moo Tools than jQuery. In terms of community support, availability of books, search queries on Google its clearly evident that jQuery is leading the race with huge margin. Why jQuery is more popular? We can say just because of the learning ease, excellent documentation and active promotion of jQuery library.

DOM & Pure JavaScript

When we want to work only with DOM (Where 99% of all JavaScript runs) jQuery is far superior than Moo Tools. One reason why jQuery is so popular because of the reason that it does not expects you be learn JavaScript inside out. You are not required to think through prototypal inheritance, binding, “this”, and native prototypes. But, when we think in terms of JavaScript in full breadth we will notice that jQuery is simply focusing on DOM only. jQuery doesn’t address inheritance, basic utilities of all the native types in the JavaScript language etc. Still, if you want to do these you have to write your own stuff. jQuery makes the DOM your playground, but the rest of JavaScript is just not in its scope.

Moo Tools on the other hand is quite different and covers entire JavaScript language not just DOM. This is one of the reason of Moo Tools being bit hard for the early developers. Because MooTools focuses on making the JavaScript API itself more stable and coherent, it is focused less on giving you an interface that “changes the way you write JavaScript” and more on making JavaScript as a whole less frustrating; MooTools is an extension to the JavaScript language. MooTools tries to make JavaScript the way it is meant to be. A significant portion of the core library is spent on augmenting Function, String, Array, Number, Element and other prototypes. The other big thing it offers is a function called Class.

jQuery does not offer an inheritance system nor does it offer any enhancements to native objects (Function, String, etc). This is not a deficiency of jQuery as the authors of jQuery could easily offer these things. Rather, they have designed a toolkit with a different goal in mind. Where MooTools aims to make JavaScript more fun, jQuery aims to make the DOM more fun and its designers have chosen to limit their scope to that task.

In broader way we can say that everything you can do in jQuery can be done in Moo Tools but there is no way to emulate stuff done in Moo Tools into jQuery code because of jQuery’s focus on the DOM. MooTools has a broader functionality than jQuery, but there’s nothing about jQuery that prevents you from doing those things.

jQuery focuses on expressiveness, quick and easy coding, and the DOM while MooTools focuses on extension, inheritance, legibility, reuse, and maintainability.

Further, the MooTools core does not contain every feature you can imagine and neither does the jQuery core. Both frameworks keep their cores rather lean, leaving it to you and others to write plug-ins and extensions. Their job is not to give you every feature you could want but to give you the tools so that you can implement anything you can imagine. This is the power of JavaScript, and of JavaScript frameworks in general, and both frameworks excel at it. MooTools takes a more holistic approach and gives you tools to write anything you can imagine beyond the scope of the DOM, but pays the price by having a steeper learning curve. MooTools extensibility and holistic approach gives you a superset of jQuery’s features, but jQuery’s focus on a slick DOM API doesn’t preclude you from using the native inheritance methods of JavaScript or from using a class system like MooTools if you want it.

Slickspeed is a small analytical approach to benchmark the performance of JS frameworks. If you’ve got any thoughts, comments or suggestions for things we could add, leave a comment! Also please Subscribe to our RSS for latest tips, tricks and examples on cutting edge stuff.

How to Import CSV File In Your PHP Application

PHP gives an ease when it comes to Import flat data (Data without hierarchical structure). If you are using XML to fetch and store data that is fine but what about the case when your client have excel sheet ready with multiple records to go into database. CSV (Comma Separated Values) format is a good candidate format to import or export your application data.

Importing data from CSV files

Since we have lines of values separated by commas, the easiest way to process them is to parse each line using the PHP explode() function:

Dealing with special characters

This simple solution will not work if you have a comma in a value, like for instance when the column is an address and it has a value is like “North street, 1”.

In such cases, the column value in the CSV file is quoted to indicate that the data between quotes should be read as a single column. To deal with this situation, you can use a specially tailored regular expression or use the PHP fgetcsv() function.

Note that locale settings may affect how fgetcsv() function works. As noted in the PHP manual, if LANG locale setting is for instance “en_US.UTF-8”, files in one-byte encoding are read wrong by this function, so be aware.

Importing CSV data directly into the database

If you are importing data from a CSV file into a MySQL database, you import it directly into a database table. It will be much faster than processing it line by line using PHP. Fortunately, most relational database have tools for the bulk data import from CSV files. Load data command will help you here. For instance, in MySQL you can use LOAD DATA INFILE query statement.

Friendly User Interface to Import CSV Data into a Database

An alternative solution to import CSV data is to use my class Quick CSV Import. This is even more user-friendly alternative to import CSV data into a database consists in using the application “Quick CSV import with visual mapping”. This application helps importing CSV files into a database table allowing to define with CSV file columns are mapped to which columns of the database table. This application can even suggest automatically separator character besides the comma. Following is an example of Quick CSV import

Test CSV File

Now, a working PHP example to use the above Quick CSV import Class and import the CSV File provided above

If you’ve got any thoughts, comments or suggestions for things we could add, leave a comment! Also please Subscribe to our RSS for latest tips, tricks and examples on cutting edge stuff.

15 Firefox Extensions You Can’t Live Without

An extension is a small program or add on to Firefox and they have been around for as long as Firefox has. These extensions give you a super power if you will (or at least lets you do something you couldn’t do before.) Like automate things you do often or integrate a service right in your browser. Firefox gain popularity becuase of such extensions/addons, but keep in mind that each extension will take its share of memory so use as many as you like but i would advice to disable whichever you do not want.

  1. Morning Coffee : This extension allows you to set a group of websites to open (each in its own tab) with the click of a button. This will save you from having to roam through your bookmarks to view your favourite sites. So, if you enjoy CNN, BBC and Techcruch all you have to do is click and this extension will open all of them in seperate tabs for you.
  2. Flashblock : Flashblock is an extension for the Mozilla, Firefox, and Netscape browsers that takes a pessimistic approach to dealing with Macromedia Flash content on a webpage and blocks ALL Flash content from loading. It then leaves placeholders on the webpage that allow you to click to download and then view the Flash content.
  3. NoScript : Firefox on Linux is not safe either so NoScript is one of the best tools for making sure your browsing experience is secure. With NoScript, you can disable active content from any site you don’t trust. Unless you configure it to allow JaveaScript, Java and other executable scripting to run from a site, NoScript will completely block the script, keeping you browser safe from known and unknown exploits.
  4. SecureLogin :  Secure Login is a login extension for Mozilla Firefox integrated password manager. You don’t have to remember all your logins and passwords.
  5. ColorfulTabs : ColorfulTabs gives each open tab a different color, making it easier to distinguish between them. With this simple extension, you can colour-code tabs either randomly or according to URL. You can also set tabs to fade. Another fun feature is that you can set a background image for tabs.
  6. Del.icio.us : This extension for Firefox tightly integrates your bookmarks into your browser, making it easy to search, sort, and view your bookmarks. It automatically syncs throughout the day with your del.icio.us account and makes it easy to keep your bookmarks at your fingertips on any computer you use.
  7. BBCode : This extension will make your forum work quite a bit easier, as well as faster. This helpful extension adds BBCode, HTML and XHTML symbols and formatting to the context menu. BBCode also allows you to add up to 10 custom tags to your menu. This extension shows itself when you’re in a forum and you right-click a text area where you can select the tag you want to add from the menu.
  8. BlogRovR : Instead of wasting time going to your favorite blogs, let this handy extension fetch them for you. You do have to sign up for an account using this extension (they promise they won’t spam you) and you will be asked to install another sidebar (Stickies), which is not necessary.
  9. Fireftp : FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers.
  10. iMacros : A must have extension for power surfers. This extension automates pretty much anything you do in Firefox. From opening up sites to filling out forms and even administration work — you can automate it with iMacros. The iMacros extension has a sidebar that shows favorite macros. It also has a record feature that allows you to create macros by simply clicking Record, going through the motions of the macro to be created, and clicking Save.
  11. Fasterfox : This makes Firefox load pages faster. Speed of page loading can be increased by allowing simultaneous connections and pre-fetching. This extension is currently in the experimental stage because of the release of Firefox 3.
  12. IE Tab : There are few sites which are best viewed in IE but this plugin will help you not to open IE and it will open an IE tab inside your Mozilla/firefox. Cools isn’t it?
  13. TinyURL Creator : Twitter users knows that in order to post within 140 chars you needs very tiny url. This extension shrink any long URL or link in the page to something you can email or Twitter using the TinyUrl service with a single click in your browser.
  14. Download Statusbar : This extension will let you view and manage downloads from a tidy status bar – without the download window getting in the way of your web browsing.
  15. Firebug : Last but not least, Firebug which basically helps in web development. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.


  1. SeoQuake : Seoquake is a powerful tool for Mozilla Firefox and for Internet Explorer, aimed at helping web masters who deal with search engine optimization and internet promotion of web sites. Seoquake allows user to obtain and investigate many important SEO parameters of the internet project under study on the fly.

# Check Out Top 10 Firefox Addons for Wed Developers & Designers.

If you’ve got any thoughts, comments or suggestions for things we could add, leave a comment! Also please Subscribe to our RSS for latest tips, tricks and examples on cutting edge stuff.

PHP vs Python: Analysis

PHP vs Python – What does it take to state one language better than other? One answer can be flexibility, development friendly, licensing policy (open source or commercial), community,  portability, dynamic typing, support for variable number of function arguments and ability to freeze live objects in a string representation. Documentation of course is a major player when you choose a language because you still have to sharpen your skill and you haven’t worked on that particular language yet.

Features which supports PHP

  • syntax very close to C and Perl, with curly braces and dollar signs
  • the ‘switch’ statement and ‘do … while’ construct just like C
  • increment and decrement and assignment operators
  • the ternary operator/statement (… ? … : …)
  • schizophrenic tableau of function names. There are no namespaces, so functions often have prefixes to denote their source (but often not). Functions are often placed into classes to simulate namespaces.
  • a very casual language, where globals are often used to pass arguments (global variables should not be used, that is language independent)
  • commonly installed environment
  • aliases (‘$a =& $b’ means that when $b changes, $a changes also) (should be “references”, not “aliases”, but are called aliases)
  • one array type that doubles as a list and a dictionary. Dictionary keys are iterated in their original order.
  • Excellent Documentation
  • Huge Community base with huge supportive codebase available online

Features which supports Python

  • namespaces and modules
  • small core
  • indentation to mark out block structure rather than curly braces, which make code look prettier
  • clear, concise, and orthogonal syntax
  • self documenting with docstrings and pydoc (PHP 5 has reflection and doc strings)
  • keyword arguments to functions and methods, easy support for default arguments
  • true object orientation and ‘first class’ classes and functions
  • classes are used extensively in the standard library
  • multiple inheritance
  • object-oriented file handling
  • method chaining
  • everything is a reference
  • ‘del’ statement for all data types
  • consistent case sensitivity (PHP does for variables, but not functions) (Functions are case insensitive)
  • simple array slicing syntax
  • iterators (PHP 5)
  • structured exception handling (PHP 5)
  • operator overloading
  • threading
  • lots of high-level data types (lists, tuples, dicts, mx.DateTimes, NumPy arrays, etc.)
  • dates that aren’t limited to UNIX timestamps (<1970, >2038)
  • support for all major GUI frameworks
  • strong internationalization and UNICODE support
  • maturity, stability and upward-compatibility
  • tends to lead to much more scalable applications

Unlike PHP, which has web development features built directly into the core language, Python’s web development capabilites are provided by add-on modules. Basic CGI capabilities are provided by the ‘cgi’ module which comes in Python’s standard library. There’s also a wide range of third-party modules available for Python; some are complementary, others compete. As a result, Python provides a more flexible base for web development.

There are some adverse side effects of this flexibility. First, the range of choices can be bewildering. Unless you are working experienced Python web developers, PHP is easier to get started with. Second, support for PHP is more common with shared-hosting companies than support for the various Python options.

Another difference is that PHP is embedded in the web server, whereas Python web applications can either be embedded in the web server like PHP or run in a separate process.

Now, lets test how fast they execute to find all the prime numbers under 10000. We will execute the test three times by optimizing the outcome

$ time ./script.php
Language Script 1 Script 2 Script 3
PHP 1.359 1.753 1.191
Python 1.894 1.636 1.634

Well, this shows that PHP runs faster than Python but here is a catch. PHP can run faster for smaller codes but when we talk in terms of scalable large system then Python will perform better. The above code was small where we were finding all prime numbers under 10000 and PHP shows why its choosen in most of the small web applications. No doubts there are few big names with PHP backing too.

Lets do one more analysis where mathematical calculations are performed

Sample script loops through a FOR statement 2,000,000 times calculating the MD5 hash of N + N, N equaling the number of passes thus far.


Round 1 – 2,000,000 Passes
PHP = 21.4227 sec
Python = 9.8737 sec

Round 2 – 2,000,000 Passes
PHP = 21.1122 sec
Python = 9.7241 sec

Round 3 – 1,000,000 Passes
PHP = 9.811 sec
Python = 4.429 sec

Round 4 – 1,000,000 Passes
PHP = 9.857 sec
Python = 4.280 sec

As you can see, Python is more than 2 times faster than PHP in performing this operation, which is more towards executing a mathematical algorithm.

Another Opinion – Python has been optimized for mathematical algorithms so in that respect it will blow PHP out of the water but if you compare which language can server more web pages in a period of time you find that PHP is noticeably faster.

Other important Aspects which make a language preferable are listed below:

Speed of Execution

Given a fairly intense problem neither language has a large advantage over the other, and each will be better for different things. We can thus rule out execution speed for 99% of what we do.

Speed of Writing

Assuming the languages in question all run at an acceptable speed (and they probably do) this becomes the second most important metric (number 1 being if they will actually run). I must be honest here and say that I have not used Python long enough to be sure how fast or slow I am for developing in it but I can say that so far it seems faster.


I may have not been using Python long but I can hands down say that it’s easier to maintain. I indent stuff in PHP anyway but the lack of curly braces is really nice and I prefer the scope access of Python over PHP (object.property vs $object->property) but I think that’s a matter of personal opinion that you need to decide on for yourself.

Ease of Setup/Portability

PHP wins here, you don’t need write your own HTTP headers as you do with Python, more hosts support it, it’s easier to connect it to a database and there seem to be more tutorials on it.


I would say PHP community and Support is better but with days passing by i have noticed large Python community helping out.

Other Sources:

I liked may comparisons but few are very good i am listing the ones below, i will keep on adding when i get time.


I would prefer Python for the sake of developing a scalable application (its not like you can’t do in PHP), but its easier in Python. Moreover, Google supports Python with its Google App Engine where web sites can be hosted on Google’s server for free, it also supports Python frameworks like Django so my bet will be on Python. PHP on the other hand still have 60% of the market share and i bet with the new release (6.0) in the corner they will certainly fill up the gap by including namespaces,high level data types etc.

If you’ve got any thoughts, comments or suggestions for things we could add, leave a comment! Also please Subscribe to our RSS for latest tips, tricks and examples on cutting edge stuff.

32 SEO Tips to Boost your Website Traffic

Search Engine Optimization (SEO) is the process of improving the volume and quality of traffic to a web site from search engines via “natural” (“organic” or “algorithmic“) search results for targeted keywords. Usually, the earlier a site is presented in the search results or the higher it “ranks”, the more searchers will visit that site. SEO can also target different kinds of searches, including image search, local search, and industry-specific vertical search engines.

By carefully evaluating techniques required to boost website traffic i have come up with the 32 tips for search engine optimization (SEO) of your favourite website. If these tips are followed in correct manner you will see the increase in traffic for sure

1. Make sure your site is not under construction, incomplete, with little or no unique content.

2. When your site is ready, submit it to Google, Yahoo, MSN and ASK.com. Consider also submitting to other search engine but most of them are powered by these four leading search engines. Submit also your site to reputable high PR web directories, open directories, yellow pages and social bookmarking sites such as del.icio.us, furl, etc.

3. Submit your sitemap to Google, Yahoo, MSN and ASK.com (sitemap for search engines usually in XML format)

4. Offer sitemap to your site visitors for easy page navigation. (sitemap for visitors in HTML format)

5. Create unique and rich content sites. Avoid duplicate content. Do not create multiple pages, sub-domains, domains, mirror sites or sites with different domain names but same content.

6. Check your keywords and make sure they are relevant and actually are contained in your site. Avoid keywords stuffing.

7. Use text instead of images in your content, links and important subjects.

8. Make your TITLE and ALT tags descriptive, simple and keyword rich. Avoid irrelevant and repeated keywords.

9. Title tag should be 60-80 characters maximum length.

10. Meta tag description should be 160-180 characters including spaces. (about 25-30 words)

11. Meta Tag keywords must be 15-20 words maximum.

12. Optimize Pages with Headings (H1, H2, H3..) containing your site’s primary keywords.

13. Validate your CSS and HTML. Check for errors and broken links.

14. If your site contains dynamic pages(i.e., the URL contains a “?” character), make sure you use SEO friendly URLs. Search engines’ spiders having difficulty indexing dynamic pages.

15. Maximum links per page must be fewer than 100. Avoid the risk of being flagged as link farm by search engines.

16. Use Lynx as text browser to check your site. (http://lynx.isc.org/)

17. Allow search bots (good ones) to crawl your sites without session IDs or arguments that track their path through the site. Using these techniques may result in incomplete indexing of your site.

18. Check your web server/host if it supports the If-Modified-Since HTTP header. It tells search engines whether your content has changed since last crawled your site. It will save you bandwidth, resources and avoid server overload.

19. Use Robots.txt file to manage and control search engine spiders in indexing your site. You can allow and disallow spiders and choose directories you want to be crawled and indexed. But with bad bots or spam bots you need to modify your HTACCESS file to properly and effectively manage bots or spiders. Visit http://www.robotstxt.org/wc/faq.html to learn more about Robots.txt file.

20. Do not attempt to present different content to search engines than what you show to your site visitors.

21. Avoid dirty tricks and exploiting loop holes to improve search engines ranking.

22. Avoid links to bad neighborhood such as web spammers, link farms, phishing, hacker, crack, gambling, porn and scam sites. Linking to them will greatly affects your search engine rankings.

23. Do not attempt to join in link schemes, excessive reciprocal links or excessive link exchanging and link exchange web rings.

24. Do not use unauthorized programs or online tools to submit your site, check page rankings and other automated queries. Avoid the risk of being flagged as spam.

25. Do not use hidden text and links. Show to search engines what you show to your vistors. It will greatly affect your site’s reputation.

26. Do not attempt to create pages that contains phishing, scam, viruses, trojans, backdoors, spyware, adware and other malicious programs.

27. Make your site useful and informative.

28. Improve your link building. Link to high PR websites. Quality of relevant links are far more important than quantity. Links will greatly improve your site’s visibility, popularity and rankings. Search engines consider links as votes to your site.

29. Check your page link structure. Every page should be reachable by a single static text link.

30. Be extra careful in purchasing SEO services. Some uses illegal and questionable ways to improve rankings.

31. Do not buy or sell links.

32. Do not create sites that contains purely affiliate links and no valuable content that are useful to the users.

About the Author: Edwin Reyes is a Web Developer and the Webmaster of Findmesoftware.com, a Philippine based website that provides free software downloads, tools, reviews, online tips, blogging resources, tutorials and Free SEO Tools and Software Download.

20 MooTools Tutorials and Examples

There are literally over a hundred of JavaScript frameworks out there that make writing complex client-side code significantly easier. If you’re in the market for a powerful, relatively lightweight, and customizable JavaScript framework, MooTools is worth checking out.

To help you get on your way to developing highly-interactive web applications using MooTools, here’s 20 tutorials and working examples that’s worth a read.

Getting Started with MooTools

1. The “Mootorial”

The Mootorial - Screenshot

The Mootorial at //clientside is a comprehensive, practical tutorial on the MooTools framework. The tutorial allows you to execute the sample code either by Firebug or the website’s built-in console.

2. MooTools Overview Video Tutorial

Here’s an excellent screencast that introduces the MooTools framework. It covers the basics such as the concept of chaining, customizing MooTools to your needs, and where to find documentation for MooTools code.

3. Increasing User Experience With Javascript

Increasing User Experience With Javascript - Screenshot

Beauty By Design provides a nine-part video series on improving user interaction using JavaScript (primarily MooTools). A couple of topics covered in the lessons include: using mooTabs, creating sliding sub menus, and using Fx.styles to control font size.

4. Understanding Mootools Selectors

One of the most powerful features of MooTools (as well as other frameworks/libraries like jQuery and Prototype) is the ability to easily select page objects for you to work on. This tutorial covers the basics of selectors in MooTools: $(), $$(), $E(), and $ES() functions.

5. MooTools MooTools Classes: How to use them

This tutorial is an entry-level introduction on working with classes in MooTools. The tutorial works with a hypothetical scenario (buying a car from a car store) to illustrate the concept of classes. The last section of the article discusses the differences of MooTools and script.aculo.us classes.

Intermediate/Advanced Topics

6. Mootools: Ajax and XHR classes

MooTools’ Ajax/XHR classes provides developers a much simpler way of working with XMLHTTPRequests by reducing the amount of code you have to write and by handling browser differences for you. This tutorial talks about the Ajax and XHR classes in brief.

7. Ajax Responder in MooTools

This article delves into the use, extension, and capabilities of the Ajax class in MooTools. It discusses chaining Ajax requests and events, and how you can extend the Ajax class for your needs (also applicable to other MooTools classes).

8. How well do you know Mootools?

Getting started with MooTools is easy, and it won’t be long until you can create wonderful effects and increase user interactivity in your web pages. To help you become a MooTools master, here’s a checklist of common coding mistakes and its corresponding correct usage.

9. Mootools Short-cuts

This is a follow-up article from the one above, focusing more on MooTools syntax usage. Examples involve using shorter code for selection of objects, shorthand for the Ajax class, and creating new elements.

10. Mootools: JSON explained

Mootools: JSON explained - Screenshot

Here’s an excellent introduction to using JSON with MooTools to provide server-side interaction to your web applications. Topics covered include converting a JSON string into a JavaScript object and vice versa.

11. Using MooTools’ Hash.Cookie API

This article explains how to take advantage of MooTools’ powerful Hash.Cookie API to make working with complex cookie utilization a cinch. The example showcases a working example of how you can store the number of times a user visits a page.

12. Chaining with MooTools 1.2

Chaining is beneficial for several reasons including the ability to sequentially execute events (“in a chain”) as well as reduce the number of lines of code you have to write. If you’re wondering about the “who, what, where” of chaining in MooTools, check out this brief but informative tutorial.

Practical/Working Tutorials and Examples

13. AJAX mootools secure contact form

AJAX mootools secure contact form - Screenshot

Learn how to protect your public web forms from spam and SQL injections with this tutorial on how MooTools can be used to make safer public web forms.

14. Using CSS and Mootools to simulate Flash horizontal navigation effect

Using CSS and Mootools to simulate Flash horizontal navigation effect - Screenshot

Create a navigation area that smoothly scrolls left or right depending on where you hover your mouse.

15. Facebook Sliders With Mootools and CSS

Facebook Sliders With Mootools and CSS - Screenshot

Check out this nifty tutorial on how to build a Facebook-inspired set of slider controls that manipulate the opacity, width, and height of an image.

16. MooTools Gone Wild: Element Flashing

MooTools Gone Wild: Element Flashing - Screenshot

In this tutorial, you’ll learn how to make page elements flash. It’s an effective way of drawing attention to a particular section of a web page or alerting users of status changes.

17. Nice Ajax effect for message box using Mootools

Here’s a tutorial on how to display messages that fades in after the user clicks on the submit button. It’s designed for use with web forms, but it can be modified into similar applications.

18. Two CSS vertical menu with show/hide effects

Two CSS vertical menu with show/hide effects - Screenshot

This tutorial shows you how to build a navigation menu that slides up and down smoothly using MooTools. The article also covers how to make a similar effect using plain JavaScript.

19. Mootools Content Slider With Intervals

Mootools Content Slider With Intervals - Screenshot

Here’s an excellent step-by-step tutorial on how to make a content area that slides left-to-right at set intervals – great for slideshows.

20. Jazz Up Your Forms With MooTools

Jazz Up Your Forms With MooTools - Screenshot

This is a two-part series that goes over how to make your web forms fancier. The first part shows you how to add animated field highlighting and how to display instructions to users. In the second part, you’ll step it up a notch by adding live comment previewing and auto-resizing of text areas.

Additional Tools

  • Vista like JavaScript/PHP DatePicker : The Vista-like Ajax Calendar (vlaCalendar) version 2 is a unobtrusive  web version of the slick and profound Windows Vista taskbar calendar, by using the MooTools javascript framework, AJAX, XHTML, CSS and PHP.vlaCalendarExamples.jpg
    Key features:
  • Authentic Vista look-and-feel
    • Quick navigation by jumping back and forth between months, years and decades without drop-down boxes
    • Smooth transition animations
  • Customizable features
  • Lightweight
  • Datepicker functionality (!)
  • Cleaner and more developer centered – easily editable – CSS, PHP and javascript code
    • Easily changeable date labels (e.g. different languages)
    • Easily stylable. Styles are created on top of the general style; the download include two example styles
    • Both normal and datepicker calendar can be instantiated multiple times

Please post your experiences with the above tools. If you like this post kindly subscribe to our RSS for free updates and articles delivered to you.