This blog, onwebdev, has been moved to http://blog.gabrieleromanato.com. Please update your bookmarks.
WordPress stores all user data in two tables, namely
wp_user_meta. If you've ever tried to insert a new user in the database, you've surely stumbled on some WordPress error while trying to display user preferences or profiles. The point is that both tables work together, so that if you fail to specify some data in one of these tables, you'll get an error. Fortunately, there's a solution.
Flash is a really valuable source of inspiration for jQuery developers. In this article we'll see how to create a Flash menu which plays a sound when you select an item with a rollover. Let's see the details.
WordPress allows us to add any kind of content to any section of its backend. In this post I'll show you how to add custom fields and data to the profile page of WordPress users.
A good question today from Stack Overflow: how can we serialize an element which is not a form? jQuery provides the
serializeArray() methods that operate on forms by turning attributes and values into properties and values of a returned JSON object (the latter) or by building a standard query string (the former). However, creating a JSON object from an element is quite simple. Let's see why.
Web projects fail not because they're poorly coded, but because our clients are full of doubts about the overall goal they want to achieve. Generally speaking, clients know only how a web site should look like, not how it should work. Information architecture, usability and SEO are the big taboos for them. Clients often ask to change the visual layout of a page or to add a new feature to the web site. They give us some PSD files, a couple of documents and images and they think it's all set and ready to be launched online. But they are not aware of the implications of what they're publishing. No briefing, no analysis, no brainstorming and no planning. Therefore a web developer should be an IA expert, a usability tester and a project manager, all in one (person). Too bad.
A couple of weeks ago I finished a WordPress project which consists of a jQuery slot machine product slideshow. The problem with this plugin was to allow the administrator to insert all the required images and captions in order to make the slideshow work. For that reason, I used WordPress custom fields. The tricky part is to fetch the images attached via custom fields. Let's see how.
Yesterday a friend of mine was in trouble because he desperately needed to create a jQuery Lavalamp menu for a client featuring some peculiar characteristics, such as the ability to start from the current page item and an intelligent movement sensor which allows the cursor to stay on the last selected item. I created for him a simple jQuery plugin that performs all these tasks. Let's see the details.
One of the most frequently asked questions on forums, blogs and mailing lists concerns the integration of jQuery plugins with WordPress. Integrating jQuery plugins with WordPress is not a matter of queuing scripts only, but it also means understanding the correct hierarchy and order by which scripts are executed within WordPress. Let's see the details of this topic.