Here is a simple way to clear html input field on focus.
<input type="text"
onblur="if (this.value=='')
this.value=this.defaultValue"
onclick="if (this.defaultValue==this.value) this.value=''"
value="Replace this with your value"
name="nn">
Ever imagined yourself in the future of user immersed technology to pave utmost user experience. Here, comes the multi touch technology for geeks.
First let's review some of it's application. Because, a video speaks million words.
1. Multi touch DJing Mixing Desk or Holo Desk from Emulator
2. iBar - largest multitouch touchscreen
3. BendDesk: Multi-touch on a Curved Display
4. Reality touchscreen University of Groningen
5. Google Liquid Galaxy
6. BlenderTUIO: Test about finger based 3d manipulation
If you are like most of us, then will probably wondering; how the hell people in the world got such a wonderful thing. And, probably you want one, isn't it?
Here is how you can build one for yourself. STEP 1. Join the online community of people who are busy in making their own Natural User Interface at nuigroup.org
STEP 2. Get some Flash and Adobe After effects skill, because most of the application are built on these platforms. If you are on python then I would recommend you PyMT.
STEP 3. Get cameras and projectors to make your own prototype, you will get these information on nuigroup.org
STEP 4. Give back to the community and share your views and findings.
STEP 5. Ask questions or help on the community, they will sure help you.
STEP 6. Implement on live applications for your personal or professional usage.
There are many instances where you want to move the data from one post type to newly created post type in wordpress. For this you can use following simple SQL query.
UPDATE wp_posts SET post_type = 'new-post-type' WHERE post_type = 'post'
jQuery is awesome and it comes handy when you want to modify the DOM. Here is a small snippet to change the title tag of the document when page is loaded and ready.
/*First load the jQuery library*/
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
</script>
/*Now, modify the title tag.*/
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("title").html("Insert your new title here");
});
</script>
There are few other methods too. If you find one share them with your comments below.
Here is a quick snippet to retrieve content from multiple pages and display on any page, post or template. You can even try creating a short-code for this functionality and could pass page id's to in the argument.
Below, is the screenshot for what I achieved from this code.
Here you go, I made this shortcode to display any custom post type within your post or page. You can also use do_shortcode function to use this shortcode inside your php file.
Insert the following code inside your theme's functions.php and let the wordpress know about this newly created shortcode by add_shortcode() function.
You can find this short code useful when inserting some file or image from the relative path of your theme. Simply copy and paste following code inside your theme's functions.php and use the short code in your Page/ Post editor.
Fortunately, after the open source and it's GPL license came into existence we can benefit from vast number of software to make our life easier. eCommerce is the boom in the market and in the coming decade majority of retailers and entrepreneurs will have an eCommerce site.
Parallel to this, a good software plays an important role when customer management and product updates is the most necessary factor. To choose one of these software is cumbersome and time taking process.
Many factors should be considered before selecting the proper software for your eshop. They may carry following features.
Product/ Catalog management
Inventory Management
CMS
Payment gateways
Customer account
SEO
Shipping management
Security
Multiple language support
Tax and localization
Analysis and report.
And more...
Most of these software are written on PHP and Installation is quite easy, you can have a try on XAMPP, WAMP or MAMP.
It is usual that you get special characters (or non-ASCII characters) when you try to fetch RSS feeds and display on your blog. You can easily filter it using PHP preg_replace function.
Inside a Wordpress's Post query loop, store the the content into a variable and replace all non- ASCII Characters using following code.
Custom post types in wordpress enables developers to do lot of things. But, when it comes to paginating it - lot of people struggle. I searched the web for the solution but could not find proper solution. So, thought of finding it on my own.
So, I created a custom post type called 'projects'.
Wordpress's custom post type is great way to add content to the site. It gives logical sections to insert different posts instead of using traditional post categories.
In this section, we'll discuss on how to create drop down showing all the categories from a custom post type. And, on selecting particular category from the drop down menu we'll display all the post from that category on the same page.
Well, I'm not going to use Ajax to display the page. Instead an iframe will work good in our case. You can use Ajax if you want.
While building a wordpress theme for one of my client I came across some validation issues for contact form7 where two data must show logical error when check in date is bigger than the check out date. First, thing came into my mind is to edit the plugin itself, but this is not the proper solution because if client updates the plugin then my codes will broken again.
Another, solution was to use contact form 7's hooks. The filter 'wpcf7_validate_text' provides a way to directly send validation errors when your requirement is not fulfilled.