Archive for March, 2009

If you are using Wordpress 2.7 you will see an autosave function which is creating a new entry in database with every intermediate version of the posts since the publishing. How to disable Auto save option for wordpress posts  saves the post after every short period 60 seconds by default.  And you can restore the post from the autosave options. This feature is really useful.

But some people may not like this feature. Why? Well, the reason is that this will save all the autosaved posts in your database, thus messing up your databases tables. To disable this option, you can do the following:

1)     Open your wp-admin/post.php file and wp-admin/post-new.php files.

2)     You will find this line of code there:

wp_enqueue_script('autosave');

3)     Add // to the beginning of this code.

4)    The code became //wp_enqueue_script(’autosave’);

The autosave option will be disabled for your existing and new posts.

Instead of this you can also modify the autosave time

1) Open the file wp-setting.php which is in /wp-admin/

2) Will find two rows like this:

if ( !defined( ‘AUTOSAVE_INTERVAL’ ) )
define( ‘AUTOSAVE_INTERVAL’, 60 );

3) Change the 60(seconds) with another number that you think is better and save the modified file. That’s it.


Tags:

Solution found

A common problem that some customers encounter when using a NAT router is that they want to be able to access their web site from within their local network, but their NAT router does not support “loopback” connections. This prevents them from being able to reach their own services, even though external visitors are able to connect.

Let’s say, for example, that we have a local network consisting of two machines behind a NAT router with the router in turn connected to a DSL or Cable modem. Each of the two machines will be assigned an IP address by the NAT router within a “local” IP space such as the 192.168 block. The NAT router in turn is assigned an IP address by the ISP within the “public” space. When you setup a host or domain within our system, it is this public IP address that the host/domain points to.

The following diagram shows the example network’s two computers behind a NAT router:

Simple network diagram

In this diagram, the “public” address is 65.54.43.32 and the NAT router has a LAN/”private” address of 192.168.0.1. The other computers on the network are assigned numbers within this private space.

Now, let’s say that we have registered the domain “example.com” with the host “www.example.com” mapped to this public IP address. When somebody out on the internet attempts to connect to www.example.com, they end up connecting to the WAN interface on the NAT router. The NAT router in turn “routes” the packets to an internal machine based on the port that the connection came in on.

The loopback problem arises when somebody using the “Work Station” computer wants to access the “Web Server” computer. If they try to access the computer via the hostname www.example.com, the NAT router will attempt to route this out its WAN interface and then back in. In most cases this will either fail or return the web interface for the router itself because the router doesn’t understand what the user is trying to do.

The Answer for:  loopback_connections

and more about routers and port forwarding here


Some blogs are receiving a lot of spam comments. One of the simplest ways to avoid wasting all time to cancel and mark as spam is to ban the IP. A nice plugin wrote by Lester Chan is WP-Ban

Features:
» Ban users by IP, IP Range, host name and referer url from visiting your WordPress’s blog. It will display a custom ban message when the banned IP, IP range, host name or referer url trys to visit you blog. You can also exclude certain IPs from being banned. There will be statistics recordered on how many times they attemp to visit your blog. It allows wildcard matching too.

Download:
» WP-Ban 1.40 For WordPress 2.7.x
» WP-Ban 1.31 For WordPress 2.5.x And 2.6.x
» WP-Ban 1.20 For WordPress 2.1.x To WordPress 2.3.x
» WP-Ban 1.00 For WordPress 2.0.x

Screenshots:
» http://lesterchan.net/wordpress/screenshots/browse/wp-ban/

Development:
» http://dev.wp-plugins.org/browser/wp-ban/

Translations:
» http://dev.wp-plugins.org/browser/wp-ban/i18n/

Support Forums:
» http://forums.lesterchan.net/index.php?board=10.0