Monday, December 20, 2010

Best practices for modern Javascript development

0 comments
Use the correct

But instead, how many times have you seen this when looking at the source code?

In HTML, the language attribute is deprecated due to its redundancy with the type attribute. You should never use it anymore.

Keep your code in an external file

Using an external .js file for your Javascript code is a lot cleaner than writing it in your html document, and it also allows the browser to cache the file, which will result in a faster website.

Put your Javascript code in a .js file, then use the Don’t wrap code in HTML comments

In the 90's some very old browsers weren’t able to interpret Javascript. In order to prevent unwanted results on those browsers, it was considered good practice in 1994-1997 to wrap Javascript code within html comments, so browsers with no Javascript support will simply ignore it.
Here is an example of some code wrapped within html comments:

However, in 2010, all browsers (Even IE6, that means a lot) can interpret Javascript, so there’s absolutely no need to wrap code within comments anymore. Even worse, if code is wrapped within comments and use the decrement symbol --, you’ll expect some weird problems due to the fact the browser may think it’s the end of the html comment.

Use a framework

Unless your Javascript code is really short and easy, you should always avoid reinventing the wheel by using a framework of your choice. In my opinion, jQuery is the best and has an awesome community, so you should give it a try if you haven’t already.

Always declare your variables using var

You should introduce any variable you create with the var statement, otherwise it gets to the global scope. Also, using var makes your code more readable and self-explanatory.
Example of variable created using the var statement:

var name = "Jean";var size = data.length;Keep your code unobtrusive

Some years ago, when a programmer wanted to add an event to an html element (for example, if you want to validate a date when the user typed something) he simply put Javascript code in the html, using a special attribute such as onblur, onchange, onclick, etc.
Example:

This works great, but it is a bit dirty. HTML should only contain the document description. Just like it’s bad practice to use inline CSS styles, it’s bad practice to use inline Javascript.

Instead, what about using some unobtrusive Javascript? Using jQuery, it is pretty easy to do, as you can see in the following example:

$(document).ready(function(){$('input[name=date]').bind('change', validateDate);});Include your scripts at the bottom of your HTML files

Not so long ago, it was generally considered good practice to insert your Javascript files within the and tags of your html document.
But browsers read html files from top to bottom, and load external files dynamically. Which mean that inserting scripts within the and tags will make your Javascript load before some of the page content.
In order to always load scripts after the content, Javascript files should always been included at the bottom of your html files, as shown below:

Use JSLint

JSLint is a web-app which takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate solution.
JSLint is great to find bugs in your code, and also things that may be written in a better way. This site is definitely my favorite coding buddy when developing some Javascript.

Don’t use document.write

The good old document.write method has been deprecated for years, however it is still very common to see it while browsing code.

document.write("hello world");

Instead of using this deprecated method, you should use the DOM and the innerHTML function to insert text on a page:

document.getElementById('hello').innerHTML('hello world');This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

10 useful new WordPress hacks

0 comments
Remove comments autolinks

If someone leaves a comment containing a url, the url will be automatically transformed to a link by WordPress. This can be useful, but personally I don’t like to see many links in comments, especially when they’re a bit spammy.
This is why I decided, on the latest CWC theme, to remove comments autolink. Doing so is pretty easy, just paste the following into your functions.php file. Once you saved the file, you’ll notice that autolinks have disappeared.

remove_filter('comment_text', 'make_clickable', 9);

» Source: http://www.wprecipes.com/wordpress-hack-remove-autolinks-in-comments

Automatically notify your users of new posts

If you run a private site using WordPress, then it could be useful to notify your users when a new post is published. The following snippet will get all user emails from your database and will send an email to them automatically when a post is published.
Of course, you shouldn’t use that code on your blog as it does not currently have any unsubscribe option.

function email_members($post_ID) { global $wpdb; $usersarray = $wpdb->get_results("SELECT user_email FROM $wpdb->users;"); $users = implode(",", $usersarray); mail($users, "New WordPress recipe online!", 'A new recipe have been published on http://www.catswhocode.com'); return $post_ID;}add_action('publish_post', 'email_members');Twitter style “time ago” dates

Displaying dates using the “5 days ago” format is becoming very popular on blogs, thanks to Twitter popularity.
I have seen lots of complicated tutorials to use this format on your WordPress blog, however many people don’t know that WordPress has a built-in function to do the same thing: human_time_diff().

Paste the snippet below anywhere within the loop, and it will display your dates using the “time ago” format.

Posted

» Source: http://www.phpsnippets.info/display-dates-as-time-ago

Display post thumbnail in your RSS feed

Introduced in WordPress 2.9, the the_post_thumbnail() function is very useful to easily add and display a thumbnail attached to a post. Unfortunately, there’s no built-in way to display this thumbnail on your RSS feed.

Happily, the function below will solve this problem. Simply paste it in your functions.php, save it, and the post thumbnail will be automatically displayed on your RSS feed.

