October 20, 2011 JavaScript no responses # , ,

Simple Javascript Delay routine

Setup events to occur after a delay

Using setTimeout we can trigger an alert after 5000 milliseconds.

setTimeout("alert('hello guest!')",5000);

Continue reading

September 15, 2011 Google Maps , jQuery no responses #

Replace body onunload=`GUnload()` with jQuery

If you use Google maps it’s important to use GUnload on the page’s unload event. It’s ok when you can access the body tag directly. But if you have the Google map functionality wrapped inside an ascx you need a different approach.

In fact is very easy to use jQuery to “catch” the unload event. In case anyone else needs it:

$(window).unload( function () { GUnload(); } );
July 13, 2011 How To's no responses

Change your PHP user agent to avoid being blocked

If you want to scrape content from the web don’t make it so obvious.

While CURL-ing content with PHP, it’s not uncommon for people to get upset because you’re either being clever and avoiding paying for something, or you’re just flat out stealing someone’s content.

The easiest way for them to do this is by checking the user-agent and that’s your biggest enemy. If you look in your php.ini file you’re probably set to identify as ‘PHP’ which is not only obvious but it’s easy to block. If you’ve got users visiting your domain identified as PHP; someone is trying to steal your stuff.

Continue reading

June 23, 2011 Themes , Wordpress no responses # ,

How to Delete Post Revisions in WordPress and keep clean

How can you delete post revisions in WordPress blogs? Post revision is a cool way in which WordPress autosaves your posts while you type. This helps to recover posts should your browser crash, or internet crash, and you can always restore an older version of the post. But Post revisions tend to pile up in your database.

Most of times the number of post revisions is double the number of posts! No wonder the database file size is growing so fast. Every post we edit keeps accumulating post revisions. If there are frequently edited posts, the revision can be a large number.

Optimize Post Revisions

Of course you can stop post revisions by adding the following to wp-config.php (in root of your WordPress installation)

define('WP_POST_REVISIONS', false);

Continue reading

June 17, 2011 Wordpress no responses

Stop creating alternate image sizes

Many people agree what is unnecessarily creation of thumbnail, medium and large images whenever I upload any image in WordPress.

I normally do no use these image sizes, and these images sits on my valuable database and consume lots of storage space. I normally post at least 2-3 images in each post and subsequently these posts grow in number, ending up lots of different useless sized images. There is an easy way to turn off this automatic generation of these images without having to download any plugins or manually modifying any WordPress code.

Go to your WordPress dashboard, and look for Setting tab on right side. Click on sub-tab Media.

Continue reading

June 2, 2011 Wordpress no responses # ,

Remove /category/ from your WordPress url

If you wanted to be able to finally remove the useless /category/ from your WordPress categories permalinks? If yes, read on and get ready to hack your .htaccess file!

WordPress category permalinks are displayed that way:

  • http://www.domain.com/blog/category/wordpress

As you can see, the category in the url is pretty useless. Here’s how to remove it:

Continue reading

June 2, 2011 MySQL , Wordpress no responses # ,

Moving WordPress site to new domain

When You decide to reorganize the blog link URL to make it tidier or to reflect new focus or theme of the blog. If you decide to change the URL or link location of your WordPress blog due to changing of domain name (such as from http://www.old-domain.com/ to http://www.new-domain.com/) or the blog to another directory location (such as from http://www.domain.com/ to http://www.domain.com/blog/), there are some steps that should be done to ensure the proper migration and no breaking links.

The tricky part when moving WordPress blog to another location is that WordPress is using absolute path in URL link instead of relative path in URL link location when stores some parameters in database. Within blog posts’ contents itself, users may also use the old URLs when creating reference backlinks. All these values in the database will need to be changed when WordPress is moved. The following guide will show you which database fields that has references or values related to blog’s URLs that you want to modify. Note that this guide is not about how to move WordPress blog from one server or host to another new hosting service.
Continue reading

May 2, 2011 CSS , jQuery no responses # ,

Fancy CSS/jQuery information boxes

A snazzy tutorial for you that you can use on you’re blog or website – whatever takes your fancy!

Now you probably noticed something different about my website that the welcome information box has been moved from the main content box to outside of the layout. This is to draw more attention to it so whenever you visit it’s there as a friendly hello to you and at your option to follow us or subscribe to the RSS feed.

How you can accomplish this on your website in the most easiest way possible?!
Continue reading

May 1, 2011 Themes , Wordpress no responses #

Mod-Rewrite on WordPress to hide login, register pages

For those who own WordPress on your own server or shared hosting, this doesn’t include “WordPress.com” as you cannot access your installation folder but that’s way of the scope of this article so we all know the “/wp-login.php” file is the backdoor to your WordPress would allow a attacker to infect your website with malicious stuff such as malware and could get your website blacklisted.

This file is located at the root of your WordPress install:
“http://www.yourdomain.com/wp-login.php” or “http://www.yourdomain.com/blog/wp-login.php”

This file also allows yourself and other users on your website to login to post content not only that but to register and to get a new password if they’ve forgotten their password.
Continue reading

April 7, 2011 Tools no responses # , , ,

Useful Twitter Tools

Last days Twitter is popular and lots of people use it. There are people that build tools to enable and simplify functionality and help make a service like Twitter even better. Here are some of these tools that will help you do more with Twitter.
Continue reading

1 17 18 19 20 21