<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Developer Plus &#187; Popular</title>
	<atom:link href="http://webdeveloperplus.com/category/popular/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdeveloperplus.com</link>
	<description>The Ultimate Web Developer&#039;s Resource</description>
	<lastBuildDate>Sun, 04 Jul 2010 11:38:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>12 Lesser Known But Useful WordPress Hacks</title>
		<link>http://webdeveloperplus.com/wordpress/12-lesser-known-but-useful-wordpress-hacks/</link>
		<comments>http://webdeveloperplus.com/wordpress/12-lesser-known-but-useful-wordpress-hacks/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 15:01:28 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[Popular]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[wordpress hacks]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=584</guid>
		<description><![CDATA[Wordpress is not only a great blogging tool but a great content management platform that provides a lot of ways to let you hack into into its functionality to make it do whatever you want. Here are 12 lesser known wordpress hacks/ tricks that you might find useful for your next WordPress related project.]]></description>
			<content:encoded><![CDATA[<p>WordPress is not only a great blogging tool but a great content management platform that provides a lot of ways to let you hack into into its functionality to make it do whatever you want. Here are 12 lesser known wordpress hacks/ tricks that you might find useful for your next WordPress related project.</p>
<p>Most of these hacks require your WordPress template to have <em>functions.php</em> file, if it doesn&#8217;t exist, create one.</p>
<h4>1. Add private notes to your WordPress blog posts</h4>
<p>If you would like to add reference notes to your posts that will only be visible to authors of your blog, add this function to your theme&#8217;s <em>functions.php</em> file which will create a shortcode <em>[note]</em> so that you can add notes for authors by including them in <em>[note]</em> and <em>[/note]</em> while writing the post.<span id="more-584"></span></p>
<pre name="code" class="php" >
add_shortcode( 'note', 'sc_note' );
function sc_note( $atts, $content = null ) {
	 if ( current_user_can( 'publish_posts' ) )
		return '&lt;div class=&quot;note&quot;&gt;'.$content.'&lt;/div&gt;';
	return '';
}
</pre>
<p><em>Source:</em> <a href="http://www.wprecipes.com/add-private-notes-to-your-wordpress-blog-posts" >Add Private Notes to your WordPress Blog Posts &#8211; WpRecipes</a></p>
<h4>2. How to disable HTML in WordPress comments</h4>
<p>WordPress allows some HTML tags like <code>&lt;a&gt;</code>, <code>&lt;em&gt;</code>, <code>&lt;strong&gt;</code> within comment text. But if you would like to disable this feature on your blog to prevent users from adding any HTML content within comment text, add this function to your theme&#8217;s <em>functions.php</em> file. This will treat the HTML content within comment text as literals and display them as it is.</p>
<pre name="code" class="php" >
// This will occur when the comment is posted
function plc_comment_post( $incoming_comment ) {

	// convert everything in a comment to display literally
	$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);

	// the one exception is single quotes, which cannot be #039; because WordPress marks it as spam
	$incoming_comment['comment_content'] = str_replace( &quot;'&quot;, '&amp;apos;', $incoming_comment['comment_content'] );

	return( $incoming_comment );
}

// This will occur before a comment is displayed
function plc_comment_display( $comment_to_display ) {

	// Put the single quotes back in
	$comment_to_display = str_replace( '&amp;apos;', &quot;'&quot;, $comment_to_display );

	return $comment_to_display;
}

add_filter( 'preprocess_comment', 'plc_comment_post', '', 1);
add_filter( 'comment_text', 'plc_comment_display', '', 1);
add_filter( 'comment_text_rss', 'plc_comment_display', '', 1);
add_filter( 'comment_excerpt', 'plc_comment_display', '', 1);
</pre>
<p><em>Source:</em> <a href="http://www.theblog.ca/literal-comments" >How to disable HTML in WordPress Comments</a></p>
<h4>3. Check if a WordPress plugin is active</h4>
<p>You might sometime need to check whether a particular plugin is activated or not either to use its functionality or prevent any conflicts from occurring. WordPress provides a function <code>is_plugin_active</code> that accepts path to the plugin file and checks to see if plugin is activated or not.</p>
<pre name="code" class="php" >
&lt;?php
if (is_plugin_active('plugin-directory/plugin-file.php')) {
    //plugin is activated
}
?&gt;
</pre>
<p><em>Source:</em> <a href="http://www.wprecipes.com/check-if-a-wordpress-plugin-is-active-the-easy-way" >Check if a WordPress Plugin is active &#8211; WpRecipes</a></p>
<h4>4. Prevent Plugins from automatically loading stylesheets and scripts</h4>
<p>Many plugins add their own stylesheets and scripts to your site to perform their function. But if you are using a lot of plugins on your WordPress blog, then this might lead to slow loading of your web pages as lots of scripts and stylesheets will require to be loaded first. What you can do to boost performance of your site while using plugins is combine their CSS and JavaScript files and prevent them to load on their own. For that you&#8217;ll need to look into plugin files and find out the handler names of all the CSS and JS files plugins are loading using <code>wp_enqueue_script()</code> and <code>wp_enqueue_style()</code> functions.<br />
For example, if you use wp-pagenavi plugin, it loads its own stylesheet using the function:</p>
<pre name="code" class="php" >
wp_enqueue_style('wp-pagenavi', plugins_url('wp-pagenavi/pagenavi-css.css'), false, '2.50', 'all');
</pre>
<p>The first parameter to <code>wp_enqueue_style()</code> or <code>wp_enqueue_script()</code> is the name of handler for CSS or JS file.<br />
In this case the handler name is <strong>wp-pagenavi</strong>. Now add these lines to your theme&#8217;s <em>functions.php</em> file to prevent it from loading.</p>
<pre name="code" class="php" >
//Prevent Stylesheets from loading
add_action( 'wp_print_styles', 'my_deregister_styles', 100 );

function my_deregister_styles() {
	wp_deregister_style( 'wp-pagenavi' );
}

//Prevent JavaScript files from loading automatically
add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );

function my_deregister_javascript() {
	wp_deregister_script( 'nameofhandler );
}
</pre>
<p><em>Source:</em> <a href="http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles" >How to Disable Scripts and Styles &#8211; Justin Tadlock</a></p>
<h4>5. Showing Last Modified Date for a post</h4>
<p>If you regularly update your old blog posts, then why not show the last modified date on the post page to let readers know when the post was last updated. Use this code to display the last modified date if the post has been modified at a later date.</p>
<pre name="code" class="php" >
Posted on &lt;?php the_time('F jS, Y') ?&gt;
&lt;?php $u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time != $u_time) {
echo &quot;and last modified on &quot;;
the_modified_time('F jS, Y');
echo &quot;. &quot;; } ?&gt;
</pre>
<p><em>Source:</em> <a href="http://wphacks.com/how-to-show-last-modified-wordpress-post/" >Showing Last Modified On Your WordPress Posts &#8211; WPHacks</a></p>
<h4>6. Custom Taxonomies in WordPress</h4>
<p>By default, WordPress has two taxonomies categories and tags to group posts but custom taxonomies allow you to group your pages in your own custom ways, for example if you are running a movie review blog, you might want to add a taxonomy of <em>genre</em> to group movie review by genre, or a taxonomy of <em>actors</em> to group posts by actors. Custom taxonomies free you from restrictions of categories and tags.</p>
<p>You can add a custom taxonomy by adding this code to your theme&#8217;s <em>functions.php</em> file.</p>
<pre name="code" class="php" >
add_action( 'init', 'create_my_taxonomies', 0 );

function create_my_taxonomies() {
	register_taxonomy( 'genre', 'post', array( 'hierarchical' =&gt; false, 'label' =&gt; 'Genre', 'query_var' =&gt; true, 'rewrite' =&gt; true ) );
	register_taxonomy( 'actors', 'post', array( 'hierarchical' =&gt; false, 'label' =&gt; 'Actors', 'query_var' =&gt; true, 'rewrite' =&gt; true ) );
}
</pre>
<p>This will add new boxes to your add post page in admin panel if you are using WordPress 2.8+ using which you can add values for custom taxonomies. Justin Tadlock has written complete tutorial on <a href="http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28">how to create and use custom taxonomies</a>, refer to it for more.</p>
<h4>7. Create Post Only for your RSS Subscribers</h4>
<p>If you would like to give an exclusive offer to your regular RSS subscribers, here&#8217;s a nice trick to create a post that is only visible to your RSS subscribers. </p>
<p>First of all, create a category that will hold posts to show to your RSS suscribers. For example, create a category <em>&#8216;RSS&#8217; </em> and add some posts exclusively to it. Note down the category ID of this category. Now in your theme&#8217;s <em>functions.php</em> file, add these lines of code so that it is only shown to RSS subscribers.</p>
<pre name="code" class="php" >
&lt;?php
function excludeCategory($query)
{
	if($query-&gt;is_home | $query-&gt;is_archive )
	//Exclude category from all other pages except RSS
	$query-&gt;set('cat','-3');
	return $query;
}
add_filter('pre_get_posts', 'excludeCategory');
?&gt;
</pre>
<p><em>Source:</em> <a href="http://webdeveloperplus.com/wordpress/create-post-only-for-your-rss-subscribers-in-wordpress/" >Create Post only for your RSS Subscribers</a></p>
<h4>8. Get Rid of Curly quotes</h4>
<p>WordPress usually replaces pair of double quotes with curly quotes e.g. &quot;something&quot; will become “something”. This is fine for most of the blogs and they look nice too but if you post source code in your posts, then you need to disable this functionality as it&#8217;ll also transform quotes within source code. Paste this code into your theme&#8217;s <em>functions.php</em> file.</p>
<pre name="code" class="php" >
&lt;?php remove_filter('the_content', 'wptexturize'); ?&gt;
</pre>
<p><em>Source:</em> <a href="http://www.wprecipes.com/how-to-get-rid-of-curly-quotes-in-your-wordpress-blog" >Get rid of Curly Quotes in WordPress Blog &#8211; WpRecipes</a></p>
<h4>9. Deny Comment Posting to Spammers</h4>
<p>You can keep a good number of spam comments away from your blog by checking the referrer URL of the posted comment form. Most of the spam comments are usually made by automated scripts and they just post the data to <em>wp-comments-post.php</em> so that there&#8217;s no referral URL through which form is submitted.<br />
You can add a rule to your blog&#8217;s <em>.htaccess</em> file so that it restricts the access of <em>wp-comments-post.php</em> to requests that provide referral URL.<br />
Here are the rules you need to add to .htaccess file. <strong>Do backup .htaccess file before modifying.</strong></p>
<pre name="code" class="php" >
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourblog.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</pre>
<p><em>Source:</em> <a href="http://www.wprecipes.com/how-to-deny-comment-posting-to-no-referrer-requests" >How To Deny Comment Posting to no referrer requests &#8211; WpRecipes</a></p>
<p><em>Note:</em> This will only prevent spam bots or automated scripts from posting comment and not those individuals that manually post them. You should use Akismet or other spam preventing tools in addition to this.</p>
<h4>10. Insert Ads Within RSS Feed</h4>
<p>Here&#8217;s a nice hack to add any HTML content into RSS Feeds like ads, copyright info or anything you want to show to just your RSS readers. Add this code to your theme&#8217;s <em>functions.php</em> file and you can customize the HTML content to anything you want to append or prepend to posts.</p>
<pre name="code" class="php" >
&lt;?php
function insertAds($content) {
    $content = $content.'&lt;hr /&gt;&lt;a href=&quot;http://webdeveloperplus.com&quot;&gt;Visit WebDeveloper Plus for latest Web Design/Development Information&lt;/a&gt;';
    return $content;
}
add_filter('the_excerpt_rss', 'insertAds');
add_filter('the_content_rss', 'insertAds');
?&gt;
</pre>
<p><em>Source:</em> <a href="http://www.webinventif.fr/wordpress-ajouter-du-contenu-dans-son-flux/" >Web Invent If</a></p>
<h4>11. Disable WordPress Feeds</h4>
<p>If you are using WordPress as CMS which has just static content, then you might want to disable RSS feeds as it won&#8217;t be of any use for your users. Add this code to your <em>functions.php</em> file to disable RSS feeds.</p>
<pre name="code" class="php" >
function fb_disable_feed() {
	wp_die( __('No feed available,please visit our &lt;a href=&quot;'. get_bloginfo('url') .'&quot;&gt;homepage&lt;/a&gt;!') );
}

add_action('do_feed', 'fb_disable_feed', 1);
add_action('do_feed_rdf', 'fb_disable_feed', 1);
add_action('do_feed_rss', 'fb_disable_feed', 1);
add_action('do_feed_rss2', 'fb_disable_feed', 1);
add_action('do_feed_atom', 'fb_disable_feed', 1);
</pre>
<p><em>Source:</em> <a href="http://wpengineer.com/disable-wordpress-feed/" >Disable WordPress Feed &#8211; WpEngineer</a></p>
<h4>12. Link Post Title to External URL</h4>
<p>If you sometimes share just a link to other article out there which your readers might find useful, then here&#8217;s a nice hack to link the title of the post in your main template directly to the external URL. This will save your readers some time as they won&#8217;t have to open the post page just to find the resource link. Here&#8217;s how to do it:<br />
Add these lines of code to <em>functions.php</em> file.</p>
<pre name="code" class="php" >
function print_post_title() {
	global $post;
    $thePostID = $post-&gt;ID;
    $post_id = get_post($thePostID);
    $title = $post_id-&gt;post_title;
    $perm = get_permalink($post_id);
    $post_keys = array(); $post_val = array();
    $post_keys = get_post_custom_keys($thePostID);

    if (!empty($post_keys)) {
		foreach ($post_keys as $pkey) {
			if ($pkey=='title_url') {
				$post_val = get_post_custom_values($pkey);
			}
		}
		if (empty($post_val)) {
			$link = $perm;
		} else {
			$link = $post_val[0];
		}
    } else {
		$link = $perm;
    }
    echo '&lt;h2&gt;&lt;a href=&quot;'.$link.'&quot; rel=&quot;bookmark&quot; title=&quot;'.$title.'&quot;&gt;'.$title.'&lt;/a&gt;&lt;/h2&gt;';
}
</pre>
<p>Next, you need to find out following lines in your theme&#8217;s <em>index.php</em> file:</p>
<pre name="code" class="php" >
&lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
</pre>
<p>Replace these lines with the following</p>
<pre name="code" class="php" >
&lt;?php print_post_title() ?&gt;
</pre>
<p>Now whenever you want to share an external URL, add a custom field to your post named <em>title_url</em> and set its value as the URL of the resource.<br />
<em>Source:</em> <a href="http://www.wpbeginner.com/wp-tutorials/how-to-link-to-external-links-from-the-post-title-in-wordpress/" >WPBeginner</a></p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/wordpress/create-post-only-for-your-rss-subscribers-in-wordpress/" rel="bookmark">
												Create Post Only For Your RSS Subscribers in WordPress</a><!-- (9.5)--></li>
		<li><a href="http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/" rel="bookmark">
												How To Use Thumbnails Generated By WordPress In Your Theme</a><!-- (7.6)--></li>
		<li><a href="http://webdeveloperplus.com/wordpress/how-to-ajaxify-wordpress-comment-posting/" rel="bookmark">
												How To: AJAXify WordPress Comment Posting</a><!-- (6.9)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/wordpress/12-lesser-known-but-useful-wordpress-hacks/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>15 Ways to Improve CSS Techniques Using jQuery</title>
		<link>http://webdeveloperplus.com/css/15-ways-to-improve-css-techniques-using-jquery/</link>
		<comments>http://webdeveloperplus.com/css/15-ways-to-improve-css-techniques-using-jquery/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 01:36:37 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[jquery plugins]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=516</guid>
		<description><![CDATA[CSS is great and when it is combined with powerful JavaScript frameworks like jQuery, you can enhance the user experience by providing more intuitive and responsive web interface. Here are 15 ways you can use jQuery to improve CSS techniques.]]></description>
			<content:encoded><![CDATA[<p>CSS is great and when it is combined with powerful JavaScript frameworks like jQuery, you can achieve some really amazing things. Combining these two together will let you enhance the user experience by providing more intuitive and responsive web interface. Here are 15 ways you can use jQuery to improve CSS techniques.</p>
<h4>1. Custom Styled Radio Buttons and Checkboxes</h4>
<p>It is always hard and next to impossible to customize style of radio buttons and checkboxes. But using jQuery we can easily customize the radio buttons and check boxes to make them more user friendly. Here are two different ways to stylize them:</p>
<p><a href="http://www.filamentgroup.com/examples/customInput/" ><strong>Custom Designed Checkbox and Radio Buttons</strong></a><br />
<img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/custom-checkboxes.png" alt="Custom Styled Checkboxes and radio buttons" title="Custom Styled Checkboxes and radio buttons" width="500" height="142" class="alignnone size-full wp-image-520" /><br />
<span id="more-516"></span><br />
<a href="http://www.protofunc.com/scripts/jquery/checkbox-radiobutton/" ><strong>Radio Button and Checkbox replacement.</strong></a><br />
<img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/custom-checkboxes-2.png" alt="radiobutton and check box replacement with jquery" title="radiobutton and check box replacement with jquery" width="500" height="161" class="alignnone size-full wp-image-521" /></p>
<h4>2. Setting Equal Heights with jQuery</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/equal-height-jquery.png" alt="equal height columns using jquery" title="equal height columns using jquery" width="475" height="240" class="alignnone size-full wp-image-524" /><br />
Creating the visual effect of equal-height columns or content boxes has been a challenge ever since we abandoned table-based layouts. Here&#8217;s the jQuery way to set equal height of multiple elements using the <a href="http://www.filamentgroup.com/lab/setting_equal_heights_with_jquery/">equalHeights plugin</a>. With this plugin, you can make equal height columns with just a single line of code.</p>
<pre name="code" class="js" >
$(&quot;someselector&quot;).equalHeights();
</pre>
<h4>3. Styling Select Elements </h4>
<p><code>&lt;select&gt;</code> is another HTML element that is not easy to customize using CSS, but with jQuery at our disposal, we can certainly make them look cool and usable. </p>
<p><a href="http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/" ><strong>jQuery UI Selectmenu</strong></a><br />
This is a plugin for jQuery UI that lets you customize select elements easily.<br />
<img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/selectmenu-jquery-ui.png" alt="jquery ui selectmenu plugin" title="jquery ui selectmenu plugin" width="500" height="160" class="alignnone size-full wp-image-526" /></p>
<p><a href="http://marghoobsuleman.com/mywork/jcomponents/image-dropdown/jquery-image-dropdown-2.1/index.html" ><strong>jQuery image dropdown</strong></a><br />
<img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/image-dropdown.png" alt="jQuery image dropdown" title="jQuery image dropdown" width="500" height="186" class="alignnone size-full wp-image-525" /></p>
<h4>4. Current Field Highlighting in Forms</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/current-field-highlight.png" alt="highlight current field in a form" title="highlight current field in a form" width="500" height="107" class="alignnone size-full wp-image-519" /><br />
It is always good to provide a visual feedback to users when they perform any action while using a web form. Highlighting the field in which user is currently typing is one of the usability features you should add to web forms. Though, this can be achieved using the <code>:focus</code> pseudo selector in CSS. But this technique of <a href="http://css-tricks.com/improved-current-field-highlighting-in-forms/" >highlighting the label along with the selected input field</a> from CSS Tricks provides good user experience.</p>
<h4>5. Fix IE Overflow problem</h4>
<p>Internet Explorer has this rather strange problem, when <code>overflow</code> is set to auto or scroll, the scrollbar shows up inside the width of element. This is fine when you have multiple lines of text within that element, but if you just have a single line of text, then scrollbar would cover that and it won&#8217;t be visible. This <a href="http://remysharp.com/2008/01/21/fixing-ie-overflow-problem/">jQuery technique</a> from Remy Sharp will fix that IE bug.</p>
<h4>6. Block Hover Effect</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/jquery-biggerlink.png" alt="jquery biggerlink" title="jquery biggerlink" width="500" height="160" class="alignnone size-full wp-image-527" /><br />
Creating block hover effect with CSS using <code>display:block</code> is possible but when you have some other content inside a box alongside the link, then it is not possible to create a semantically correct block hover effect using CSS. Here&#8217;s a nice jQuery plugin &#8211; <a href="http://www.ollicle.com/eg/jquery/biggerlink/" ><strong>Bigger Link</strong></a> to achieve that.</p>
<h4>7. Rounded Corners</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/jquery-curvy-corners.png" alt="jQuery Curvy Corners" title="jQuery Curvy Corners" width="500" height="160" class="alignnone size-full wp-image-530" /><br />
CSS Rounded corners are now supported by most browsers like Firefox, Safari but some browsers like IE do not support them. For those unsupported browsers, you can use <a href="http://blue-anvil.com/jquerycurvycorners/test.html" ><strong>jQuery Curvy Corners</strong></a>.</p>
<h4>8. Attractive Menus with jQuery</h4>
<p>Creating a CSS based navigational menu that displays hover state separately is not difficult, but with a little amount of jQuery you can achieve some really nice effects. Check out these two example menus that use jQuery to produce a very subtle hover effect.<br />
<a href="http://www.queness.com/post/411/create-an-attractive-jquery-menu-with-fadein-and-fadeout-effect" ><strong>Create an Attractive jQuery Menu with Fade In and Fade Out Effect</strong></a><br />
<img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/jquery-attractive-menu.png" alt="Attractive menu with jQuery" title="Attractive menu with jQuery" width="500" height="89" class="alignnone size-full wp-image-532" /><br />
<a href="http://www.shopdev.co.uk/blog/animated-menus-using-jquery/" ><strong>Animated Menu Using jQuery</strong></a><br />
<img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/jquery-animated-menu.png" alt="Animated menu with jQuery" title="Animated menu with jQuery" width="500" height="100" class="alignnone size-full wp-image-531" /></p>
<h4>9. Creating a Floating HTML Menu Using jQuery and CSS</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/live-floating-menu.png" alt="Live Floating Menu" title="Live Floating Menu" width="500" height="190" class="alignnone size-full wp-image-535" /><br />
You can fix the position of an element using the <code>position:fixed</code> property but that won&#8217;t provide as rich user experience as <a href="http://net.tutsplus.com/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/">Live floating menu using jQuery</a>. It creates a floating menu on the page and as you scroll down, menu also follows your mouse  scroll.</p>
<h4>10. Splitting Content over multiple columns</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/columnizer-jquery-plugin.png" alt="Split content into multiple columns" title="Split content into multiple columns" width="500" height="250" class="alignnone size-full wp-image-536" /><br />
Ever thought of splitting text of a page into multiple columns just like newspaper. With CSS, this will take a lot of effort but this <a href="http://welcome.totheinter.net/columnizer-jquery-plugin/"><strong>Columnizer jQuery plugin</strong></a> will do all the effort for you to split content into multiple columns with a single line of code.</p>
<h4>11. Semantic Blockquotes with jQuery</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/blockquotes.jpg" alt="Semantic Blockquoteswith jQuery" title="Semantic Blockquoteswith jQuery" width="500" height="141" class="alignnone size-full wp-image-537" /><br />
If you use blockquotes in your design to highlight important points of an article, then you also duplicate the content within blockquotes as it is also there in the article. Here&#8217;s a <a href="http://www.thewebsqueeze.com/web-design-tutorials/semantic-blockquotes-with-jquery.html">nice jquery way</a> to do this leaving the duplication of content to jQuery by specifying which content to show as blockquote.</p>
<h4>12. Text Shadows</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/text-shadow-ie.png" alt="Text Shadow in IE" title="Text Shadow in IE" width="500" height="170" class="alignnone size-full wp-image-538" /><br />
CSS3 includes a nice property of text-shadow that allows you to set a text-shadow generate nice text-effects without using any images. But IE does not support this feature till date. <a href="http://kilianvalkhof.com/2008/javascript/text-shadow-in-ie-with-jquery/" ><strong>Text-shadow in IE</strong></a> adds this support to Internet Explorer using jQuery.</p>
<h4>13. Border Image</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/border-image.png" alt="CSS3 border-image" title="CSS3 border-image" width="465" height="177" class="alignnone size-full wp-image-539" /><br />
CSS3 lets you use images as border backgrounds in addition to just colors. But since it is not supported my many browsers, you&#8217;ll need jQuery to come to rescue. <a href="http://www.lrbabe.com/sdoms/borderImage/index.html"><strong>jQuery.borderimage</strong></a> provides cross-browser support for <code>border-image</code> property.</p>
<h4>14. Opacity</h4>
<p>Opacity is one such CSS property which is supported by most browsers including IE but each has a different way to implement it, though CSS3 standard defines a property <code>opacity</code> to be used for setting opacity of elements, but you end up writing many lines of CSS code just to make opacity cross-browser compatible. jQuery can make this easier too.</p>
<pre name="code" class="js" >
$(&quot;someselectoe&quot;).css(&quot;opacity&quot;, 0.5);
</pre>
<h4>15. Super CSS Selector Support with jQuery</h4>
<p>CSS 2.1 supports various types of selectors including <code>:focus, :first-child, nth-child</code> but not all browsers(IE!) support these selectors. but with <a href=" http://skulljackpot.com/2009/04/19/super-css-selector-support-with-jquery/"><strong>Super CSS Selector</strong></a>, you can be sure to have support for those selectors even in IE.</p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/css/21-amazing-css-techniques-you-should-know/" rel="bookmark">
												21 Amazing CSS Techniques You Should Know</a><!-- (8.2)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/21-brilliant-jquery-image-galleryslideshow-plugins/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/jquery-image-gallery-plugins-thumb.jpg" alt="21 Brilliant jQuery Image Gallery/Slideshow Plugins" width="40px" height="40px" />				21 Brilliant jQuery Image Gallery/Slideshow Plugins</a><!-- (5)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/css/15-ways-to-improve-css-techniques-using-jquery/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>25 New &amp; Useful PHP Techniques &amp; Tutorials</title>
		<link>http://webdeveloperplus.com/php/25-new-useful-php-techniques-tutorials/</link>
		<comments>http://webdeveloperplus.com/php/25-new-useful-php-techniques-tutorials/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:39:30 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php debugging]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=473</guid>
		<description><![CDATA[PHP is the most popular and widely accepted server side scripting language among developers due to its easy to learn nature, free of cost and its large ever increasing helpful community. Here are 25 useful PHP techniques and tutorials, most of which have been published only in this year. 1. Facebook type image rotation and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/php.jpg" alt="PHP" title="PHP" width="160" height="85" class="alignleft size-full wp-image-487" />PHP is the most popular and widely accepted server side scripting language among developers due to its easy to learn nature, free of cost and its large ever increasing helpful community. Here are 25 useful PHP techniques and tutorials, most of which have been published only in this year. </p>
<h4>1. <a href="http://abhinavsingh.com/blog/2009/07/facebook-type-image-rotation-and-more-using-php-and-javascript/" >Facebook type image rotation and more using PHP and Javascript </a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/image-rotation.jpg" alt="image rotation with PHP" title="image rotation with PHP" width="500" height="290" class="alignnone size-full wp-image-485" /><br />
How does facebook rotate images in gallery. Here&#8217;s a nice solution using the inbuilt <em>imagerotate</em> functionality in PHP. <a href="http://abhinavsingh.com/webdemos/imagerotate/" >View Demo &raquo;</a><span id="more-473"></span></p>
<h4>2. <a href="http://davidwalsh.name/php-google-analytics" >Retrieve Google Analytics Visits and Pageviews with PHP</a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/google-analytics-data.png" alt="Retrieve Google Analytics data with PHP" title="Retrieve Google Analytics data with PHP" width="500" height="200" class="alignnone size-full wp-image-484" /><br />
Learn how to integrate Google Analytics data into your website using an easy to use PHP API<br />
<a href="http://davidwalsh.name/dw-content/google-analytics-stats-2.php"  >View Demo &raquo;</a></p>
<h4>3. <a href="http://papermashup.com/caching-dynamic-php-pages-easily/" >Caching Dynamic PHP pages easily</a></h4>
<p>Learn how to cache database intensive heavy pages and serve the static html cached files utilizing the output buffering in PHP</p>
<h4>4. <a href="http://www.hiteshagrawal.com/php/reading-excel-sheet-in-php" >Reading Excel Sheet in PHP</a></h4>
<p>In this article you will learn, how you can read Microsoft Excel Sheet in PHP using Open Source Tool PHPExcelReader.</p>
<h4>5. <a href="http://abhinavsingh.com/blog/2009/07/xml-parsing-in-php-xpath-way-the-best-i-know-so-far/" >XML Parsing in PHP/XPath Way</a></h4>
<p>If you are a PHP developer, you surely must have done XML parsing at some stage or the other. Parsing XML using XPath is far more better than other techniques, not only because it’s quite simple but also because it’s extendable.</p>
<h4>6. <a href="http://davidwalsh.name/gmail-php-imap" >Retrieve Your Gmail Emails Using PHP and IMAP</a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/gmail-email-using-php.png" alt="Grab emails from gmail using PHP" title="Grab emails from gmail using PHP" width="500" height="200" class="alignnone size-full wp-image-483" /><br />
Grabbing emails from your Gmail account using PHP is probably easier than you think. Armed with PHP and its IMAP extension, you can retrieve emails from your Gmail account in no time.<br />
<a href="http://davidwalsh.name/dw-content/php-gmail.php" >View Demo &raquo;</a></p>
<h4>7. <a href="http://www.lateralcode.com/directory-trees-with-php-and-jquery/" >Directory Trees With PHP and jQuery</a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/directory-tree.png" alt="Directory tree using PHP" title="Directory tree using PHP" width="500" height="170" class="alignnone size-full wp-image-482" /><br />
A simple way to keep track of many files is to use a directory tree. A directory tree lists out files and directories so that it’s easy to find what you’re looking for.</p>
<h4>8. <a href="http://dev-tips.com/featured/send-hassle-free-and-dependable-html-emails-with-php" >Send Hassle Free and dependable HTML emails with PHP</a></h4>
<p>A simple straightforward function that sends HTML e-mails with a plain text counterpart for those over 80 and still using AOL 2.5.</p>
<h4>9. <a href="http://dev-tips.com/featured/how-to-use-custom-ini-files-with-php" >How To Use Custom ini Files With PHP</a></h4>
<p>The config file typically holds information that will be used over and over again, such as database info. Today, we will have a look at a simple example of using a custom ini file to set our preferences.</p>
<h4>10. <a href="http://www.reynoldsftw.com/2009/09/from-mysql-to-jquery-via-php-xml-ajax/" >From MySQL to jQuery, via PHP, XML &#038; Ajax</a></h4>
<p>This article will focus on getting data from a database using PHP, converting that to an XML document, and reading that XML in through jQuery via Ajax calls. Seems complex, but is in fact, very easy.</p>
<h4>11. <a href="http://davidwalsh.name/web-service-php-mysql-xml-json" >Create a Basic Web Service Using PHP, MySQL, XML, and JSON</a></h4>
<p>Here’s how to create a basic web service that provides an XML or JSON response using some PHP and MySQL.</p>
<h4>12. <a href="http://corpocrat.com/2009/09/29/how-url-shortening-scripts-work/" >How URL shortner scripts work?</a></h4>
<p>Ever thought of how those URL Shortening services work. Have a look at a nice technique to create your own URL shortening service.</p>
<h4>13. <a href="http://corpocrat.com/2009/08/18/automatic-face-detection-with-php-in-linux/" >Automatic Face Detection in Photos with PHP </a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/php-face-detect.jpg" alt="Detect faces in image with PHP" title="Detect faces in image with PHP" width="247" height="159" class="alignnone size-full wp-image-486" /><br />
Find out how to automatically detect and tag a face in an image.</p>
<h4>14. <a href="http://codytaylor.org/2009/06/update-twitter-using-command-line-javascript-or-php.html" >Update Twitter using Command Line, Javascript, Or PHP.</a></h4>
<p>Everyone seems to be all about Twitter so here’s some simple examples of how to update your Twitter status from a command line prompt, web server or simple html web site.</p>
<h4>15. <a href="http://www.gen-x-design.com/archives/making-restful-requests-in-php/" >Making RESTful Requests in PHP</a></h4>
<p>APIs have become a very commonplace part of many popular web sites and services, especially REST APIs. This article discusses how to get, post, put and delete with a REST API in PHP.</p>
<h4>16. <a href="http://codestips.com/?p=226" >PHP Multithreading using CURL</a></h4>
<p>Simultaneously fetch data from multiple websites using CURL&#8217;s multithreading option.</p>
<h4>17. <a href="http://papermashup.com/php-http-authentication/" >PHP HTTP Authentication</a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/10/php-http-authentication.png" alt="HTTP Authentication With PHP" title="HTTP Authentication With PHP" width="500" height="132" class="alignnone size-full wp-image-481" /><br />
At times, you may wish to make certain pages of your site only viewable to a select few, you can do this by using PHP&#8217;s built in HTTP Authentication.</p>
<h4>18. <a href="http://codestips.com/?p=180" >PHP copy directory from source to destination</a></h4>
<p>To copy a directory source to a destination directory you will need to scan the source directory with all files and directory and copy to the destination. To accomplish this we should make a recursive function that will copy the files from source to target dir.</p>
<h4>19. <a href="http://viralpatel.net/blogs/2009/02/file-upload-in-php-file-upload-php-file-upload-tutorial-securing-things.html" >File Upload in PHP &#8211; Securing the things</a></h4>
<p>Secure your file upload forms and prevent malicious users from attacking your web app.</p>
<h4>20. <a href="http://www.hiteshagrawal.com/php/html-scrapper-in-php" >HTML Scraper in PHP</a></h4>
<p>Sometimes we want to extract the HTML content of the remote website page, this technique is called as HTML scraper. This article will discuss on how we can extract the HTML content of the remote webpage.</p>
<h4>21. <a href="http://hungred.com/useful-information/php-secure-login-tips-and-tricks/" >PHP Secure Login Tips and Tricks</a></h4>
<p>In this article, you will get a list of PHP secure login tips and tricks that will definitely help you decide on your secure rating of your login page.</p>
<h4>22. <a href="http://papermashup.com/use-php-to-gzip-css-files/" >Use PHP To Gzip CSS Files</a></h4>
<p>This technique is a powerful and simple way to reduce page download size and speed up your site that will work with most PHP installations</p>
<h4>23. <a href="http://davidwalsh.name/backup-database-xml-php" >Backup Your Database into an XML File Using PHP</a></h4>
<p>The database is the most important part of a web application. Imagine losing all of the data in your database — it would be tragic. Here’s a PHP snippet that outputs your database as XML.</p>
<h4>24. <a href="http://carsonified.com/blog/dev/how-to-debug-in-php/" >How To Debug in PHP</a></h4>
<p>This article breaks down the fundamentals of debugging in PHP, helps you understand PHP’s error messages and introduces you to some useful tools to help make the process a little less painful.</p>
<h4>25. <a href="http://giorgiosironi.blogspot.com/2009/10/optimizing-php-application-in-5-minutes.html" >Optimizing a php application in 5 minutes</a></h4>
<p>Optimizing means reducing loading and execution times, improving the user experience by making the application reacting more responsively. If your language of choice is php, fortunately this process takes only 5 minutes.</p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/php/21-really-useful-handy-php-code-snippets/" rel="bookmark">
												21 Really Useful &#038; Handy PHP Code Snippets</a><!-- (6.9)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/php/25-new-useful-php-techniques-tutorials/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>21 Brilliant jQuery Image Gallery/Slideshow Plugins</title>
		<link>http://webdeveloperplus.com/jquery/21-brilliant-jquery-image-galleryslideshow-plugins/</link>
		<comments>http://webdeveloperplus.com/jquery/21-brilliant-jquery-image-galleryslideshow-plugins/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 08:47:33 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[image gallery]]></category>
		<category><![CDATA[jquery plugins]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=391</guid>
		<description><![CDATA[Image galleries and slideshows provide a good user experience and make viewing images more pleasant and intuitive on your website. With the advent of powerful JavaScript frameworks like jQuery, Prototype, Mootools etc., the quality of JavaScript based image galleries and slideshows have improved dramatically. As these frameworks are getting popular day by day, more and [...]]]></description>
			<content:encoded><![CDATA[<p>Image galleries and slideshows provide a good user experience and make viewing images more pleasant and intuitive on your website. With the advent of powerful JavaScript frameworks like jQuery, Prototype, Mootools etc., the quality of JavaScript based image galleries and slideshows have improved dramatically.</p>
<p>As these frameworks are getting popular day by day, more and more web developers are coming out with new and creative ideas every day. Here are 21 brilliant jQuery plugins which you can easily use to create an image gallery/slideshow for your website.</p>
<p><span id="more-391"></span></p>
<h4>1. <a title="Spacegallery jQuery Plugin" href="http://eyecon.ro/spacegallery/" target="_blank">Spacegallery</a></h4>
<p>Spacegallery displays your images with a nice 3D effect and it is also pretty easy to use and customize.</p>
<p><img class="largepostimage" title="Spacegallery jQuery Plugin" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/spacegallery.jpg" alt="" width="377" height="256" /></p>
<h4>2. <a title="prettyPhoto jQuery Plugin" href="http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/">prettyPhoto</a></h4>
<p>prettyPhoto might look like jQuery Lightbox clone but it supports videos, flash, YouTube videos, iFrames besides images. It also comes with useful API and 4 beautiful themes. It is a great plugin to create an image as well as multimedia gallery.</p>
<p><img class="largepostimage" title="prettyPhoto jQuery Plugin" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/prettyPhoto.jpg" alt="" width="620" height="418" /></p>
<h4>3. <a title="Zoomimage jQuery Image Gallery" href="http://eyecon.ro/zoomimage/">Zoomimage</a></h4>
<p>Stylish way to present your images in a nice popup with a drop shadow and border.</p>
<p><img class="largepostimage" title="Zoomimage jQuery Image Gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/zoomimage-gallery-jquery.jpg" alt="" width="565" height="376" /></p>
<h4>4. <a title="Pirobox" href="http://designshack.co.uk/news/pirobox-jquery-lightbox">Pirobox</a></h4>
<p>Another lightbox based image gallery plugin that resizes images based on browser size and next/prev links can be placed inside or outside of the image.</p>
<p><img class="largepostimage" title="Pirobox" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/Pirobox.jpg" alt="" width="620" height="294" /></p>
<h4>5. <a title="slideViewerPro jQuery Plugin" href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/svwt/index.html">slideViewerPro</a></h4>
<p>slideViewerPro is a fully customizable jQuery image gallery engine that lets you create outstanding sliding image galleries for your projects or interactive galleries within blog posts.</p>
<p><img class="largepostimage" title="slideViewer Pro Gallery " src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/slideViewerPro.jpg" alt="" width="614" height="347" /></p>
<h4>6. <a title="Galleria jQuery Plugin" href="http://devkick.com/lab/galleria/">Galleria</a></h4>
<p>Galleria generates an image gallery from an unordered list and once the images are loaded, thumbnail navigation is generated. It is easy to customize using just CSS and degrades gracefully if JavaScript is disabled.</p>
<p><img class="largepostimage" title="Galleria Image gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/galleria.jpg" alt="" width="620" height="378" /></p>
<h4>7. <a title="jQuery PanelGallery 1.1" href="http://www.catchmyfame.com/2009/08/13/jquery-panel-gallery-1-1-plugin-released/">jQuery PanelGallery</a></h4>
<p>jQuery PanelGallery generates a slideshow of images with a unique transition. Image transition occurs in a sequential manner displaying the new image panel by panel, thus the name PanelGallery. It is lightweight and allows you to change the direction of panel transition.</p>
<p><img class="largepostimage" title="Panel Gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/PanelGallery.jpg" alt="" width="620" height="295" /></p>
<h4>8. <a title="Pikachoose" href="http://pikachoose.com/">PikaChoose</a></h4>
<p>Pikachoose allows easy presentation of a bunch of images using slideshows with nice thumbnails, next/prev buttons and autoplay options.</p>
<p><img class="largepostimage" title="Pikachoose" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/PikaChoose.jpg" alt="" width="447" height="329" /></p>
<h4>9. <a title="jQuery Gallery Plugin" href="http://code.google.com/p/jquery-gallery-plugin/">jQuery Gallery Plugin</a></h4>
<p>This plugin will transform a list of images into a flash like image gallery. Thumbnail navigation only shows up when you hover over the image and behaves like infinite carousel.</p>
<p><img class="largepostimage" title="jQuery Gallery Plugin" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/jQuery-Gallery-Plugin.jpg" alt="" width="491" height="363" /></p>
<h4>10. <a title="EOGallery" href="http://www.eogallery.com/">EOGallery</a></h4>
<p>EOGallery creates an animated slideshow and images are displayed in larger size using jQuery Thickbox plugin.</p>
<p><img class="largepostimage" title="EOGallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/EOGallery.jpg" alt="" width="620" height="309" /></p>
<h4>11. <a title="Smooth Div Scroll" href="http://www.maaki.com/thomas/SmoothDivScroll/">Smooth Div Scroll</a></h4>
<p>As the name suggests, this plugin scrolls content smoothly and horizontally in either left or right direction. This plugin can scroll any html content and if you use images, you&#8217;ll end up with a nice smoothly scrolling slideshow.</p>
<p><img class="largepostimage" title="Smooth Div Scroll" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/Smooth-Div-Scroll.jpg" alt="" width="620" height="227" /></p>
<h4>12. <a title="Sliding Image Gallery" href="http://www.meadmiracle.com/SlidingGallery.aspx">Sliding Image Gallery</a></h4>
<p>Sliding image gallery displays a number of images in an easy to use manner just like the iTunes Album Viewer. It is quite easy to implement and gives you a lot of options to customize.</p>
<p><img class="largepostimage" title="Sliding Image Gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/sliding-image-gallery.jpg" alt="" width="620" height="273" /></p>
<h4>13. <a title="Step Carousel" href="http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm">Step Carousel Viewer</a></h4>
<p>This plugin displays images or any HTML content by side scrolling them left or right with a smooth sliding animation during transition. And with its two public methods and two custom event handlers, you can customize it to your requirement easily.</p>
<p><img class="largepostimage" title="Step Carousel Viewer" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/step-carousel-viewer.jpg" alt="" width="603" height="257" /></p>
<h4>14.<a title="jQuery Virtul Tour" href="http://www.openstudio.fr/jquery-virtual-tour/"> jQuery Virtual Tour</a></h4>
<p>With this plugin, you can convert panoramic views into virtual tours, it degrades gracefully if JavaScript is disabled.</p>
<p><img class="largepostimage" title="jQuery Virtual Tour" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/virtual-tour.jpg" alt="" width="619" height="390" /></p>
<h4>15. <a title="Ultimate Fade In Slide Show" href="http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm">Ultimate Fade In Slide Show</a></h4>
<p>This is a robust, cross browser fade in slideshow script that incorporates some of your most requested features all rolled into one.</p>
<p><img class="largepostimage" title="Ultimate Fade In Slide Show" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/ultimate-fade-in-slideshow.jpg" alt="" width="320" height="251" /></p>
<h4>16. <a title="Thickbox Gallery" href="http://jquery.com/demo/thickbox/">ThickBox Gallery</a></h4>
<p>jQuery Thickbox plugin can be used for creating a nice image viewer that shows images in a lightbox and supports keyboard shortcuts to navigate through the images.</p>
<p><img class="largepostimage" title="Thickbox Gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/Thickbox-Gallery.jpg" alt="" width="620" height="391" /></p>
<h4>17. <a title="jQuery Lightbox" href="http://leandrovieira.com/projects/jquery/lightbox/">jQuery Lightbox</a></h4>
<p>This one is a simple elegant and unobtrusive plugin to create an overlay image viewer that supports keyboard shortcuts and requires minimal coding effort.</p>
<p><img class="largepostimage" title="jQuery Lightbox Gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/lightbox-gallery.jpg" alt="" width="585" height="374" /></p>
<h4>18. <a title="GalleryView" href="http://spaceforaname.com/galleryview">GalleryView</a></h4>
<p>GalleryView lets you create a flexible and attractive content that is very easy to implement and customize. Also, their way of explaining the anatomy of GalleryView plugin is very intuitive.</p>
<p><img class="largepostimage" title="Gallery View" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/Gallery-View.jpg" alt="" width="620" height="319" /></p>
<h4>19. <a title="Flickr Gallery" href="http://www.userfriendlythinking.com/Blog/BlogDetail.asp?p1=7013&amp;p2=101&amp;p7=3001">Flickr Gallery</a></h4>
<p>Flickr Gallery generates a slideshow whose size varies with the size of image. As the name suggests, it can directly pull images from a flickr account(needs Flickr API key) or you can use just a simple unordered list. Thumbnail navigation is intuitive with a nice scrolling bar.</p>
<p><img class="largepostimage" title="Flickr Gallery" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/flickr-Gallery.jpg" alt="" width="587" height="380" /></p>
<h4>20.<a title="Easy Slider" href="http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider">Easy Slider</a></h4>
<p>Easy slider enables images to slide either horizontally or vertically and it can be styled easily using CSS. The latest version of this plugin supports continuous scroll instead of jumping over to first slide from last slide.</p>
<p><img class="largepostimage" title="Easy Slider" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/easy-slider.jpg" alt="" width="620" height="196" /></p>
<h4>21. <a title="Super Sized" href="http://www.buildinternet.com/project/supersized/">SuperSized</a></h4>
<p>Using Supersized, you can display large sized photos easily as it will scale the images automatically depending on browser size and supports preloading of images for better experience.</p>
<p><img class="largepostimage" title="Supersized" src="http://static.webdeveloperplus.com/uploads/2009/09/jquery-image-gallery/Supersized.jpg" alt="" width="620" height="347" /></p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/jquery/30-fresh-amazing-jquery-plugins-tutorials/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/fresh-jquery-plugins-thumb.jpg" alt="30+ Fresh &#038; Amazing jQuery Plugins &#038; Tutorials" width="40px" height="40px" />				30+ Fresh &#038; Amazing jQuery Plugins &#038; Tutorials</a><!-- (7.4)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/15-excellent-jquery-plugins-to-enhance-html-forms/" rel="bookmark">
												15+ Excellent jQuery Plugins To Enhance HTML Forms</a><!-- (6.9)--></li>
		<li><a href="http://webdeveloperplus.com/flash/25-amazing-free-flash-based-image-galleries/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/flash-gallery-scripts-thumb.jpg" alt="25 Amazing &#038; Free Flash Based Image Galleries" width="40px" height="40px" />				25 Amazing &#038; Free Flash Based Image Galleries</a><!-- (6.5)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/jquery/21-brilliant-jquery-image-galleryslideshow-plugins/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>25 Incredibly Useful CSS Tricks You Should Know</title>
		<link>http://webdeveloperplus.com/css/25-incredibly-useful-css-tricks-you-should-know/</link>
		<comments>http://webdeveloperplus.com/css/25-incredibly-useful-css-tricks-you-should-know/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 05:48:59 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=317</guid>
		<description><![CDATA[Here are 25 incredibly useful CSS tricks that will help you design great web interfaces. You might be aware of some or all of these techniques, but this can be your handy resource to nifty CSS tricks that you should know. 1. Change Text Highlight Color You might not have known this before! With CSS [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/09/useful-css-tricks.png" alt="Useful CSS Tricks" title="Useful CSS Tricks" width="567" height="232" class="largepostimage" /><br />
Here are 25 incredibly useful CSS tricks that will help you design great web interfaces. You might be aware of some or all of these techniques, but this can be your handy resource to nifty CSS tricks that you should know.</p>
<h4>1. Change Text Highlight Color</h4>
<p>You might not have known this before! With CSS you can control the colors of selected test at least for <del>standards compliant</del> cutting edge browsers like Safari or Firefox.</p>
<pre name="code" class="css" >
::selection{ /* Safari and Opera */
	background:#c3effd;
	color:#000;
}
::-moz-selection{ /* Firefox */
	background:#c3effd;
	color:#000;
}
</pre>
<h4>2. Prevent Firefox Scrollbar Jump</h4>
<p>Firefox usually hides the vertical scrollbar if size of the content is less than the visible window but you can fix that using this simple CSS trick.</p>
<pre name="code" class="css" >
html{ overflow-y:scroll; }
</pre>
<h4>3. Print Page Breaks</h4>
<p>While most of the internet users prefer to read content online but some of your users might like to print your article. With CSS you can control the page breaks within content just add this CSS class to your stylesheet and add this class to any tag which you would like to print on next page.</p>
<pre name="code" class="css" >
.page-break{ page-break-before:always; }
</pre>
<h4>4. Using !important</h4>
<p>Experienced CSS programmers are usually aware of this but beginners do miss out on this <code>!important</code> CSS rule. By adding !important to your CSS rule, you can increase its precedence over other subsequent rules. e.g. in below code, background-color will be blue and not red due to <code>!important</code>.</p>
<pre name="code" class="css" >
.page { background-color:blue !important;   background-color:red;}
</pre>
<h4>5. Replace Text With Image</h4>
<p>This is a nice SEO trick that lets you show a nice fancy image instead of simple boring text to your visitors but search engines will see only the text.</p>
<pre name="code" class="css" >
.header{
	text-indent:-9999px;
	background:url('someimage.jpg') no-repeat;
	height: 100px; /*dimensions equal to image size*/
	width:500px;
}
</pre>
<h4>6. Cross Browser Minimum Height</h4>
<p>Internet Explorer does not understand the min-height property but here&#8217;s the CSS trick to accomplish that in IE.</p>
<pre name="code" class="css" >
#container{
	height:auto !important;/*all browsers except ie6 will respect the !important flag*/
	min-height:500px;
	height:500px;/*Should have the same value as the min height above*/
}
</pre>
<h4>7. Highlight links that open in a new window</h4>
<p>This piece of CSS code will highlight links that open in a new window so that user knows before hand that link will pop open in a new tab or window.</p>
<pre name="code" class="css" >
a[target=&quot;_blank&quot;]:before,
a[target=&quot;new&quot;]:before {
	margin:0 5px 0 0;
	padding:1px;
	outline:1px solid #333;
	color:#333;
	background:#ff9;
	font:12px &quot;Zapf Dingbats&quot;;
	content: &quot;\279C&quot;;
}
</pre>
<h4>8. Style Your Ordered List</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/09/ordered-list-style.png" alt="Style Ordered List" title="Style Ordered List" width="102" height="93" class="alignleft size-full wp-image-333" style="border:1px solid #eee;" /><br />
Style numbers of an ordered list in different way than the content of each list item.<br />
<br class="clear" /></p>
<pre name="code" class="css" >
ol {
	font: italic 1em Georgia, Times, serif;
	color: #999999;
}
ol p {
	font: normal .8em Arial, Helvetica, sans-serif;
	color: #000000;
}
</pre>
<h4>9. Drop Caps Using CSS</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/09/drop-caps.png" alt="Drop Caps using CSS" title="Drop Caps using CSS" width="428" height="106" class="largepostimage" /><br />
You can create a drop caps effect like those in newspapers or magazines using the <em>:first-letter</em> pseudo element.</p>
<pre name="code" class="css" >
p:first-letter{
display:block;
margin:5px 0 0 5px;
float:left;
color:#FF3366;
font-size:3.0em;
font-family:Georgia;
}
</pre>
<h4>10. Cross Browser Opacity</h4>
<p>Though CSS3 standard includes the opacity property, but not every browser supports it, here&#8217;s the CSS trick for cross browser transparency.</p>
<pre name="code" class="css" >
.transparent_class {
	filter:alpha(opacity=50);
	-moz-opacity:0.5;
	-khtml-opacity: 0.5;
	opacity: 0.5;
}
</pre>
<h4>11. Vertical centering with line-height</h4>
<p>If you are using fixed height container and need to vertically center the text, use the line-height property to do that perfectly.</p>
<pre name="code" class="css" >
line-height:30px;
</pre>
<h4>12. Center Fixed Width layout</h4>
<p>If you use fixed width layout, you should center the layout so that if somebody views it on larger screen, the page displays in the center of the screen and not on left side.</p>
<pre name="code" class="css" >
body{
	width:1000px;
	margin:0 auto;
}
</pre>
<h4>13. Remove vertical textarea scrollbar in IE</h4>
<p>IE adds a vertical scrollbar to textarea input fields regardless of the height of content in it. You can fix that with this simple CSS trick.</p>
<pre name="code" class="css" >
textarea{
	overflow:auto;
}
</pre>
<h4>14. Remove active link borders</h4>
<p>Some browsers like Firefox and IE add a dotted outline border over the link user clicked. It is a useful accessibility feature that lets user know which link he clicked or is in focus. But sometimes you need to get rid of this, here&#8217;s the CSS you need to use.</p>
<pre name="code" class="css" >
a:active, a:focus{ outline:none; }
</pre>
<h4>15. Prevent Elements from disappearing in IE</h4>
<p>Sometimes IE behaves in a peculiar way and makes some elements disappear, which appear when you try to make a selection. It is due to some IE issues with float elements. This can be fixed by adding <code>position:relative;</code> to elements that disappears.</p>
<h4>16. Attribute-Specific Icons</h4>
<p>CSS Attribute selectors are very powerful giving you many options to control styles of different elements e.g. you can add an icon based on the <code>href</code> attribute of the <code>a</code> tag to let the user know whether link points to an image, pdf, doc file etc.</p>
<pre name="code" class="css" >
a[href$='.doc'] {
	padding:0 20px 0 0;
	background:transparent url(/graphics/icons/doc.gif) no-repeat center right;
}
</pre>
<h4>17. CSS Pointer Cursors</h4>
<p>This trend has caught up lately. All user interface elements on a web page that can be clicked by user have their cursor similar to that of hyperlink. Here&#8217;s the CSS trick to do that.</p>
<pre name="code" class="css" >
input[type=submit],label,select,.pointer { cursor:pointer; }
</pre>
<h4>18. Capitalize Text</h4>
<p>This trick is especially useful for displaying title of an article on a web page with all its words starting with capital letter.</p>
<pre name="code" class="css" >
text-transform: capitalize;
</pre>
<h4>19. Small Caps Text</h4>
<p>This is one of the lesser used but useful CSS property. It capitalizes all the letters of text but the size of letters following the first letter of each word is smaller than the first letter.</p>
<pre name="code" class="css" >
font-variant:small-caps;
</pre>
<h4>20. Highlight Text Input Fields</h4>
<p>This CSS trick lets you highlight the input field currently in focus. This trick does not work in IE though.</p>
<pre name="code" class="css" >
input[type=text]:focus, input[type=password]:focus{
	border:2px solid #000;
}
</pre>
<h4>21. Remove Image Border</h4>
<p>Image hyperlinks usually get a ugly blue border that makes your image hyperlinks look horrible. It&#8217;s better to remove border on all hyperlinked images and add individually to those you want using CSS classes.</p>
<pre name="code" class="css" >
a img{ border:none; }
</pre>
<h4>22. Tableless Forms Using labels</h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/09/tableless-forms.png" alt="Tableless Forms using labels and CSS" title="Tableless Forms using labels and CSS" width="302" height="80" class="largepostimage" /><br />
Gone are the days when tables were used to layout Forms. CSS lets you make accessible forms with table like layout using label tags. Using label tags makes sure your forms are more accessible. Here&#8217;s sample html and css code for tableless form using labels.</p>
<pre name="code" class="html" >
&lt;form method=&quot;post&quot; action=&quot;#&quot; &gt;
	&lt;p&gt;&lt;label for=&quot;username&quot; &gt;Username&lt;/label&gt;
		&lt;input type=&quot;text&quot; id=&quot;username&quot; name=&quot;username&quot; /&gt;
	&lt;/p&gt;
	&lt;p&gt;&lt;label for=&quot;password&quot; &gt;Username&lt;/label&gt;
		&lt;input type=&quot;password&quot; id=&quot;password&quot; name=&quot;pass&quot; /&gt;
	&lt;/p&gt;
	&lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;&lt;/p&gt;
&lt;/form&gt;
</pre>
<pre name="code" class="css" >
p label{
	width:100px;
	float:left;
	margin-right:10px;
	text-align:right;
}
</pre>
<h4>23. Set a Consistent Base Font Size</h4>
<p>Setting the font-size property to 62.5% in body tag makes 1em equal to 10px. This lets you use em easily as you can find out the font-size in pixels from em values.</p>
<pre name="code" class="css" >
body{ font-size:62.5%; }
</pre>
<h4>24. Highlight Acronym and Abbr Tags</h4>
<p><code>acronym</code> and <code>abbr</code> tags provide useful information to users, browsers and search engines about acronyms and abbreviations, but most of the browsers except Firefox do not highlight them. Here&#8217;s the CSS trick to highlight acronym and abbr tags within your web page.</p>
<pre name="code" class="css" >
acronym, abbr{
	border-bottom:1px dotted #333;
	cursor:help;
}
</pre>
<h4>25. CSS Reset by <a href="http://meyerweb.com/eric/tools/css/reset/" target="_blank">Eric Meyer</a></h4>
<p>This piece of CSS code resets all the browser default styles preventing any browser inconsistencies in your CSS styles.</p>
<pre name="code" class="css" >
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}

/* remember to define focus styles! */
:focus {
outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}
</pre>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/css/21-amazing-css-techniques-you-should-know/" rel="bookmark">
												21 Amazing CSS Techniques You Should Know</a><!-- (5.8)--></li>
		<li><a href="http://webdeveloperplus.com/css/15-ways-to-improve-css-techniques-using-jquery/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/css-jquery-techniques-thumb.png" alt="15 Ways to Improve CSS Techniques Using jQuery" width="40px" height="40px" />				15 Ways to Improve CSS Techniques Using jQuery</a><!-- (5.4)--></li>
		<li><a href="http://webdeveloperplus.com/css/css-tooltip-box-without-images/" rel="bookmark">
												CSS Tooltip Box Without Images</a><!-- (5.1)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/css/25-incredibly-useful-css-tricks-you-should-know/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>30+ Fresh &amp; Amazing jQuery Plugins &amp; Tutorials</title>
		<link>http://webdeveloperplus.com/jquery/30-fresh-amazing-jquery-plugins-tutorials/</link>
		<comments>http://webdeveloperplus.com/jquery/30-fresh-amazing-jquery-plugins-tutorials/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 08:03:55 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[jquery effects]]></category>
		<category><![CDATA[jquery plugins]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=277</guid>
		<description><![CDATA[jQuery is slowly becoming ubiquitous in the web development arena all due to its easy to learn, easy to use and easy to extend nature. Here are 30+ fresh and amazing jQuery plugins and tutorials which i have hand-picked from jQuery articles or plugins published in last 30 days on the interwebs. If you are looking for latest on jQuery, then this is a must read for you.]]></description>
			<content:encoded><![CDATA[<p>jQuery is slowly becoming ubiquitous in the web development arena all due to its easy to learn, easy to use and easy to extend nature. Here are 30+ fresh and amazing jQuery plugins and tutorials which i have hand-picked from jQuery articles or plugins published in last 30 days on the interwebs. If you are looking for latest on jQuery, then this is a must read for you.</p>
<h3>Tutorials</h3>
<h4 class="clear">1. <a href="http://hungred.com/2009/08/10/how-to/tutorial-how-to-add-preloader-loading-image-gallery-jquery/">How to add preloader with loading image in a gallery using jQuery</a></h4>
<p><img class="largepostimage" src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/jquery-image-preloader.jpg" alt="" width="603px" height="250px" /><br />
Use a jQuery preloader while images are loading in the gallery.<br />
<a href="http://hungred.com/wp-content/demo/jQuery-preloading-with-image/demo.html">» View Demo</a> | <a href="http://hungred.com/2009/08/10/how-to/tutorial-how-to-add-preloader-loading-image-gallery-jquery/">» View Tutorial</a></p>
<h4>2. <a href="http://www.queness.com/post/530/simple-lava-lamp-menu-tutorial-with-jquery" >Simple Lava Lamp Menu Tutorial With jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/lava-lamp-jquery.jpg" class="largepostimage" width="559px" height="71px" /><br />
Create a unique lava lamp animated jQuery navigation menu<br />
<a href="http://www.queness.com/resources/html/lava/style.html" >» View Demo</a> &#124; <a href="http://www.queness.com/post/530/simple-lava-lamp-menu-tutorial-with-jquery" >» View Tutorial</a></p>
<h4>3. <a href="http://www.devirtuoso.com/2009/08/how-to-create-a-3d-tag-cloud-in-jquery/" >How To Create a 3D Tag Cloud in jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/3d-tag-cloud-jquery.jpg" class="alignleft size-full wp-image-284" width="203px" height="200px" /><br />
Amazing tutorial on creating a flash like 3D tag cloud using jQuery.<br />
<a href="http://www.devirtuoso.com/Examples/3D-jQuery/" >» View Demo</a> &#124; <a href="http://www.devirtuoso.com/2009/08/how-to-create-a-3d-tag-cloud-in-jquery/" >» View Tutorial</a></p>
<h4 class="clear">4. <a href="http://papermashup.com/drag-drop-with-php-jquery/" >Drag &#038; Drop With jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/drag-drop-jquery.png" class="largepostimage" width="381px" height="178px" /><br />
Drag &#038; Drop facility in a web application provides for a rich user interface, learn how to create one using jQuery UI.<br />
<a href="http://papermashup.com/demos/jquery-drag-drop/" >» View Demo</a> &#124; <a href="http://papermashup.com/drag-drop-with-php-jquery/" >» View Tutorial</a></p>
<h4>5. <a href="http://aext.net/2009/08/kwicks-for-jquery-and-an-awesome-horizontal-animated-menu/" >Awesome Horizontal Animated menu using Kwicks for jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/kwicks-horizontal-menu.png" class="largepostimage" width="524px" height="66px" /><br />
Build a customizable and versatile horizontal animated menu using jQuery Kwicks plugin.<br />
<a href="http://aext.net/example/kwicksmenu/" >» View Demo</a> &#124; <a href="http://aext.net/2009/08/kwicks-for-jquery-and-an-awesome-horizontal-animated-menu/" >» View Tutorial</a></p>
<h4>6. <a href="http://www.queness.com/post/484/create-a-thumbnail-gallery-with-slick-heading-and-caption-effect-with-jquery" >Create a Thumbnail Gallery With Slick Heading &#038; Caption effect</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/slick-thumbnail-caption.jpg" class="largepostimage" width="364px" height="248px" /><br />
<a href="http://www.queness.com/resources/html/caption/index.html" >» View Demo</a> &#124; <a href="http://www.queness.com/post/484/create-a-thumbnail-gallery-with-slick-heading-and-caption-effect-with-jquery" >» View Tutorial</a></p>
<h4>7. <a href="http://www.queness.com/post/411/create-an-attractive-jquery-menu-with-fadein-and-fadeout-effect" >Create an Attractive jQuery Menu with fade in and out effects</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/fade-in-out-jquery-menu.jpg" class="largepostimage" width="372px" height="79px" /><br />
Nice tutorial on creating an attractive jquery menu with fade in background change on hover.<br />
<a href="http://www.queness.com/resources/html/fadein/index.html" >» View Demo</a> &#124; <a href="http://www.queness.com/post/411/create-an-attractive-jquery-menu-with-fadein-and-fadeout-effect" >» View Tutorial</a></p>
<h4>8. <a href="http://papermashup.com/jquery-php-ajax-autosuggest/" >jQuery PHP AJAX Autosuggest</a></h4>
<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/08/autosuggest-php-jquery.jpg" alt="jQuery PHP AJAX Autosuggest" title="jQuery PHP AJAX Autosuggest" width="257" height="193" class="alignleft size-full wp-image-284" /> Autosuggest is one of the useful features of present web applications. Learn how to create one using jQuery and PHP.<br />
<a href="http://papermashup.com/demos/autosuggest/" >» View Demo</a> &#124; <a href="http://papermashup.com/jquery-php-ajax-autosuggest/" >» View Tutorial</a></p>
<h4 class="clear">9. <a href="http://aext.net/2009/08/perfect-login-dropdown-box-likes-twitter-with-jquery/" >Perfect Login Drop Down Box Like Twitter</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/twitter-sign-in-box-jquery.png" class="largepostimage" width="396px" height=246"px" /><br />
Nice tutorial on imitating the new twitter login dropdown box using jquery.<br />
<a href="http://aext.net/example/twitterlogin/" >» View Demo</a> &#124; <a href="http://aext.net/2009/08/perfect-login-dropdown-box-likes-twitter-with-jquery/" >» View Tutorial</a></p>
<h4>10. <a href="http://buildinternet.com/2009/08/crafting-an-animated-postcard-with-jquery/" >Crafting an Animated Postcard With jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/flashy-postcard.jpg" class="largepostimage" width="599px" height="262px" /><br />
Create a flashy postcard using just jQuery and no flash.<br />
<a href="http://buildinternet.com/live/postcard" >» View Demo</a> &#124; <a href="http://buildinternet.com/2009/08/crafting-an-animated-postcard-with-jquery/" >» View Tutorial</a></p>
<h4>11. <a href="http://9lessons.blogspot.com/2009/08/twitter-like-search-with-jquery-ajax.html" >Twitter like Search With jQuery &#038; AJAX</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/twitter-like-search.png" class="largepostimage" width="416px" height="151px" /><br />
Create a twitter like search box that loads results using AJAX on same page.<br />
<a href="http://9lessons.net63.net/newsearch.php" >» View Demo</a> &#124; <a href="http://9lessons.blogspot.com/2009/08/twitter-like-search-with-jquery-ajax.html" >» View Tutorial</a></p>
<h4>12. <a href="http://9lessons.blogspot.com/2009/08/vote-with-jquery-ajax-and-php.html" >Voting System With jQuery, AJAX, PHP</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/dzone-voting-ajax.png" class="largepostimage" width="467px" height="97px" /><br />
Learn how to create <a href="http://dzone.com/" target="_blank" >dzone</a> like voting system.<br />
<a href="http://9lessons.net63.net/voting.php" >» View Demo</a> &#124; <a href="http://9lessons.blogspot.com/2009/08/vote-with-jquery-ajax-and-php.html" >» View Tutorial</a></p>
<h4>13. <a href="http://www.webresourcesdepot.com/ajaxed-sliding-shopping-cart-with-jquery/" >AJAXed Sliding Shopping Cart Using jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/sliding-ajax-shopping-cart.png" class="largepostimage" width="473px" height="172px" /><br />
Amazing tutorial on creating a sliding AJAX Shopping basket that slides in and updates the cart when new item is added and auto-hides after some time. It also supports manual show hide option to view shopping cart at any time.<br />
<a href="http://webresourcesdepot.com/wp-content/uploads/file/jbasket/sliding-basket/" >» View Demo</a> &#124; <a href="http://www.webresourcesdepot.com/ajaxed-sliding-shopping-cart-with-jquery/" >» View Tutorial</a></p>
<h4>14. <a href="http://www.devirtuoso.com/2009/07/how-to-build-an-animated-header-in-jquery/" >How To Build Animated Header in jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/animated-header-jquery.jpg" class="largepostimage" width="553px" height="237px" /><br />
Add motion to your header by animating its background. Amazing animation tutorial using jQuery.<br />
<a href="http://www.devirtuoso.com/Examples/jQuery-Animated-Header/" >» View Demo</a> &#124; <a href="http://www.devirtuoso.com/2009/07/how-to-build-an-animated-header-in-jquery/" >» View Tutorial</a></p>
<h4>15. <a href="http://9lessons.blogspot.com/2009/07/hide-and-seek-with-jquery.html" >Hide and Seek With jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/hide-seek-jquery.png" class="largepostimage" width="437px" height="162px" /><br />
Use jQuery to display multiple modules of an application on a single page based on the event occurred.<br />
<a href="http://9lessons.net63.net/hidejquery.html" >» View Demo</a> &#124; <a href="http://9lessons.blogspot.com/2009/07/hide-and-seek-with-jquery.html" >» View Tutorial</a></p>
<h4>16. <a href="http://davidwalsh.name/jquery-comment-preview" >jQuery Comment Preview</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/comment-preview-jquery.png" class="largepostimage" width="600px" height="204px" /><br />
Provide comment preview to your users as they type in their comment using jQuery.<br />
<a href="http://davidwalsh.name/dw-content/jquery-live-preview.php" >» View Demo</a> &#124; <a href="http://davidwalsh.name/jquery-comment-preview" >» View Tutorial</a></p>
<h4>17. <a href="http://www.devirtuoso.com/2009/08/styling-drop-down-boxes-with-jquery/" >Styling Drop Down Boxes With jQuery</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/style-select-box.png" class="alignleft size-full wp-image-284" width="204px" height="126px" /><br />
Since select boxes are hard to style using CSS, this tutorial shows you how to replace a select box with a textbox and an unordered list and then style them according to your choice.<br />
<a href="http://www.devirtuoso.com/Examples/Styling-Dropdown/" >» View Demo</a> &#124; <a href="http://www.devirtuoso.com/2009/08/styling-drop-down-boxes-with-jquery/" >» View Tutorial</a></p>
<h4 class="clear">18. <a href="http://webdeveloperplus.com/jquery/create-a-dynamic-scrolling-content-box-using-ajax/" >Scrolling Dynamic Content Box</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/dynamic-content-on-scroll.png" class="largepostimage" width="441px" height="254px" /><br />
Load content into a div on scroll using AJAX just like Google reader loads more items as you scroll down to view more items of a feed.<br />
<a href="http://demo.webdeveloperplus.com/dynamic-scrollbox/" >» View Demo</a> &#124; <a href="http://webdeveloperplus.com/jquery/create-a-dynamic-scrolling-content-box-using-ajax/" >» View Tutorial</a></p>
<h4>19. <a href="http://hungred.com/2009/08/04/useful-information/ways-debug-jquery-javascript-codes/" >Ways To Debug your jQuery or JavaScript Code</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/debug-javascript-jquery.png" class="largepostimage" width="520px" height="171px" /><br />
This article explains how you can easily debug javascript code using jquery console logging.<br />
<a href="http://hungred.com/2009/08/04/useful-information/ways-debug-jquery-javascript-codes/" >» View Tutorial</a></p>
<h4>20. <a href="http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/" >5 Ways To Make AJAX Calls with jQuery</a></h4>
<p>Nice tutorial from NetTuts+ about different ways of making AJAX calls using jQuery. It is even useful for those who are already familiar with jQuery as in depth coverage of various methods of making AJAX calls has been done.<br />
<a href="http://nettuts.s3.amazonaws.com/412_ajaxCalls/DEMO/index.htm" >» View Demo</a> &#124; <a href="http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/" >» View Tutorial</a><br />
<br class="clear" /></p>
<h3>Plugins</h3>
<h4>1. <a href="http://onehackoranother.com/projects/jquery/tipsy/" >Tipsy</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/tipsy.png" class="alignleft" width="198px" height="66px" /><br />
Display Facebook style tooltip plugins based on anchor tag&#8217;s title attribute<br />
<a href="http://onehackoranother.com/projects/jquery/tipsy/#examples" >» View Demo</a> &#124; <a href="http://onehackoranother.com/projects/jquery/tipsy/" >» Plugin Page</a></p>
<h4 class="clear">2. <a href="http://www.geckonewmedia.com/blog/2009/8/14/jquery-youtube-playlist-plugin---youtubeplaylist" >jQuery YouTube PlayList</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/youtube-playlist.jpg" class="largepostimage" width="600px" height="279px" /><br />
Convert a list of YouTube links into playlist which allows user to see videos right on the page itself.<br />
<a href="http://geckohub.com/jquery/youtubeplaylist/" >» View Demo</a> &#124; <a href="http://www.geckonewmedia.com/blog/2009/8/14/jquery-youtube-playlist-plugin---youtubeplaylist" >» Plugin Page</a></p>
<h4>3. <a href="http://www.electrictoolbox.com/jquery-superfish-menus-plugin/" >SuperFish Menus</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/suckerfish-menu-jquery.png" class="largepostimage" width="414px" height="150px" /><br />
Superfish Menus is an easy to use jquery plugin that converts unordered HTML lists into nice drop down menus.<br />
<a href="http://www.electrictoolbox.com/jquery-superfish-menus-plugin/" >» Plugin Page</a></p>
<h4>4. <a href="http://www.unwrongest.com/projects/elastic/" >Elastic</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/elastic.png" class="largepostimage" width="563px" height="235px" /><br />
Elastic is a lightweight jQuery plugin that makes textareas adjust their size according to the size of content.<br />
<a href="http://www.unwrongest.com/projects/elastic/#demo" >» View Demo</a> &#124; <a href="http://www.unwrongest.com/projects/elastic/" >» Plugin Page</a></p>
<h4>5. <a href="http://azoffdesign.com/plugins/js/overscroll" >OverScroll</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/overscroll.png" class="alignleft" width="116px" height="138px" /><br />
Implement iphone like click and drag to scroll behavior on your web page.<br />
<a href="http://azoffdesign.com/plugins/js/overscroll" >» Plugin Page</a></p>
<h4 class="clear">6. <a href="http://theodin.co.uk/blog/javascript/tweetable-jquery-plugin.html" >Tweetable</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/tweetable.png" class="largepostimage" width="389px" height="132px" /><br />
Display Twitter feed on your website easily and quickly with tweetable. Gives you option to convert twitter usernames and URLs into hyperlinks<br />
<a href="http://theodin.co.uk/tools/tutorials/jqueryTutorial/plugins/tweetable/" >» View Demo</a> &#124; <a href="http://theodin.co.uk/blog/javascript/tweetable-jquery-plugin.html" >» Plugin Page</a></p>
<h4>7. <a href="http://davidwalsh.name/jquery-link-nudge" >jQuery Link nudge</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/jquery-link-nudge.png" class="alignleft" width="254px" height="132px" /><br />
Make links notorious just like ones on David Walsh blog using this jQuery Link Nudge plugin.<br />
<a href="http://davidwalsh.name/dw-content/jquery-link-nudge-plugin.php" >» View Demo</a> &#124; <a href="http://davidwalsh.name/jquery-link-nudge" >» Plugin Page</a></p>
<h4 class="clear">8. <a href="http://haineault.com/media/jquery/ui-timepickr/page/" >TimePickr</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/timepicker.png" class="largepostimage" width="406px" height="124px" /><br />
If you need to get time as input from user, then use this plugin to provide a rich UI to input time.<br />
<a href="http://haineault.com/media/jquery/ui-timepickr/page/" >» Plugin Page</a></p>
<h4>9. <a href="http://theodin.co.uk/blog/development/truncatable-jquery-plugin.html" >Truncatable</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/truncatable.png" class="largepostimage" width="328px" height="92px" /><br />
Truncatable lets you hide blocks of text on page and show them if user requires.<br />
<a href="http://theodin.co.uk/tools/tutorials/jqueryTutorial/plugins/truncatable/" >» View Demo</a> &#124; <a href="http://theodin.co.uk/blog/development/truncatable-jquery-plugin.html" >» Plugin Page</a></p>
<h4>10. <a href="http://plugins.jquery.com/project/AddIncSearch" >Incremental Search For Select Boxes</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/incremental-search.png" class="largepostimage" width="429px" height="193px" /><br />
This plugin converts ordinary select boxes into combo boxes with incremental search, very useful if you have lots of options in the select box.<br />
<a href="http://oss.oetiker.ch/jquery/jquery.AddIncSearch.html" >» View Demo</a> &#124; <a href="http://plugins.jquery.com/project/AddIncSearch" >» Plugin Page</a></p>
<h4>11. <a href="http://css-tricks.com/anythingslider-jquery-plugin/" >Anything Slider</a></h4>
<p><img src="http://static.webdeveloperplus.com/uploads/2009/08/fresh-jquery-tutorials/Anything-Slider.jpg" class="largepostimage" width="600px" height="291px" /><br />
Anything Slider is a full featured slider that is pretty easy to customize and adapt into your website.<br />
<a href="http://css-tricks.com/examples/AnythingSlider/" >» View Demo</a> &#124; <a href="http://css-tricks.com/anythingslider-jquery-plugin/" >» Plugin Page</a></p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/jquery/21-brilliant-jquery-image-galleryslideshow-plugins/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/jquery-image-gallery-plugins-thumb.jpg" alt="21 Brilliant jQuery Image Gallery/Slideshow Plugins" width="40px" height="40px" />				21 Brilliant jQuery Image Gallery/Slideshow Plugins</a><!-- (7.3)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/15-jquery-tutorials-for-more-interactive-navigation/" rel="bookmark">
												15 jQuery Tutorials For More Interactive Navigation</a><!-- (7)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/15-excellent-jquery-plugins-to-enhance-html-forms/" rel="bookmark">
												15+ Excellent jQuery Plugins To Enhance HTML Forms</a><!-- (6.8)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/jquery/30-fresh-amazing-jquery-plugins-tutorials/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>21 Really Useful &amp; Handy PHP Code Snippets</title>
		<link>http://webdeveloperplus.com/php/21-really-useful-handy-php-code-snippets/</link>
		<comments>http://webdeveloperplus.com/php/21-really-useful-handy-php-code-snippets/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 15:50:00 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[code snippets]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=249</guid>
		<description><![CDATA[PHP is the most widely used web based programming language that powers millions of websites including some of the most popular ones like Facebook. Here are 21 really useful and handy PHP code snippets that every type of PHP developer will find useful.]]></description>
			<content:encoded><![CDATA[<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/08/php.jpg" alt="php" title="php" width="180" height="129" class="alignleft size-full wp-image-268" /> PHP is the most widely used web based programming language that powers millions of websites including some of the most popular ones like Facebook. Here are 21 really useful and handy PHP code snippets that every type of PHP developer will find useful.<br />
<br class="clear" /></p>
<h4>1. Human Readable Random String</h4>
<p>This code will create a human readable string that will look more close to dictionary words, useful for captchas.</p>
<pre name="code" class="php" >
/**************
*@length - length of random string (must be a multiple of 2)
**************/
function readable_random_string($length = 6){
    $conso=array(&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,
    &quot;m&quot;,&quot;n&quot;,&quot;p&quot;,&quot;r&quot;,&quot;s&quot;,&quot;t&quot;,&quot;v&quot;,&quot;w&quot;,&quot;x&quot;,&quot;y&quot;,&quot;z&quot;);
    $vocal=array(&quot;a&quot;,&quot;e&quot;,&quot;i&quot;,&quot;o&quot;,&quot;u&quot;);
    $password=&quot;&quot;;
    srand ((double)microtime()*1000000);
    $max = $length/2;
    for($i=1; $i&lt;=$max; $i++)
    {
    $password.=$conso[rand(0,19)];
    $password.=$vocal[rand(0,4)];
    }
    return $password;
}
</pre>
<h4>2. Generate a Random String</h4>
<p>If you don&#8217;t need human readable string, then use this function instead, which will create a random string you can use for user id&#8217;s etc.</p>
<pre name="code" class="php" >
/*************
*@l - length of random string
*/
function generate_rand($l){
  $c= &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&quot;;
  srand((double)microtime()*1000000);
  for($i=0; $i&lt;$l; $i++) {
	  $rand.= $c[rand()%strlen($c)];
  }
  return $rand;
 }
</pre>
<h4>3. Encode Email Address</h4>
<p>With this snippet, you can encode any email address into HTML entities so that spam bots do not find it.</p>
<pre name="code" class="php" >
function encode_email($email='info@domain.com', $linkText='Contact Us', $attrs ='class=&quot;emailencoder&quot;' )
{
	// remplazar aroba y puntos
	$email = str_replace('@', '&amp;#64;', $email);
	$email = str_replace('.', '&amp;#46;', $email);
	$email = str_split($email, 5);

	$linkText = str_replace('@', '&amp;#64;', $linkText);
	$linkText = str_replace('.', '&amp;#46;', $linkText);
	$linkText = str_split($linkText, 5);

	$part1 = '&lt;a href=&quot;ma';
	$part2 = 'ilto&amp;#58;';
	$part3 = '&quot; '. $attrs .' &gt;';
	$part4 = '&lt;/a&gt;';

	$encoded = '&lt;script type=&quot;text/javascript&quot;&gt;';
	$encoded .= &quot;document.write('$part1');&quot;;
	$encoded .= &quot;document.write('$part2');&quot;;
	foreach($email as $e)
	{
			$encoded .= &quot;document.write('$e');&quot;;
	}
	$encoded .= &quot;document.write('$part3');&quot;;
	foreach($linkText as $l)
	{
			$encoded .= &quot;document.write('$l');&quot;;
	}
	$encoded .= &quot;document.write('$part4');&quot;;
	$encoded .= '&lt;/script&gt;';

	return $encoded;
}
</pre>
<h4>4. Validate email Address</h4>
<p>E-mail validation is perhaps the most used validation in web forms, this code will validate email address and also optionally check the MX records of the domain provided in email address to make email validation more robust.</p>
<pre name="code" class="php" >
function is_valid_email($email, $test_mx = false)
{
	if(eregi(&quot;^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$&quot;, $email))
		if($test_mx)
		{
			list($username, $domain) = split(&quot;@&quot;, $email);
			return getmxrr($domain, $mxrecords);
		}
		else
			return true;
	else
		return false;
}
</pre>
<h4>5. List Directory Contents</h4>
<pre name="code" class="php" >
function list_files($dir)
{
	if(is_dir($dir))
  	{
  		if($handle = opendir($dir))
  		{
  			while(($file = readdir($handle)) !== false)
  			{
  				if($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot; &amp;&amp; $file != &quot;Thumbs.db&quot;)
  				{
  					echo '&lt;a target=&quot;_blank&quot; href=&quot;'.$dir.$file.'&quot;&gt;'.$file.'&lt;/a&gt;&lt;br&gt;'.&quot;\n&quot;;
  				}
  			}
  			closedir($handle);
  		}
	}
}
</pre>
<h4>6. Destroy Directory</h4>
<p>Delete a directory including its contents.</p>
<pre name="code" class="php" >
/*****
*@dir - Directory to destroy
*@virtual[optional]- whether a virtual directory
*/
function destroyDir($dir, $virtual = false)
{
	$ds = DIRECTORY_SEPARATOR;
	$dir = $virtual ? realpath($dir) : $dir;
	$dir = substr($dir, -1) == $ds ? substr($dir, 0, -1) : $dir;
	if (is_dir($dir) &amp;&amp; $handle = opendir($dir))
	{
		while ($file = readdir($handle))
		{
			if ($file == '.' || $file == '..')
			{
				continue;
			}
			elseif (is_dir($dir.$ds.$file))
			{
				destroyDir($dir.$ds.$file);
			}
			else
			{
				unlink($dir.$ds.$file);
			}
		}
		closedir($handle);
		rmdir($dir);
		return true;
	}
	else
	{
		return false;
	}
}
</pre>
<h4>7. Parse JSON Data</h4>
<p>With most of the popular web services like Twitter providing their data through APIs, it is always helpful to know how to parse API data which is sent in various formats including JSON, XML etc. </p>
<pre name="code" class="php" >
$json_string='{&quot;id&quot;:1,&quot;name&quot;:&quot;foo&quot;,&quot;email&quot;:&quot;foo@foobar.com&quot;,&quot;interest&quot;:[&quot;wordpress&quot;,&quot;php&quot;]} ';
$obj=json_decode($json_string);
echo $obj-&gt;name; //prints foo
echo $obj-&gt;interest[1]; //prints php
</pre>
<h4>8. Parse XML Data</h4>
<pre name="code" class="php" >
//xml string
$xml_string=&quot;&lt;?xml version='1.0'?&gt;
&lt;users&gt;
   &lt;user id='398'&gt;
      &lt;name&gt;Foo&lt;/name&gt;
      &lt;email&gt;foo@bar.com&lt;/name&gt;
   &lt;/user&gt;
   &lt;user id='867'&gt;
      &lt;name&gt;Foobar&lt;/name&gt;
      &lt;email&gt;foobar@foo.com&lt;/name&gt;
   &lt;/user&gt;
&lt;/users&gt;&quot;;

//load the xml string using simplexml
$xml = simplexml_load_string($xml_string);

//loop through the each node of user
foreach ($xml-&gt;user as $user)
{
   //access attribute
   echo $user['id'], '  ';
   //subnodes are accessed by -&gt; operator
   echo $user-&gt;name, '  ';
   echo $user-&gt;email, '&lt;br /&gt;';
}
</pre>
<h4>9. Create Post Slugs</h4>
<p>Create user friendly post slugs from title string to use within URLs.</p>
<pre name="code" class="php" >
function create_slug($string){
	$slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string);
	return $slug;
}
</pre>
<h4>10. Get Real IP Address of Client</h4>
<p>This function will fetch the real IP address of the user even if he is behind a proxy server.</p>
<pre name="code" class="php" >
function getRealIpAddr()
{
	if (!empty($_SERVER['HTTP_CLIENT_IP']))
	{
		$ip=$_SERVER['HTTP_CLIENT_IP'];
	}
	elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
	//to check ip is pass from proxy
	{
		$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
	}
	else
	{
		$ip=$_SERVER['REMOTE_ADDR'];
	}
	return $ip;
}
</pre>
<h4>11. Force file Download</h4>
<p>Provide files to the user by forcing them to download.</p>
<pre name="code" class="php" >
/********************
*@file - path to file
*/
function force_download($file)
{
    if ((isset($file))&amp;&amp;(file_exists($file))) {
       header(&quot;Content-length: &quot;.filesize($file));
       header('Content-Type: application/octet-stream');
       header('Content-Disposition: attachment; filename=&quot;' . $file . '&quot;');
       readfile(&quot;$file&quot;);
    } else {
       echo &quot;No file selected&quot;;
    }
}
</pre>
<h4>12. Creating a Tag Cloud</h4>
<pre name="code" class="php" >
function getCloud( $data = array(), $minFontSize = 12, $maxFontSize = 30 )
{
	$minimumCount = min($data);
	$maximumCount = max($data);
	$spread       = $maximumCount - $minimumCount;
	$cloudHTML    = '';
	$cloudTags    = array();

	$spread == 0 &amp;&amp; $spread = 1;

	foreach( $data as $tag =&gt; $count )
	{
		$size = $minFontSize + ( $count - $minimumCount )
			* ( $maxFontSize - $minFontSize ) / $spread;
		$cloudTags[] = '&lt;a style=&quot;font-size: ' . floor( $size ) . 'px'
		. '&quot; class=&quot;tag_cloud&quot; href=&quot;#&quot; title=&quot;\'' . $tag  .
		'\' returned a count of ' . $count . '&quot;&gt;'
		. htmlspecialchars( stripslashes( $tag ) ) . '&lt;/a&gt;';
	}

	return join( &quot;\n&quot;, $cloudTags ) . &quot;\n&quot;;
}
/**************************
****   Sample usage    ***/
$arr = Array('Actionscript' =&gt; 35, 'Adobe' =&gt; 22, 'Array' =&gt; 44, 'Background' =&gt; 43,
	'Blur' =&gt; 18, 'Canvas' =&gt; 33, 'Class' =&gt; 15, 'Color Palette' =&gt; 11, 'Crop' =&gt; 42,
	'Delimiter' =&gt; 13, 'Depth' =&gt; 34, 'Design' =&gt; 8, 'Encode' =&gt; 12, 'Encryption' =&gt; 30,
	'Extract' =&gt; 28, 'Filters' =&gt; 42);
echo getCloud($arr, 12, 36);
</pre>
<h4>13. Find Similarity Between Two Strings</h4>
<p>PHP includes a function <code>similar_text</code> very rarely used but quite useful that compares two strings and returns the percentage of similarity between two.</p>
<pre name="code" class="php" >
similar_text($string1, $string2, $percent);
//$percent will have the percentage of similarity
</pre>
<h4>14. Use Gravatars in Your Application</h4>
<p>With ever increasing popularity of WordPress, Gravatars have become quite popular. It is very easy to integrate them into your application as they provide a very easy to use API.</p>
<pre name="code" class="php" >
/******************
*@email - Email address to show gravatar for
*@size - size of gravatar
*@default - URL of default gravatar to use
*@rating - rating of Gravatar(G, PG, R, X)
*/
function show_gravatar($email, $size, $default, $rating)
{
	echo '&lt;img src=&quot;http://www.gravatar.com/avatar.php?gravatar_id='.md5($email).
		'&amp;default='.$default.'&amp;size='.$size.'&amp;rating='.$rating.'&quot; width=&quot;'.$size.'px&quot;
		height=&quot;'.$size.'px&quot; /&gt;';
}
</pre>
<h4>15. Truncate Text at Word Break</h4>
<p>This function will truncate strings only at word breaks which can be used to show a teaser for complete article without breaking words.</p>
<pre name="code" class="php" >
// Original PHP code by Chirp Internet: www.chirp.com.au
// Please acknowledge use of this code by including this header.
function myTruncate($string, $limit, $break=&quot;.&quot;, $pad=&quot;...&quot;) {
	// return with no change if string is shorter than $limit
	if(strlen($string) &lt;= $limit)
		return $string; 

	// is $break present between $limit and the end of the string?
	if(false !== ($breakpoint = strpos($string, $break, $limit))) {
		if($breakpoint &lt; strlen($string) - 1) {
			$string = substr($string, 0, $breakpoint) . $pad;
		}
	}
	return $string;
}
/***** Example ****/
$short_string=myTruncate($long_string, 100, ' ');
</pre>
<h4>16. Zip Files on the Fly</h4>
<pre name="code" class="php" >
/* creates a compressed zip file */
function create_zip($files = array(),$destination = '',$overwrite = false) {
	//if the zip file already exists and overwrite is false, return false
	if(file_exists($destination) &amp;&amp; !$overwrite) { return false; }
	//vars
	$valid_files = array();
	//if files were passed in...
	if(is_array($files)) {
		//cycle through each file
		foreach($files as $file) {
			//make sure the file exists
			if(file_exists($file)) {
				$valid_files[] = $file;
			}
		}
	}
	//if we have good files...
	if(count($valid_files)) {
		//create the archive
		$zip = new ZipArchive();
		if($zip-&gt;open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {
			return false;
		}
		//add the files
		foreach($valid_files as $file) {
			$zip-&gt;addFile($file,$file);
		}
		//debug
		//echo 'The zip archive contains ',$zip-&gt;numFiles,' files with a status of ',$zip-&gt;status;

		//close the zip -- done!
		$zip-&gt;close();

		//check to make sure the file exists
		return file_exists($destination);
	}
	else
	{
		return false;
	}
}
/***** Example Usage ***/
$files=array('file1.jpg', 'file2.jpg', 'file3.gif');
create_zip($files, 'myzipfile.zip', true);
</pre>
<p>Source: <a href="http://davidwalsh.name/create-zip-php" target="_blank" >David Walsh</a></p>
<h4>17.  Unzip Zip File</h4>
<pre name="code" class="php" >
/**********************
*@file - path to zip file
*@destination - destination directory for unzipped files
*/
function unzip_file($file, $destination){
	// create object
	$zip = new ZipArchive() ;
	// open archive
	if ($zip-&gt;open($file) !== TRUE) {
		die (’Could not open archive’);
	}
	// extract contents to destination directory
	$zip-&gt;extractTo($destination);
	// close archive
	$zip-&gt;close();
	echo 'Archive extracted to directory';
}
</pre>
<h4>18. Prepend http to a URL</h4>
<p>Some times you need to accept some url as input but users seldom add http:// to it, this code will add http:// to the URL if it&#8217;s not there.</p>
<pre name="code" class="php" >
if (!preg_match(&quot;/^(http|ftp):/&quot;, $_POST['url'])) {
   $_POST['url'] = 'http://'.$_POST['url'];
}
</pre>
<h4>19. Convert URLs within String into hyperlinks</h4>
<p>This function converts URLs and e-mail addresses within a string into clickable hyperlinks.</p>
<pre name="code" class="php" >
function makeClickableLinks($text) {
 $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&amp;//=]+)',
 '&lt;a href=&quot;\1&quot;&gt;\1&lt;/a&gt;', $text);
 $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&amp;//=]+)',
 '\1&lt;a href=&quot;http://\2&quot;&gt;\2&lt;/a&gt;', $text);
 $text = eregi_replace('([_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})',
 '&lt;a href=&quot;mailto:\1&quot;&gt;\1&lt;/a&gt;', $text);

return $text;
}
</pre>
<h4>20. Resize Images on the fly</h4>
<p>Creating thumbnails of the images is required many a times, this code will be useful to know about the logic of thumbnail generation.</p>
<pre name="code" class="php" >
/**********************
*@filename - path to the image
*@tmpname - temporary path to thumbnail
*@xmax - max width
*@ymax - max height
*/
function resize_image($filename, $tmpname, $xmax, $ymax)
{
	$ext = explode(&quot;.&quot;, $filename);
	$ext = $ext[count($ext)-1];

	if($ext == &quot;jpg&quot; || $ext == &quot;jpeg&quot;)
		$im = imagecreatefromjpeg($tmpname);
	elseif($ext == &quot;png&quot;)
		$im = imagecreatefrompng($tmpname);
	elseif($ext == &quot;gif&quot;)
		$im = imagecreatefromgif($tmpname);

	$x = imagesx($im);
	$y = imagesy($im);

	if($x &lt;= $xmax &amp;&amp; $y &lt;= $ymax)
		return $im;

	if($x &gt;= $y) {
		$newx = $xmax;
		$newy = $newx * $y / $x;
	}
	else {
		$newy = $ymax;
		$newx = $x / $y * $newy;
	}

	$im2 = imagecreatetruecolor($newx, $newy);
	imagecopyresized($im2, $im, 0, 0, 0, 0, floor($newx), floor($newy), $x, $y);
	return $im2;
}
</pre>
<h4>21. Detect AJAX Request</h4>
<p>Most of the JavaScript frameworks like jQuery, mootools send and additional <code>HTTP_X_REQUESTED_WITH</code> header when they make an AJAX request, so that you can detect AJAX request on server side.(<a href="http://davidwalsh.name/detect-ajax" target="_blank" >source</a>)</p>
<pre name="code" class="php" >
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
	//If AJAX Request Then
}else{
//something else
}
</pre>
<p>If you would like to recommend a snippet to include in this list to make this list a more useful resource, tell us about it in comments below.</p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/php/25-new-useful-php-techniques-tutorials/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/php-useful-techniques.png" alt="25 New &#038; Useful PHP Techniques &#038; Tutorials" width="40px" height="40px" />				25 New &#038; Useful PHP Techniques &#038; Tutorials</a><!-- (6.7)--></li>
		<li><a href="http://webdeveloperplus.com/php/ajax-user-poll-using-jquery-and-php/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/user-poll-thumb.png" alt="AJAX User Poll Using jQuery and PHP" width="40px" height="40px" />				AJAX User Poll Using jQuery and PHP</a><!-- (6.6)--></li>
		<li><a href="http://webdeveloperplus.com/php/integrate-customized-recaptcha-in-your-php-application/" rel="bookmark">
												Integrate Customized reCaptcha in your PHP Application</a><!-- (5.5)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/php/21-really-useful-handy-php-code-snippets/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>21 Amazing CSS Techniques You Should Know</title>
		<link>http://webdeveloperplus.com/css/21-amazing-css-techniques-you-should-know/</link>
		<comments>http://webdeveloperplus.com/css/21-amazing-css-techniques-you-should-know/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 08:16:51 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[animated menus]]></category>
		<category><![CDATA[typeface]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=159</guid>
		<description><![CDATA[Cascading Style Sheets(CSS) is one of the building blocks of modern web design without which websites would have been ugly just like they were a decade ago. With time, the quality of CSS tutorials out there on the web has increased considerably. Here are 21 amazing CSS Techniques that you might not have thought could [...]]]></description>
			<content:encoded><![CDATA[<p>Cascading Style Sheets(CSS) is one of the building blocks of modern web design without which websites would have been ugly just like they were a decade ago. With time, the quality of CSS tutorials out there on the web has increased considerably. Here are 21 amazing CSS Techniques that you might not have thought could be done by CSS.</p>
<h4>1. <a href="http://www.cssplay.co.uk/menu/slide_show" target="_blank">Cross Browser CSS SlideShow</a></h4>
<p><img class="largepostimage" title="Cross Browser CSS Slideshow" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/cross-browser-slide-show.jpg" alt="" width="589" height="390" /></p>
<p>Amazing demonstration of how to create a cross browser image gallery  using just CSS.</p>
<h4>2. <a href="http://www.frankmanno.com/ideas/css-imagemap/" target="_blank">CSS Based Image Maps</a></h4>
<p><img class="largepostimage" title="CSS Based Image Map" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/CSS-only-image-map.jpg" alt="" width="341" height="261" /></p>
<p>This tutorial demonstrates a crazy way to create an image map using just CSS.</p>
<h4>3. <a href="http://www.cssplay.co.uk/menu/lightbox-hover.html" target="_blank">No JavaScript LightBox Using CSS</a></h4>
<p><img class="largepostimage" title="No JavaScript LightBox using CSS" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/Css-Only-LightBox.jpg" alt="" width="574" height="293" /></p>
<p>Create a lighbox using just CSS with no JavaScript required.</p>
<h4>4. <a href="http://www.ampsoft.net/webdesign-l/image-button.html" target="_blank">Image Replacement for Buttons</a></h4>
<p><img class="largepostimage" title="Replace Submit Button With Image" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/image-replacement-submit-button.jpg" alt="" width="439" height="99" /></p>
<p>Replace the submit buttons with images using CSS, degrades back to submit button if CSS is disabled.</p>
<h4>5. <a href="http://www.pmob.co.uk/pob/animated.htm" target="_blank">Animated Navigation Menu using CSS</a></h4>
<p><img class="largepostimage" title="CSS Animated navigation menu" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/animated-navigation-menu.jpg" alt="" width="318" height="71" /></p>
<p>Amazing tutorial on how to create an animated navigation menu using just CSS.</p>
<h4>6. <a href="http://www.zabdesign.de/pro/public/sitemap/sitemap-styled.html" target="_blank">Tree Like Navigation Using CSS</a></h4>
<p><img class="largepostimage" title="Tree like navigation using CSS" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/tree-like-navigation.png" alt="" width="334" height="247" /></p>
<p>Create a tree like navigation from nested lists of links. Very useful for creating sitemaps.</p>
<h4>7. <a href="http://www.webdesignerwall.com/tutorials/css-gradient-text-effect/" target="_blank">CSS Gradient Text Effect</a></h4>
<p><img class="largepostimage" title="CSS Gradient Text Effect" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/css-gradient-effect.jpg" alt="" width="477" height="147" /></p>
<p>Create eye-catching titles with nice gradient effect using just CSS.</p>
<h4>8. <a href="http://www.webdesignerwall.com/tutorials/css-menu-list-design/" target="_blank">CSS Menu List Design</a></h4>
<p><img class="largepostimage" title="CSS Menu List" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/CSS-Menu-List.png" alt="" width="549" height="186" /></p>
<p>Very easy to understand tutorial on how to create a menu list using either CSS border-style or background-image property.</p>
<h4>9. <a href="http://www.alistapart.com/articles/negativemargins/" target="_blank">Creating Liquid Layouts With Negative Margins</a></h4>
<p><img class="largepostimage" title="Liquid Web Layout using CSS" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/liquid-web-layout-css.jpg" alt="" width="590" height="210" /></p>
<p>Amazing way to create a liquid layout using negative margins</p>
<h4>10. <a href="http://fortysevenmedia.com/blog/archives/making_your_footer_stay_put_with_css/" target="_blank">Making Your Footer Stay Put With CSS</a></h4>
<p>This might occur to you some time when a content page has not enough content to fill the page, so footer also moves up due to this. This tutorial shows you how to deal with this and make footer stay at bottom even when content is not enough.</p>
<h4>11. <a href="http://veerle.duoh.com/blog/comments/simple_scalable_css_based_breadcrumbs/" target="_blank">Simple, Scalable CSS Based BreadCrumbs</a></h4>
<p><img class="largepostimage" title="Simple &amp; Scalable Breadcrumb navigation" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/scalable-breadcrumb-navigation.jpg" alt="" width="356" height="45" /></p>
<p>Create a nice scalable breadcrumb navigation</p>
<h4>12. <a href="http://www.pearsonified.com/2006/09/snazzy_pullquotes_for_your_blo.php" target="_blank">Snazzy Pullquotes for Your Blog</a></h4>
<p><img class="largepostimage" title="Snazzy Pullquotes" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/pullquotes-css.png" alt="" width="517" height="163" /></p>
<p>Make the blockquotes in your content or blog posts standout from rest of content. Very useful to highlight major points in long content pages.</p>
<h4>13. <a href="http://www.thewojogroup.com/2008/12/css-stacked-bar-graphs/" target="_blank">CSS Stacked Bar Graphs</a></h4>
<p><img class="largepostimage" title="CSS Stacked Bar Graph" src="http://webdeveloperplus.com/wp-content/uploads/2009/07/stacked-bar-graph.jpg" alt="CSS Stacked Bar Graph" width="444" height="305" /></p>
<p>Display graphs on your website using just CSS without any JavaScript or other heavy plugins.</p>
<h4>14. <a href="http://www.smileycat.com/miaow/archives/000230.php" target="_blank">How To Create a Block Hover Effect For List of Links</a></h4>
<p><img class="largepostimage" title="CSS Block Hover List" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/Block-Hover-CSS-List.png" alt="" width="414" height="286" /></p>
<h4>15. <a href="http://www.alistapart.com/articles/multicolumnlists" target="_blank">Multi-Column Lists</a></h4>
<p><img class="largepostimage" title="Multi Column Lists Using CSS" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/Multi-Column-Lists.png" alt="" width="458" height="133" /></p>
<p>This article shows all possible ways you can use to stack up an unordered list into multiple columns.</p>
<h4>16. <a href="http://css-tricks.com/date-display-with-sprites/" target="_blank">Date Display Technique with Sprites</a></h4>
<p><img class="largepostimage" title="Display Date using CSS Sprites" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/Display-Date-Using-Sprites.png" alt="" width="417" height="165" /></p>
<p>If you have ever visited <a href="http://www.learningjquery.com" target="_blank">Learning jQuery</a> then you might have noticed the awesome date display next to each blog post. This tutorial will show you how to achieve that using CSS Sprites.</p>
<h4>17. <a href="http://css-tricks.com/date-badges-and-comment-bubbles-for-your-blog/" target="_blank">Date Badges and Comment Bubbles for your Blog</a></h4>
<p><img class="largepostimage" title="Date &amp; Comment Badge For Blogs" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/date-comment-badges.jpg" alt="" width="269" height="172" /></p>
<p>Display date and comments on your blog posts in a nice way that takes less space.</p>
<h4>18. <a href="http://www.devirtuoso.com/2009/07/how-to-build-a-css-image-viewer-the-clever-way/" target="_blank">How To Build a CSS Image Viewer The Clever Way</a></h4>
<p><img class="largepostimage" title="CSS Image Viewer" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/CSS-Image-viewer.jpg" alt="" width="591" height="350" /></p>
<p>Create a nice image viewer using CSS that will work even if user has disabled flash and JavaScript in the browser.</p>
<h4>19. <a href="http://www.devirtuoso.com/2009/07/creating-a-css-image-preloader/" target="_blank">Creating a CSS Image Preloader</a></h4>
<p>Use the CSS background-image property to preload images without any javascript required.</p>
<h4>20. <a href="http://css-tricks.com/css-trick-fade-out-the-bottom-of-pages-with-a-fixed-position-image/" target="_blank">Fade Out The Bottom of Pages</a></h4>
<p><img class="largepostimage" title="Fade out Content into bottom" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/Fade-Out-Bottom.jpg" alt="" width="596" height="282" /></p>
<p>This tutorial shows you how to make page content fade away into the bottom of the page just like the <a href="http://fortuito.us/" target="_blank">fortuito.us blog</a>.</p>
<h4>21.  <a href="http://www.cssnewbie.com/12-creative-and-cool-uses-for-the-css-border-property/" target="_blank">Creative and Cool Uses of the CSS Border Property</a></h4>
<p><img class="largepostimage" title="Creative and Cool Uses of CSS Border Property" src="http://static.webdeveloperplus.com/uploads/2009/07/css-amazing-techniques/CSS-Border-Property.jpg" alt="" width="537" height="189" /></p>
<p>This article shows you how the CSS Border property can be used to achieve some cool effects. You&#8217;ll be surprised to know how cool the CSS Border property is.</p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/css/15-ways-to-improve-css-techniques-using-jquery/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/css-jquery-techniques-thumb.png" alt="15 Ways to Improve CSS Techniques Using jQuery" width="40px" height="40px" />				15 Ways to Improve CSS Techniques Using jQuery</a><!-- (6.9)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/30-fresh-amazing-jquery-plugins-tutorials/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/fresh-jquery-plugins-thumb.jpg" alt="30+ Fresh &#038; Amazing jQuery Plugins &#038; Tutorials" width="40px" height="40px" />				30+ Fresh &#038; Amazing jQuery Plugins &#038; Tutorials</a><!-- (5.4)--></li>
		<li><a href="http://webdeveloperplus.com/flash/25-amazing-free-flash-based-image-galleries/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/flash-gallery-scripts-thumb.jpg" alt="25 Amazing &#038; Free Flash Based Image Galleries" width="40px" height="40px" />				25 Amazing &#038; Free Flash Based Image Galleries</a><!-- (5.2)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/css/21-amazing-css-techniques-you-should-know/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>Create Featured Content Slider Using jQuery UI</title>
		<link>http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/</link>
		<comments>http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 05:40:03 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[content slider]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/?p=87</guid>
		<description><![CDATA[Using an auto-playing content slider is the one of techniques to show your featured content. It saves you space and makes for a better user experience, and if you add a pinch of eye candy to it, then there’s no looking back. Here's how to create a nice looking featured content slider for your blog or website using jQuery and jQuery UI libraries. ]]></description>
			<content:encoded><![CDATA[<p><img src="http://webdeveloperplus.com/wp-content/uploads/2009/06/FeaturedContentSliderjQuery.jpg" alt="Featured Content Slider using jQuery UI" title="Featured Content Slider using jQuery UI" width="592" height="328" class="alignnone size-full wp-image-86" /></p>
<p>Showing off the best content of your website or blog in a nice intuitive way will surely catch more eyeballs. Using an auto-playing content slider is the one of techniques to show your featured content. It saves you space and makes for a better user experience, and if you add a pinch of eye candy to it, then there’s no looking back.</p>
<p>There are a few tutorials on creating featured content sliders like the one from <a href="http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/" target="_blank">CSS-Tricks</a>, but it uses jQuery Coda Slider plugin. Today I’m going to show you how to create a featured content slider for your website using the <a href="http://www.jqueryui.com/" target="_blank">jQuery UI</a> library.</p>
<p>Let’s start with it..</p>
<h3>Add JavaScript Files</h3>
<p>First of all, grab the jQuery and jQuery UI libraries, if you haven’t already and include them in your page header. For this tutorial, you’ll need jQuery UI version 1.5.3. I usually use Google AJAX libraries to load jQuery and jQuery UI files as it acts as a <a href="http://en.wikipedia.org/wiki/Content_delivery_network" target="_blank" ><abbr title="Content Distribution Network">CDN</abbr></a> for your JavaScript files.<br />
<code>
<pre class="html" name="code">&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot; &gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js&quot; &gt;&lt;/script&gt;
</pre>
<p></code></p>
<h3>The Featured Content Structure</h3>
<p>Now create a div with its contents as the tabs structured as a list and content corresponding to each tab within a separate div.</p>
<pre class="html" name="code" >
&lt;div id=&quot;featured&quot; &gt;
	&lt;ul class=&quot;ui-tabs-nav&quot;&gt;
	    &lt;li class=&quot;ui-tabs-nav-item ui-tabs-selected&quot; id=&quot;nav-fragment-1&quot;&gt;&lt;a href=&quot;#fragment-1&quot;&gt;&lt;img src=&quot;images/image1-small.jpg&quot; alt=&quot;&quot; /&gt;&lt;span&gt;15+ Excellent High Speed Photographs&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	    &lt;li class=&quot;ui-tabs-nav-item&quot; id=&quot;nav-fragment-2&quot;&gt;&lt;a href=&quot;#fragment-2&quot;&gt;&lt;img src=&quot;images/image2-small.jpg&quot; alt=&quot;&quot; /&gt;&lt;span&gt;20 Beautiful Long Exposure Photographs&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	    &lt;li class=&quot;ui-tabs-nav-item&quot; id=&quot;nav-fragment-3&quot;&gt;&lt;a href=&quot;#fragment-3&quot;&gt;&lt;img src=&quot;images/image3-small.jpg&quot; alt=&quot;&quot; /&gt;&lt;span&gt;35 Amazing Logo Designs&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	    &lt;li class=&quot;ui-tabs-nav-item&quot; id=&quot;nav-fragment-4&quot;&gt;&lt;a href=&quot;#fragment-4&quot;&gt;&lt;img src=&quot;images/image4-small.jpg&quot; alt=&quot;&quot; /&gt;&lt;span&gt;Create a Vintage Photograph in Photoshop&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;!-- First Content --&gt;
	&lt;div id=&quot;fragment-1&quot; class=&quot;ui-tabs-panel&quot; style=&quot;&quot;&gt;
		&lt;img src=&quot;images/image1.jpg&quot; alt=&quot;&quot; /&gt;
		&lt;div class=&quot;info&quot; &gt;
		&lt;h2&gt;&lt;a href=&quot;#&quot; &gt;15+ Excellent High Speed Photographs&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tincidunt condimentum lacus. Pellentesque ut diam....&lt;a href=&quot;#&quot; &gt;read more&lt;/a&gt;&lt;/p&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;!-- Second Content --&gt;
	&lt;div id=&quot;fragment-2&quot; class=&quot;ui-tabs-panel ui-tabs-hide&quot; style=&quot;&quot;&gt;
		&lt;img src=&quot;images/image2.jpg&quot; alt=&quot;&quot; /&gt;
		&lt;div class=&quot;info&quot; &gt;
		&lt;h2&gt;&lt;a href=&quot;#&quot; &gt;20 Beautiful Long Exposure Photographs&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;Vestibulum leo quam, accumsan nec porttitor a, euismod ac tortor. Sed ipsum lorem, sagittis non egestas id, suscipit....&lt;a href=&quot;#&quot; &gt;read more&lt;/a&gt;&lt;/p&gt;
		&lt;/div&gt;
	&lt;/div&gt;
    &lt;!-- Third Content --&gt;
    &lt;div id=&quot;fragment-3&quot; class=&quot;ui-tabs-panel ui-tabs-hide&quot; style=&quot;&quot;&gt;
		&lt;img src=&quot;images/image3.jpg&quot; alt=&quot;&quot; /&gt;
		&lt;div class=&quot;info&quot; &gt;
		&lt;h2&gt;&lt;a href=&quot;#&quot; &gt;35 Amazing Logo Designs&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;liquam erat volutpat. Proin id volutpat nisi. Nulla facilisi. Curabitur facilisis sollicitudin ornare....&lt;a href=&quot;#&quot; &gt;read more&lt;/a&gt;&lt;/p&gt;
	    &lt;/div&gt;
	&lt;/div&gt;
    &lt;!-- Fourth Content --&gt;
    &lt;div id=&quot;fragment-4&quot; class=&quot;ui-tabs-panel ui-tabs-hide&quot; style=&quot;&quot;&gt;
		&lt;img src=&quot;images/image4.jpg&quot; alt=&quot;&quot; /&gt;
		&lt;div class=&quot;info&quot; &gt;
		&lt;h2&gt;&lt;a href=&quot;#&quot; &gt;Create a Vintage Photograph in Photoshop&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;Quisque sed orci ut lacus viverra interdum ornare sed est. Donec porta, erat eu pretium luctus, leo augue sodales....&lt;a href=&quot;#&quot; &gt;read more&lt;/a&gt;&lt;/p&gt;
	    &lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>The class names <strong><em>ui-tabs-selected</em></strong> and <strong><em>ui-tabs-hide</em></strong> should not be changed, you can change other class names to your own.</p>
<h3>The CSS Styles</h3>
<p>Now for the CSS part, I fixed the width and height of the outer container div with id <em>#featured</em> and added a right padding of 250px to make space for the absolutely positioned navigation tabs for our featured content slider. Also, i set its position attribute to relative so that i can absolutely position elements inside #featured div relative to it.</p>
<pre name="code" class="css" >
#featured{
	width:400px;
	padding-right:250px;
	position:relative;
	height:250px;
	background:#fff;
	border:5px solid #ccc;
}
</pre>
<p>The navigation tabs are absolutely positioned to the right with following styles:</p>
<pre name="code" class="css" >
#featured ul.ui-tabs-nav{
	position:absolute;
	top:0; left:400px;
	list-style:none;
	padding:0; margin:0;
	width:250px;
}
#featured ul.ui-tabs-nav li{
	padding:1px 0; padding-left:13px;
	font-size:12px;
	color:#666;
}
#featured ul.ui-tabs-nav li span{
	font-size:11px; font-family:Verdana;
	line-height:18px;
}
</pre>
<p>The content panels are given following styles so as to fit them inside featured div container. The <em>ui-tabs-hide</em> class is essential to working of this script as it decides which content panels are hidden and which is displayed.</p>
<pre name="code" class="css" >
#featured .ui-tabs-panel{
	width:400px; height:250px;
	background:#999; position:relative;
        overflow:hidden;
}
#featured .ui-tabs-hide{
	display:none;
}
</pre>
<p>And the selected tab is given a background image with a left arrow. Here are the styles for selected tab.</p>
<pre name="code" class="css" >
#featured li.ui-tabs-nav-item a{/*On Hover Style*/
	display:block;
	height:60px;
	color:#333;  background:#fff;
	line-height:20px;
	outline:none;
}
#featured li.ui-tabs-nav-item a:hover{
	background:#f2f2f2;
}
#featured li.ui-tabs-selected{ /*Selected tab style*/
	background:url('images/selected-item.gif') top left no-repeat;
}
#featured ul.ui-tabs-nav li.ui-tabs-selected a{
	background:#ccc;
}
</pre>
<p>Since i used small thumbnail images in the navigation tabs, i applied following styles to them.</p>
<pre name="code" class="css" >
#featured ul.ui-tabs-nav li img{
	float:left; margin:2px 5px;
	background:#fff;
	padding:2px;
	border:1px solid #eee;
}
</pre>
<p>Also, in the content panel which is displayed, it has one image of size 400px x 250px and some relavent title and description inside the div with class info. To display .info div over the image i absolutely positioned it over the image with a transparent background to add some eye-candy.</p>
<pre name="code" class="css" >
#featured .ui-tabs-panel .info{
	position:absolute;
	top:180px; left:0;
	height:70px; width: 400px;
	background: url('images/transparent-bg.png');
}
#featured .info h2{
	font-size:18px; font-family:Georgia, serif;
	color:#fff; padding:5px; margin:0;
	overflow:hidden;
}
#featured .info p{
	margin:0 5px;
	font-family:Verdana; font-size:11px;
	line-height:15px; color:#f0f0f0;
}
#featured .info a{
	text-decoration:none;
	color:#fff;
}
#featured .info a:hover{
	text-decoration:underline;
}
</pre>
<p><em>Note:</em> All the required styles are within style.css file.</p>
<h3>The JavaScript Code</h3>
<p>Finally the JavaScript code, that&#8217;ll make our featured content slider work. I&#8217;m using rotating tabs feature of jQuery UI library that makes the content panels rotate automatically after given time interval.</p>
<pre name="code" class="js" >
	$(document).ready(function(){
		$(&quot;#featured &gt; ul&quot;).tabs({fx:{opacity: &quot;toggle&quot;}}).tabs(&quot;rotate&quot;, 5000, true);
	});
</pre>
<p>And there you are with a nice looking featured content slider. </p>
<p><a href="http://demo.webdeveloperplus.com/featured-content-slider/" title="View Working Demo"><strong>View Working Demo</strong></a> or <a href="http://demo.webdeveloperplus.com/source-code/featured-content-slider.zip" title="Download Source code"><strong>Download the source code</strong></a> and try it.</p>
<p><strong>Update(Aug 20, 2008)</strong></p>
<h3>How To Use With Latest version of jQuery UI</h3>
<p>If you are using the latest jQuery UI version aleady on your website, then do not use the earlier version I am using above, simply change the code as below(Thanks <a href="http://blog.denysri.com/">Deni Sri Supriyono</a> for commenting about this):</p>
<p>Just change this line from the JavaScript code:</p>
<pre name="code" class="js">
$(&quot;#featured &gt; ul&quot;).tabs({fx:{opacity: &quot;toggle&quot;}}).tabs(&quot;rotate&quot;, 5000, true);
</pre>
<p>to:</p>
<pre name="code" class="js" >
$(&quot;#featured&quot;).tabs({fx:{opacity: &quot;toggle&quot;}}).tabs(&quot;rotate&quot;, 5000, true);
</pre>
<h3>Pausing Slideshow on Hover</h3>
<p>Here is a nice solution from <a href="http://choosedaily.com/" >Vernon</a>(in comments below) for those who were looking to enable pause on hover for the current slide. Use this piece of JavaScript code instead of above.</p>
<pre name="code" class="js" >
$(document).ready(function(){
$(&quot;#featured&quot;).tabs({fx:{opacity: &quot;toggle&quot;}}).tabs(&quot;rotate&quot;, 5000, true);
$(&quot;#featured&quot;).hover(
function() {
$(&quot;#featured&quot;).tabs(&quot;rotate&quot;,0,true);
},
function() {
$(&quot;#featured&quot;).tabs(&quot;rotate&quot;,5000,true);
}
);
});
</pre>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/jquery/create-flipping-content-tabs-using-jquery/" rel="bookmark">
												Create Flipping Content Tabs Using jQuery</a><!-- (13.4)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/creating-content-tabs-with-jquery/" rel="bookmark">
												Creating Content Tabs with jQuery</a><!-- (10.8)--></li>
		<li><a href="http://webdeveloperplus.com/jquery/create-a-dynamic-scrolling-content-box-using-ajax/" rel="bookmark">
												Create a Dynamic Scrolling Content Box Using AJAX</a><!-- (8.9)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/feed/</wfw:commentRss>
		<slash:comments>181</slash:comments>
		</item>
		<item>
		<title>How To Use Thumbnails Generated By WordPress In Your Theme</title>
		<link>http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/</link>
		<comments>http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 13:34:57 +0000</pubDate>
		<dc:creator>Satbir</dc:creator>
				<category><![CDATA[Popular]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[image thumbnails]]></category>
		<category><![CDATA[wordpress hacks]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/</guid>
		<description><![CDATA[Wordpress has inbuilt functionality of generating thumbnails of images attached to a post. In this post, i'll show you how to use them in your WordPress Theme without requiring any third party plugins or scripts and also without even using any custom fields.]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; border-top: 0px; border-right: 0px" border="0" alt="Thumbnail Image" align="left" src="http://webdeveloperplus.com/wp-content/uploads/2009/06/thumbnail-image.jpg" width="244" height="172" /> Many WordPress Themes display post excerpts on blog homepage with a little thumbnail image of one of the images used within a post, but most of the WordPress themes I have seen, use some kind of external image resizing script like <a href="http://webdeveloperplus.com/tag/phpthumb/">phpThumb</a> or tinyThumb or they use some custom field in the post to show thumbnail image.</p>
<p>But WordPress has inbuilt functionality of generating thumbnails of the images you add to your post. This functionality is enabled by default unless you have explicitly set it from Media Settings in WordPress Settings panel. </p>
<p><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="WordPress Thumbnails" src="http://webdeveloperplus.com/wp-content/uploads/2009/06/wordpress-thumbnails.jpg" width="600" height="314" /> </p>
<p>Today, I&#8217;m going to show you how to use thumbnails generated by WordPress in your theme without requiring any third party script, plugin or custom field.</p>
<p>1. First of all set the thumbnail size to what you want in the <em>Media Settings</em> of WordPress.</p>
<p>2. Now open up <em>index.php</em> of your WordPress theme and inside the WordPress loop, add the following lines of code to get the path of thumbnail image of the first image in the post.</p>
<pre name="code" class="php">&lt;?php
//Get images attached to the post
$args = array(
	'post_type' => 'attachment',
	'post_mime_type' => 'image',
	'numberposts' => -1,
        'order' => 'ASC',
	'post_status' => null,
	'post_parent' => $post->ID
);
$attachments = get_posts($args);
if ($attachments) {
	foreach ($attachments as $attachment) {
		$img = wp_get_attachment_thumb_url( $attachment->ID );
                break;
        }
//Display image
}
?&gt;</pre>
<p><em><strong>Code Explanation:</strong></em> Firstly we fetch the images attached to the post in the order they were added to the post. And if images are there we fetch the path to the thumbnail image of the first image in the post using <em>wp_get_attachment_thumb_url</em> function.</p>
<p>Now you have path of the image in <em>$img</em> which you can use to display the post thumbnail using <em>img</em> tag.</p>
<p>If you have visited the homepage of <a href="http://webdeveloperplus.com">Web Developer Plus</a>, I am using this technique to display post thumbnails with post excerpts.</p>
<h3>Related Posts</h3>
<ol>
		<li><a href="http://webdeveloperplus.com/wordpress/23-excellent-tutorials-for-wordpress-theme-developers/" rel="bookmark">
												23+ Excellent Tutorials For WordPress Theme Developers</a><!-- (12.7)--></li>
		<li><a href="http://webdeveloperplus.com/wordpress/free-wordpress-theme-for-personal-blogs-youare/" rel="bookmark">
												Free WordPress Theme For Personal Blogs &#8211; YouAre</a><!-- (8.8)--></li>
		<li><a href="http://webdeveloperplus.com/wordpress/12-lesser-known-but-useful-wordpress-hacks/" rel="bookmark">
								<img src="http://thumbs.webdeveloperplus.com/img/2009/10/wordpress-hacks-thumb.jpg" alt="12 Lesser Known But Useful WordPress Hacks" width="40px" height="40px" />				12 Lesser Known But Useful WordPress Hacks</a><!-- (6.4)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://webdeveloperplus.com/wordpress/how-to-use-thumbnails-generated-by-wordpress-in-your-theme/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
	</channel>
</rss>