function diw_post_thumbnail_feeds($content) {global $post;if(has_post_thumbnail($post->ID)) {$content = '
' . get_the_post_thumbnail($post->ID) . '
' . $content;}return $content;}add_filter('the_excerpt_rss', 'diw_post_thumbnail_feeds');add_filter('the_content_feed', 'diw_post_thumbnail_feeds');

» Source: http://digwp.com/2010/06/show-post-thumbnails-in-feeds/

Block external requests

By default, WordPress does some external requests in order to get the available updates and the WordPress news shown in your dashboard. Personally, I don’t mind them, but I’ve recently had clients who didn’t wanted any external requests. So, I’ve blocked them using this interesting hack.
Simply add the following line to your wp-config.php file:

define('WP_HTTP_BLOCK_EXTERNAL', true);

If you need to allow some external requests, it it easy to create a whitelist, as shown below:

define('WP_ACCESSIBLE_HOSTS', 'rpc.pingomatic.com');

This line of code have to be pasted in wp-config.php as well.
» Source: http://digwp.com/2010/08/pimp-your-wp-config-php/

Easy debug mode

When things go wrong, you can always use the super useful WordPress debug tool, WP_DEBUG. By default, you have to paste a line of code in your wp-config.php to make the debug mode available.
By if you need to easily access the debug mode even when your site is live, you should edit your wp-config.php file and replace

define('WP_DEBUG', true);

by:

if ( isset($_GET['debug']) && $_GET['debug'] == 'debug') define('WP_DEBUG', true);

Once done, simply add a GET parameter to the url of the page you’d like to debug, as shown below:

http://www.catswhocode.com/blog/about?debug=debug

Of course, for obvious security reasons you should replace the name debug by a random word of your choice so no one will ever see your site in debug mode.
» Source: http://yoast.com/wordpress-debug/

Use WordPress shortcode in theme files

WordPress shortcodes are a super easy way to add content such as rss feeds, google maps, galleries and more into your posts or pages. But what about being able to output shortcodes in your theme files?
A built-in function exists, but most people never heard of it. The function is called do_shortcode(). It takes one parameter, the shortcode you’d like to display. I’ve heard you can ad more than one shortcode as a parameter, but I haven’t tried it yet.

do_shortcode('[gallery]');

» Source: http://codex.wordpress.org/Function_Reference/do_shortcode

Allow upload of more file types

If you ever tried to upload some not so common filetypes, such as Textmate’s .tmCommand to your WordPress blog, you may have experienced an error, because WordPress simply doesn’t want you to upload some other file type.
Fortunately, you can add new file types to WordPress whitelist. Doing so is quite easy, just paste the following piece of code in your functions.php, and you’re done.
Note that file types have to be separated by a pipe.

function addUploadMimes($mimes) { $mimes = array_merge($mimes, array( 'tmbundle|tmCommand|tmDragCommand|tmSnippet|tmLanguage|tmPreferences' => 'application/octet-stream' )); return $mimes;}add_filter('upload_mimes', 'addUploadMimes');

» Source: http://www.wprecipes.com/wordpress-tip-allow-upload-of-more-file-types

Google Docs PDF viewer shortcode

Google Docs is definitely the easiest way to read documents in .pdf, .doc or .xls online. So, if you want to share a PDF file with your readers, what about creating a shortcode that will open the PDF in Google Docs instead of forcing download?

Simply paste the code in your functions.php.

function pdflink($attr, $content) {return ''.$content.'';}add_shortcode('pdf', 'pdflink');

Once you saved the file, you’ll be able to use the shortcode on your posts and page. Here is the syntax:

[pdf href="http://yoursite.com/linktoyour/file.pdf"]View PDF[/pdf]

» Source: http://www.wprecipes.com/wordpress-tip-create-a-pdf-viewer-shortcode

Detect the visitor browser within WordPress

Well, this hack is not so new, but it still remains one of my favorites. What this code does is pretty simple, it detects the name of the visitor browser and adds it to the body_class() function.
That way, you can correct browser-specific problems extremely easily. The function has to be pasted in your functions.php file.

add_filter('body_class','browser_body_class');function browser_body_class($classes) {global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;if($is_lynx) $classes[] = 'lynx';elseif($is_gecko) $classes[] = 'gecko';elseif($is_opera) $classes[] = 'opera';elseif($is_NS4) $classes[] = 'ns4';elseif($is_safari) $classes[] = 'safari';elseif($is_chrome) $classes[] = 'chrome';elseif($is_IE) $classes[] = 'ie';else $classes[] = 'unknown';if($is_iphone) $classes[] = 'iphone';return $classes;}

The function output will look like:

» Source: http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/

This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

How to create a kick-ass CSS3 progress bar

0 comments

Please note: The original CSS3 progress bar shown in this tutorial has been created by Ivan Vanderbyl, which hereby gave me the right to reproduce and document his work.
The following tutorial and the demo works best on Chrome and Safari, correctly on Firefox and very badly in Internet Explorer (eh…I’m sure you hadn’t guessed that).

The Demo


Click on the image to view a live demo. You can also get the source on Github.

Getting ready

Let’s start by organizing our work. To achieve the effect of this tutorial, we’ll need to create 3 files:

progress.html, which will contain our markup.ui.css which will contain our CSS styles.progress.js which will contain some additional jQuery animations.

Create a directory on your webserver (or hard drive) and create the files.

The HTML markup

Here we go. Open your progress.html file and paste the following markup in it:

Pure CSS Progress Bar

Let me explain the code a bit: On line 1, I’ve declared a HTML5 doctype. Then, lines 12 to 16 contains the markup for the progress bar itself. If you save the file and view it in your browser right now, you’ll see that nothing appears. Don’t worry, we’re going to apply so CSS3 magic in a minute.

Diving into CSS3

Open your ui.css file and paste the following code in it. There’s nothing fancy there, just some basic styles (that I’ve simplified from the original source) for the layout.

body { background:#eee; padding: 30px; font-size: 62.5%; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; position: relative; margin: 0;}#container { margin: 0 auto; width: 460px; padding: 2em; background: #DCDDDF;}.ui-progress-bar { margin-top: 3em; margin-bottom: 3em;} .ui-progress span.ui-label { font-size: 1.2em; position: absolute; right: 0; line-height: 33px; padding-right: 12px; color: rgba(0,0,0,0.6); text-shadow: rgba(255,255,255, 0.45) 0 1px 0px; white-space: nowrap;}

Once you are done, we can finally get into more serious things. The code below will make your progress bar come to life. I’ll explain it in details in a minute. For now, copy it and paste it in your ui.css file.

@-webkit-keyframes animate-stripes { from { background-position: 0 0; } to { background-position: 44px 0; }} .ui-progress-bar { position: relative; height: 35px; padding-right: 2px; background-color: #abb2bc; border-radius: 35px; -moz-border-radius: 35px; -webkit-border-radius: 35px; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #b6bcc6), color-stop(1, #9da5b0)); background: -moz-linear-gradient(#9da5b0 0%, #b6bcc6 100%); -webkit-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px #FFF; -moz-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px #FFF; box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.5), 0px 1px 0px 0px #FFF;} .ui-progress { position: relative; display: block; overflow: hidden; height: 33px; -moz-border-radius: 35px; -webkit-border-radius: 35px; border-radius: 35px; -webkit-background-size: 44px 44px; background-color: #74d04c; background: -webkit-gradient(linear, 0 0, 44 44, color-stop(0.00, rgba(255,255,255,0.17)), color-stop(0.25, rgba(255,255,255,0.17)), color-stop(0.26, rgba(255,255,255,0)), color-stop(0.50, rgba(255,255,255,0)), color-stop(0.51, rgba(255,255,255,0.17)), color-stop(0.75, rgba(255,255,255,0.17)), color-stop(0.76, rgba(255,255,255,0)), color-stop(1.00, rgba(255,255,255,0)) ), -webkit-gradient(linear, left bottom, left top, color-stop(0, #74d04c), color-stop(1, #9bdd62)); background: -moz-repeating-linear-gradient(top left -30deg, rgba(255,255,255,0.17), rgba(255,255,255,0.17) 15px, rgba(255,255,255,0) 15px, rgba(255,255,255,0) 30px ), -moz-linear-gradient(#9bdd62 0%, #74d04c 100%); -webkit-box-shadow: inset 0px 1px 0px 0px #dbf383, inset 0px -1px 1px #58c43a; -moz-box-shadow: inset 0px 1px 0px 0px #dbf383, inset 0px -1px 1px #58c43a; box-shadow: inset 0px 1px 0px 0px #dbf383, inset 0px -1px 1px #58c43a; border: 1px solid #4c8932; -webkit-animation: animate-stripes 2s linear infinite;}

Save your ui.css file and view progress.html in your web browser, and you’ll see your gorgeous progress bar, done without using any image.
So, what’s inside? Let me explain the code a bit.

First, we have two CSS classes: .ui-progress-bar and .ui-progress. The first is the container, and the second is the green progress bar.

Lines 1 to 9: These lines define a webkit-specific animation, which allows us to move an element from a pint to another.
For more details about webkit animations, see http://webkit.org/blog/324/css-animation-2/.Line 16: The border-radius CSS3 property allows you to define a radius and get rounded corners.Line 17: Mozilla specific property for border-radius.Line 18: Webkit specific property for border-radius.Line 19: The -webkit-gradient property allows you to add a gradient to an element. It works only on Webkit, other browsers will ignore this property.Line 20: Mozilla specific property, similar to -webkit-gradient with a different syntax.Lines 21 to 23: box-shadow (and its browser specific alternatives) allows you to add a shadow to an element.Line 34: Webkit specific property, based on the standard background-size property, which allows you to specify the size of a background image.Line 56: Triggers webkit animation defined on line 1.Final touch: Using jQuery to animate the progress bar

A pure CSS3 progress bar is a very cool thing, but progress bars are here to show progress, so we have to animate it. We’re going to use jQuery to do so.

Open your progress.html file and paste the two line below just above the closing tag.

This code will load jQuery from Google (Which I recommend to do instead of loading your own copy) as well as your progress.js file, which will contain the required code to animate the progress bar.

Now, paste the code below in your progress.js file:

(function( $ ){ $.fn.animateProgress = function(progress, callback) { return this.each(function() { $(this).animate({ width: progress+'%' }, { duration: 2000, easing: 'swing', step: function( progress ){ var labelEl = $('.ui-label', this), valueEl = $('.value', labelEl); if (Math.ceil(progress) < 20 && $('.ui-label', this).is(":visible")) { labelEl.hide(); }else{ if (labelEl.is(":hidden")) { labelEl.fadeIn(); }; } if (Math.ceil(progress) == 100) { labelEl.text('Done'); setTimeout(function() { labelEl.fadeOut(); }, 1000); }else{ valueEl.text(Math.ceil(progress) + '%'); } }, complete: function(scope, i, elem) { if (callback) { callback.call(this, i, elem ); }; } }); }); };})( jQuery );$(function() { $('#progress_bar .ui-progress .ui-label').hide(); $('#progress_bar .ui-progress').css('width', '7%'); $('#progress_bar .ui-progress').animateProgress(43, function() { $(this).animateProgress(79, function() { setTimeout(function() { $('#progress_bar .ui-progress').animateProgress(100, function() { $('#main_content').slideDown(); }); }, 2000); }); });});

Save the file, and view progress.html in your web brower: Wow, the progress bar is now animated. How cool is that?

This Javascript code makes the progress bar go from 0 to 100, and then, it displays a message, which is simply “Hello World” in our tutorial.

I hope you enjoyed reading this tutorial as much as I enjoyed writing it. Have fun with CSS3!

This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

Top 10 CSS3 buttons tutorials

0 comments
Super Awesome Buttons with CSS3 and RGBA


» View tutorial

Your own Google buttons using CSS3


» View tutorial

CSS3 Gradient Buttons


» View tutorial

Kick-Ass CSS3 Button


» View tutorial

Pure CSS3 icons


» View tutorial

Extremely fancy CSS3 buttons


» View tutorial

BonBon: Sweet CSS3 buttons


» View tutorial

Realistic Looking CSS3 Buttons


» View tutorial

CSS3 “Aqua” buttons with no images


» View tutorial

Flexible CSS3 toggle buttons


» View tutorial

Building beautiful buttons with css gradients


» View tutorial

This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

How to create a mobile WordPress theme with jQuery Mobile

0 comments

Here is what we’re going to build together today. Click the image to view the live demo.

Step 1: Getting files

We could have created our theme from scratch, but there’s no need to reinvent the wheel when there’s tools that can help you save lots of time. The tool we’re going to use is called Blank Theme. It is a functional WordPress theme, but without any styling. That way, it can be used as a starting point for creating your own themes. For example, I’ve used Blank Theme to create the current Cats Who Code theme.

Blank Theme has been created by Chris Coyier and it can be downloaded here. Get a copy and unzip it on your server or hard drive: We’re going to start. Optionally, open the style.css file and modify the theme name to fit your own needs.

Step 2: Header and Footer files

As we’re going to create a theme that will rely much on jQuery, the first thing we have to do is to link to jQuery and the jQuery Mobile files. You can either download the files individually and link them to the theme, or you can use jQuery’s CDN and link the online versions to your theme. I personally prefer linking to the online version, but it’s up to you.

Open the header.php file from the Blank Theme directory, and insert the following code to link to jQuery Mobile, within the and tags:

Once done, the required jQuery files are now linked to our theme. But we’re not done yet with header.php. As jQuery Mobile uses HTML5, we have to modify the doctype. Replace the first 6 lines of the file with:

Then, scroll down to the bottom of the file and locate the tag. Replace everything from the tag until the end of the file by the following:

>

We just dove in jQuery Mobile with the code above. What? We haven’t even wrote a single line of JavaScript! That’s right. jQuery Mobile doesn’t need you to write any JavaScript. All it needs is some 

tags with the proper data-role attribute.

As an explanation, take a look at line 3 of the code above. Have you noticed the data-role="header"? It describe a header bar. If you save the file and view your theme right now, you’ll notice a header bar on the top of the screen, with your blog name.

Now, save header.php and open footer.php. Replace its content by:

This simple code will insert a footer bar to our theme, with a button that will scroll up to the header when the user will tap on it. Did you noticed the data-icon attribute? It allows you to specify which kind of icon you want. In our case, we want an up arrow, but there’s lots of different icons you can use.

Step 3: The homepage

Now, let’s code our homepage. As we’re building a theme for mobile devices, we do not need anything fancy. Let’s build a list of our recent posts. To do so, open the index.php file, locate the loop, and replace it by the following code:

Save the file and take a look to your theme: It looks great! We now have a list of posts on our homepage. Once again, we have a very good looking list, with some nice transition effects, without coding a single line of JavaScript. That’s the magic of jQuery mobile.

The list is created by using the data-role="listview" attribute on the unordered list. The other attributes specifies the appearance of the list. Want to experiment a bit? Simply replace data-theme="c" by data-theme="b" and see what happens.

Now, modify the loops of the search.php and archive.php files like we did with index.php.

Step 4: Post and pages files

By default, the single.php and page.php files from the Blank Theme looks good in our mobile version, so we do not need to modify those files. Though, we can do something to enhance user experience: Mask the comments by default, and show them only if the user decides to. This can be done extremely easily using jQuery mobile.

Open comments.php and locate line 15. Insert the following line:

Then, go to line 31 and insert a closing

just before the else statement. Save the file and have a look at one of your posts: Comments are now masked by default, and a tap/click on the bar display them. If you prefer to show the comments by default, no problem: simply remove the data-state="collapsed" attribute. That’s all we need to create a collapsible content block.

Did you noticed that on posts, the header bar is showing a “Back” button? A click/tap on it will take you back to your blog homepage.

Step 5: Implementing search

Right now, we have a theme fully optimized for mobile devices. But it is missing something important: An easy to access search bar. Open your searchform.php file and replace its content by the following:

After you saved the file, reopen index.php and include the search form between the get_header() function and the unordered list which contain our posts:

Our homepage now has a working search form. Right now, our theme is done and we can use it on a production site.

Step 6: Final touches

Of course, even if the theme we’ve built is perfectly functional, there are still a lot of things that can be done to enhance its look and functionality. For example, I have noticed that the search field is smaller than the list items. In order to make the search field as wide as the list items, paste the following in style.css:

.ui-input-search{ width:96% !important;}

That’s all for today. I hope you enjoyed this tutorial. If you want to download the finished theme, just click here.

Also, I just redesigned my other blog Cats Who Blog so don’t hesitate to visit it or grab the RSS feed to read it later. The blog is now 100% focused on tools to make your life as a blogger, developer or designer easier. Enjoy!

This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

Awesome WordPress hacks to make your blogger life easier

0 comments
Hardcode to make WordPress faster

Hardcoding is generally not a good practice, however in the case of an established website, hardcoding your blog url, site url, template path and stylesheet path will make your blog run faster.

When a function such as bloginfo('url') is called, WordPress executes a query to your database to get the value, except if the value can be found on your wp-config.php file.
To hardcode those constants, edit wp-config.php and paste the following (Don’t forget to change the values!):

define('WP_HOME', 'http://www.catswhocode.com'); // blog urldefine('WP_SITEURL', 'http://www.catswhocode.com'); // site urldefine('TEMPLATEPATH', '/absolute/path/to/wp-content/themes/cwc5');define('STYLESHEETPATH', '/absolute/path/to/wp-content/themes/cwc5');

Source: http://digwp.com/2009/07/optimize-wordpress-performance-with-the-wp-config-php-file/

Set HTML editor as the default

I know a lot of tech-savvy persons who don’t really like WordPress “visual” editor. Personally, I don’t use it because I’m used to writing HTML, and also because WYSIWYG editors are more likely to produce bad, not valid or dirty code.

If you prefer using the HTML editor, then what about making it your blog default? Just paste the line below into your theme functions.php file, and you’re done.

add_filter('wp_default_editor', create_function('', 'return "html";'));

Source: http://www.wprecipes.com/how-to-set-html-editor-as-the-default-in-wordpress

Make term edition a lot easier

For some reason, WordPress uploader won’t let you upload some filetypes, such as Textmate’s .tmCommand. If you need to upload those files to your WordPress blog, here is a very nice snippet that will allow you to do it.

Simply paste the following code on your functions.php file. If needed, you can add more file types by adding them on line 4, separated by a pipe (|)

'application/octet-stream' )); return $mimes;}?>add_filter('upload_mimes', 'addUploadMimes');

Source: http://www.wprecipes.com/wordpress-tip-allow-upload-of-more-file-types

Remove autolinks in comments

Links in comments can be a good thing when they’re useful and relevant, but unfortunely lots of people are just leaving links in your comments in order to get clicks and backlinks.
As this became a recurrent problem on my blogs, I’ve looked for a solution and found a piece of code that will make urls appears as text, not as links.

As always, the code have to be pasted to your functions.php file.

remove_filter('comment_text', 'make_clickable', 9);

Source: http://www.wprecipes.com/wordpress-hack-remove-autolinks-in-comments

Easily modify contact info

I always wondered why WordPress still has a Yahoo and a AIM field for user contact information while nowadays, services like Facebook or Twitter became a lot more popular.

This simple hack will remove the AIM, Yahoo and Jabber fields and will replace them with Twitter, Facebook and LinkedIn. Just paste the code below in your functions.php file, and you’re ready to go.

function extra_contact_info($contactmethods) { unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); $contactmethods['facebook'] = 'Facebook'; $contactmethods['twitter'] = 'Twitter'; $contactmethods['linkedin'] = 'LinkedIn'; return $contactmethods;}add_filter('user_contactmethods', 'extra_contact_info');

Advanced users would probably enjoy this class which allow you to manage user contact info easily.
Source: http://thomasgriffinmedia.com/blog/2010/09/how-to-add-custom-user-contact-info-in-wordpress/

Leverage browser caching via .htaccess

One of the easiest way to improve your blog speed and general user experience is to leverage browser caching to reduce the number of http queries that the server needs to process. In fact, static files like images or PDF documents are not likely to change often so we can improve our blog speed by telling user browsers that they don’t need to download those files again if they’re already on the browser cache.

Open your .htaccess file (located at the root of your WordPress install) and paste the following. Remember to always make a backup before editing .htaccess.

## EXPIRES CACHING ##ExpiresActive OnExpiresByType image/jpg "access 1 year"ExpiresByType image/jpeg "access 1 year"ExpiresByType image/gif "access 1 year"ExpiresByType image/png "access 1 year"ExpiresByType text/css "access 1 month"ExpiresByType application/pdf "access 1 month"ExpiresByType text/x-javascript "access 1 month"ExpiresByType application/x-shockwave-flash "access 1 month"ExpiresByType image/x-icon "access 1 year"ExpiresDefault "access 2 days"## EXPIRES CACHING ##

Source: http://thomasgriffinmedia.com/blog/2010/11/how-to-leverage-browser-caching-in-wordpress-via-htaccess/

This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

How to easily create charts using jQuery and HTML5

0 comments
Step 1: Preparing files

Here we go! The first thing to do is obviously to create a directory on your Mac (or PC, nobody’s perfect ). You should name it chart for example. Once done, download the required Javascript and CSS files and save it on your hard drive.

Now, create a new html document, named charts.html. Copy the html structure below, and paste it into your newly created charts.html file.

Charts!

Did you notice that I used the doctype? It is the right doctype to use, as the javscript code we’ll add later will turn a html table into a HTML 5 canvas.

Step 2: Adding data

Now that we downloaded the javascript files and created an html document, it’s time to add data. Copy the code below and paste it within the and tags of your charts.html file.

Visits from August 16 to August 21
MondayTuesdayWednesdayThursdayFridaySaturdaySunday
CatsWhoCode.com12541112041135410058987182545477
WpRecipes.com9855887087317488815965474512
CatsWhoBlog.com324125442597310821142045950

Of course, feel free to add your own data to make the example more interesting for you.

Step 3: Let the magic happen

Alright, now we have a bunch of downloaded files and an html document. It’s time to merge them all together and finally generate the chart.
Unzip the downloaded file and open the extracted directory. Copy the following files into your chart directory.

charting/css/basic.csscharting/css/visualize.csscharting/css/visualize-light.csscharting/js/visualize.js

Once done, we obviously have to link the css and javascript files to our document. Paste the following after the tag of the document:</p><link href="basic.css" type="text/css" rel="stylesheet" /><link href="visualize.css" type="text/css" rel="stylesheet" /><link href="visualize-light.css" type="text/css" rel="stylesheet" /><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript" src="visualize.js"></script><p>It’s time to give life to our chart. Paste the final piece of code after the script calls:</p><script type="text/javascript">$(function(){$('table').visualize();});</script><p>Once you saved the file, your HTML table should be displayed along with a good looking chart. If you don’t want the table to be visible, simply hide it using the display:none</em> css property.</p>Additional explanations<p>Generating bar charts is definitely great, but what if your preference goes to a pie chart? No problem, visualize.js allows 4 different type of charts: Bar, area, pie and line.</p><p>Changing the default type is pretty easy: Just add the type parameter as shown below:</p>$('table').visualize({type: 'pie'});<p>Cool, isn’t it? Visualize.js accepts even more parameters to make sure your chart will look exactly how you want. Here are the parameters which can be used:</p><strong>type:</strong> string</em>. Accepts ‘bar’, ‘area’, ‘pie’, ‘line’. Default: ‘bar’.<strong>width:</strong> number</em>. Width of chart. Defaults to table width<strong>height:</strong> number</em>. Height of chart. Defaults to table height<strong>appendTitle:</strong> boolean</em>. Add title to chart. Default: true.<strong>title:</strong> string</em>. Title for chart. Defaults to text of table’s Caption element.<strong>appendKey:</strong> boolean</em>. Adds the color key to the chart. Default: true.<strong>colors:</strong> array</em>. Array items are hex values, used in order of appearance. Default: ['#be1e2d','#666699','#92d5ea','#ee8310','#8d10ee','#5a3b16','#26a4ed','#f45a90','#e9e744']<strong>textColors:</strong> array</em>. Array items are hex values. Each item corresponds with colors array. null/undefined items will fall back to CSS text color. Default: [].<strong>parseDirection:</strong> string</em>. Direction to parse the table data. Accepts ‘x’ and ‘y’. Default: ‘x’.<strong>pieMargin:</strong> number</em>. Space around outer circle of Pie chart. Default: 20.<strong>pieLabelPos:</strong> string</em>. Position of text labels in Pie chart. Accepts ‘inside’ and ‘outside’. Default: ‘inside’.<strong>lineWeight:</strong> number</em>. Stroke weight for lines in line and area charts. Default: 4.<strong>barGroupMargin:</strong> number</em>. Space around each group of bars in a bar chart. Default: 10.<strong>barMargin:</strong> number. Creates space around bars in bar chart (added to both sides of each bar). Default: 1<p>That’s all for today. Have fun with the charts <imgsrc='http://www.catswhocode.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><div<br />This post was made using the <a href='http://www.webmagnates.org/auto-blogging-software.html' title='auto-blogging software'>Auto Blogging Software</a> from <a href='http://www.webmagnates.org' title'make money online'>WebMagnates.org</a> This line will not appear when posts are made after activating the software to full version. <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'><span class='post-icons'> <span class='item-control blog-admin pid-1395533444'> <a href='https://www.blogger.com/post-edit.g?blogID=5003199952258966910&postID=3381792259335289431&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='http://www.blogger.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> </div> <div class='post-footer-line post-footer-line-2'></div> <div class='post-footer-line post-footer-line-3'></div> <div class='clear'></div> </div> </div> <!--Can't find substitution for tag [adEnd]--> </div> <div class='blog-pager' id='blog-pager'> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' href='https://guyswhocode.blogspot.com/search?updated-max=2010-12-20T19:24:00-08:00&max-results=7' id='Blog1_blog-pager-older-link' title='Older Posts'><img alt='older post' src='http://lh5.ggpht.com/_Kwwy9VyLMKw/S3qFKAce4dI/AAAAAAAACzk/_3EB5x1jkqE/but_prev.png'/></a> </span> </div> <div class='clear'></div> <div class='blog-feeds'> <div class='feed-links'> Subscribe to: <a class='feed-link' href='https://guyswhocode.blogspot.com/feeds/posts/default' target='_blank' type='application/atom+xml'>Comments (Atom)</a> </div> </div> </div></div> </div> <div id='sidebar-wrapper'> <!-- begin search box --> <div class='clearfix' id='searchBox'> <form action='/search' id='searchform' method='get'> <label for='s'> </label><input id='s' name='q' type='text' value=''/> <input id='searchsubmit' type='submit' value=''/> </form> </div> <!-- end search box --> <div class='sidebar section' id='sidebar'><div class='widget AdSense' data-version='1' id='AdSense1'> <div class='widget-content'> <script type="text/javascript"><!-- google_ad_client="pub-7236285611865348"; google_ad_host="pub-1556223355139109"; google_alternate_ad_url="http://img1.blogblog.com/img/blogger_ad160x600.html"; google_ad_width=160; google_ad_height=600; google_ad_format="160x600_as"; google_ad_type="text_image"; google_ad_host_channel="0001"; google_color_border="FFFFFF"; google_color_bg="FFFFFF"; google_color_link="0000FF"; google_color_url="008000"; google_color_text="000000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <div class='clear'></div> </div> </div><div class='widget Label' data-version='1' id='Label1'> <h2>Labels</h2> <div class='widget-content list-label-widget-content'> <ul> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/Awesome'>Awesome</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/blogger'>blogger</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/buttons'>buttons</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/charts'>charts</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/create'>create</a> <span dir='ltr'>(5)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/development'>development</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/easier'>easier</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/easily'>easily</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/Enhance'>Enhance</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/ezSQL'>ezSQL</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/features'>features</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/forms'>forms</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/hacks'>hacks</a> <span dir='ltr'>(4)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/HTML5'>HTML5</a> <span dir='ltr'>(4)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/interact'>interact</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/Javascript'>Javascript</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/jQuery'>jQuery</a> <span dir='ltr'>(3)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/kick-ass'>kick-ass</a> <span dir='ltr'>(1)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/kickass'>kickass</a> <span dir='ltr'>(1)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/Mobile'>Mobile</a> <span dir='ltr'>(1)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/modern'>modern</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/practices'>practices</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/progress'>progress</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/queries'>queries</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/snippets'>snippets</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/theme'>theme</a> <span dir='ltr'>(1)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/tutorials'>tutorials</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/Twitter'>Twitter</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/useful'>useful</a> <span dir='ltr'>(2)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/using'>using</a> <span dir='ltr'>(4)</span> </li> <li> <a dir='ltr' href='https://guyswhocode.blogspot.com/search/label/WordPress'>WordPress</a> <span dir='ltr'>(5)</span> </li> </ul> <div class='clear'></div> </div> </div><div class='widget BlogArchive' data-version='1' id='BlogArchive1'> <h2>Blog Archive</h2> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive1_ArchiveList'> <ul> <li class='archivedate expanded'> <a class='toggle' href='javascript:void(0)'> <span class='zippy toggle-open'> ▼  </span> </a> <a class='post-count-link' href='https://guyswhocode.blogspot.com/2010/'>2010</a> <span class='post-count' dir='ltr'>(19)</span> <ul> <li class='archivedate expanded'> <a class='toggle' href='javascript:void(0)'> <span class='zippy toggle-open'> ▼  </span> </a> <a class='post-count-link' href='https://guyswhocode.blogspot.com/2010/12/'>December</a> <span class='post-count' dir='ltr'>(19)</span> <ul class='posts'> <li><a href='https://guyswhocode.blogspot.com/2010/12/best-practices-for-modern-javascript_20.html'>Best practices for modern Javascript development</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/10-useful-new-wordpress-hacks_20.html'>10 useful new WordPress hacks</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/how-to-create-kick-ass-css3-progress_20.html'>How to create a kick-ass CSS3 progress bar</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/top-10-css3-buttons-tutorials_20.html'>Top 10 CSS3 buttons tutorials</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/how-to-create-mobile-wordpress-theme_20.html'>How to create a mobile WordPress theme with jQuery...</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/awesome-wordpress-hacks-to-make-your_20.html'>Awesome WordPress hacks to make your blogger life ...</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/how-to-easily-create-charts-using_20.html'>How to easily create charts using jQuery and HTML5</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/enhance-your-web-forms-with-new-html5_20.html'>Enhance your web forms with new HTML5 features</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/php-fast-and-easy-sql-queries-using_20.html'>PHP: Fast and easy SQL queries using ezSQL</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/php-snippets-to-interact-with-twitter_20.html'>PHP snippets to interact with Twitter</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/how-to-easily-create-charts-using.html'>How to easily create charts using jQuery and HTML5</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/enhance-your-web-forms-with-new-html5.html'>Enhance your web forms with new HTML5 features</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/top-10-css3-buttons-tutorials.html'>Top 10 CSS3 buttons tutorials</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/10-useful-new-wordpress-hacks.html'>10 useful new WordPress hacks</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/best-practices-for-modern-javascript.html'>Best practices for modern Javascript development</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/how-to-create-kick-ass-css3-progress.html'>How to create a kick-ass CSS3 progress bar</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/php-fast-and-easy-sql-queries-using.html'>PHP: Fast and easy SQL queries using ezSQL</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/php-snippets-to-interact-with-twitter.html'>PHP snippets to interact with Twitter</a></li> <li><a href='https://guyswhocode.blogspot.com/2010/12/awesome-wordpress-hacks-to-make-your.html'>Awesome WordPress hacks to make your blogger life ...</a></li> </ul> </li> </ul> </li> </ul> </div> </div> <div class='clear'></div> </div> </div></div> </div> <!-- spacer for skins that want sidebar and main to be the same height--> <div class='clear'> </div> </div> <!-- end content-wrapper --> </div> <div id='footer-bg'> <div id='footer-wrapper'> <div id='footer1'> <div class='footer no-items section' id='footer-1'></div> </div> <div id='footer2'> <div class='footer no-items section' id='footer-2'></div> </div> <div id='footer3'> <div class='footer no-items section' id='footer-3'></div> </div> <div class='clear'></div> </div> <div id='copyright'> <div id='copyrightInner'> <div id='credits_left'> Copyright <a href='https://guyswhocode.blogspot.com/'>Web Development Help</a> </div> <div id='credits_right'> Design by<a href='http://www.site5.com/in.php?id=81811' title='site5'> site5 </a> Blogger Theme by<a href='http://www.BloggerThemes.net' title='Bloggerthemes'> BloggerThemes</a> </div> </div> </div> </div> </div> <!-- end outer-wrapper --> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/1601900224-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AOuZoY5If2WGjpnwLTycsE78OFm2hCEJgA:1763348063075';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d5003199952258966910','//guyswhocode.blogspot.com/','5003199952258966910'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '5003199952258966910', 'title': 'Web Development Help', 'url': 'https://guyswhocode.blogspot.com/', 'canonicalUrl': 'http://guyswhocode.blogspot.com/', 'homepageUrl': 'https://guyswhocode.blogspot.com/', 'searchUrl': 'https://guyswhocode.blogspot.com/search', 'canonicalHomepageUrl': 'http://guyswhocode.blogspot.com/', 'blogspotFaviconUrl': 'https://guyswhocode.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Web Development Help - Atom\x22 href\x3d\x22https://guyswhocode.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22Web Development Help - RSS\x22 href\x3d\x22https://guyswhocode.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Web Development Help - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/5003199952258966910/posts/default\x22 /\x3e\n', 'meTag': '\x3clink rel\x3d\x22me\x22 href\x3d\x22https://www.blogger.com/profile/17855932618517107575\x22 /\x3e\n', 'adsenseClientId': 'ca-pub-7236285611865348', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': true, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'isGoogleEverywhereLinkTooltipEnabled': true, 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/100d2c6f8e2be9d1', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'X', 'key': 'twitter', 'shareMessage': 'Share to X', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'index', 'pageName': '', 'pageTitle': 'Web Development Help'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'name': 'custom', 'localizedName': 'Custom', 'isResponsive': false, 'isAlternateRendering': false, 'isCustom': true}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'Web Development Help', 'description': '', 'url': 'https://guyswhocode.blogspot.com/', 'type': 'feed', 'isSingleItem': false, 'isMultipleItems': true, 'isError': false, 'isPage': false, 'isPost': false, 'isHomepage': true, 'isArchive': false, 'isLabelSearch': false}}]); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar', document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/3301430289-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/828616780-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense1', 'sidebar', document.getElementById('AdSense1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label1', 'sidebar', document.getElementById('Label1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); </script> </body> </html>