How to disable dragging on a HTML element with jQuery
They are not free who drag their chains after them.
-French proverb
All HTML elements have a default nature whereby they can be dragged around for whatever reasons. Sometimes you dont want this, especially on sliders. Of course, if you the jQueryUI slider plugin then you don’t need to do this. But using the slider plugin just to stop dragging is overkill. Instead, add a class to each of the elements that shouldn’t drag, maybe “undraggable” and then use jQuery to return false on its mousemove event.
$( ".undraggable" ).mousedown(function(){return false;});
How to enable custom thumbnails in WordPress
“Anyone who doesn’t take truth seriously in small matters cannot be trusted in large ones either.”
-Albert Einstein
If you need to set your own custom thumbnail size for your thumbs then in your custom theme folder’s functions.php file paste the following:
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 180, 180, true ); // default Post Thumbnail dimensions (cropped)
add_image_size( 'category-thumb', 300, 9999 ); //For creating additional image sizes - 9999 signifies any height
}
If you have already added posts to your blog, then you ll want to affect all the thumbnails that have already been created. In that case, go here and download the AJAX Thumbnail Rebuild plugin and stick it in your plugins folder.
Activate the plugin.
Go to Tools and click Rebuild Thumbnails. Here you should see your newly added post-thumbnail directive after the default ‘thumbnail’, ‘medium’, ‘large’. I chose to rebuild only the last one as opposed to the others.
Click Regenerate All Thumbnails.
Once thats done, you can style the newly created thumbnails by styling the img.wp-post-image in your style.css file. More info here.
How to backup a mysql database from a remote server using the terminal
A fool and his data are soon parted!
Sometimes you do not have phpmyadmin installed on the server for whatever reasons and you must get hold of a database to either get it to your local machine or put it on another server. This article assumes that you are either using a Mac or a Linux distribution. If you are using Windows then maybe you ll need to get hold of SSH-Putty before you proceed.
You ll need the following information:
- SSH login info (username, password, host and the port (if any). Chances are, if the server does not have phpmyadmin installed, then it probably doesnt use a default port as well.
- MySQL server info (username, password)
- Name of the database you need to backup/download
Start by connecting to the server using SSH
ssh username@host-ip-address -p port-number
Substitute <username> with your server name’s ssh user name and <host-ip-address> by the ip address of your server. Substitute <port-number> with the port number for your server. If your server does not using any specific port number then leave out ‘-p port-number’
You ll be prompted for the password, enter it(you wont see it being typed of course) and hit enter.
If this is the first time you have logged in to your server then it will ask you to verify the authenticity of the remote host. Type yes and proceed.
Once you are in, you can directly take the mysql database backup without logging into the mysql server. In case you want to check the databases in there and ensure that the database is indeed in there then you will need to log in to the mysqlserver
mysql -u <mysqlusername> -p<password> -h localhost
In the above command, note that there is no space between -p and <password>. You must type -p and the password as if it was one word.
Once you ve logged into the mysqlserver, you can list the databases by typing
show databases;
There is a semi colon at the end of every command you type in the mysql console. If you forget to put a semi-colon at the end, the prompt will simply go to the next line. Just enter the semi-colon there and hit enter.
Once the database list is loaded, you can ensure that the database you want to backup, indeed exists there. Sometimes a company will have several servers and you may want to ensure that you are accessing the correct server!
Now you can type exit and leave the mysqlserver. To backup the mysql database, you need to use the mysqldump utility. ‘mysqldump’ is not a mysql command. Many people try to use mysqldump inside the mysql console and wonder what went wrong. So, after exiting mysql, use the mysqldump utility to backup you database. You can specify a name for your backed up file. Also, the file will be generated in the directory you were in when you used mysqldump. If you want to know which directory you are in, then you can type pwd (print working directory) to know its name (in case you are going to download it later using ftp)
mysqldump -u username -ppassword database-name > file.sql
Again there is no space between -p and password. You can rename file.sql to anything-you-want.sql. This will generate a sql file that you can now download to your local machine.
How to backup and move a WordPress site from one host to another
“Life is like riding a bicycle. To keep your balance you must keep moving.”
-Albert Einstein

Backing up and uploading a WordPress site can be a bit tricky and will slightly change from blog to blog. Here s a general guideline:
- Export a XML file from the Tools>Export setting. If you are using an older WordPress installation then it might offer some options, just select the one associated with WordPress. If you are on the latest one then this may not matter. Either ways, you’ll have a XML file created for you.
- In your new location/host, after installing WordPress, Tools>Import this XML file. It will create the necessary posts, comments, users, pages etc.
- The tricky part is the permalinks and the blog address. You can change the blog address from the Settings section of your wp-admin section or by simply accessing the MySQL database from maybe PHPMyAdmin. If you cannot access the wp-admin at all, then you ll need to use PHPMyAdmin or a command line tool to access your database. Once inside the MySQL database for the new WordPress blog, go to the table wp_options and change the value for the site_url field to the new blog destination.
- Then go to the wp_posts table. In there you need to update all the values in the ‘guid’ field to the new URL. This can be quite painful if you do it manually. Thankfully you dont have to do it manually. Use the following code to change the permalinks. You can enter this command in the SQL tab of the table wp_posts
- UPDATE wp_posts SET guid = replace(guid,’localhost’,'newdomain.com’);
- In the above command, just substitute ‘localhost’ to whatever was your older domain for the blog and substitute ‘newdomain.com’ to whatever is your new domain for the blog.
- Run this command and all the permalinks will reflect the new domain.
- Finally upload the contents of the ‘upload’ folder into the new wordpress’ upload folder and you are good to go.
If things still seem to be not working, then enable the debug mode in the wp_config.php file by changing the value for define(‘WP_DEBUG’, false); to define(‘WP_DEBUG’, true);
Do let me know if something still doesnt work and I ll do my best to address it. Leave the doubt in the comments here.
In case you had just taken a complete backup from an older host and uploaded to a new host, then make sure you uploaded the database and followed the instructions for changing the values for guid in the wp_posts table.
6 killer social media marketing tips for Facebook, Twitter and Linked In from the MSMM 2.0 live event at Paradise Point, San Diego
“What really decides consumers to buy or not to buy is the content of your advertising(for this post – social media posts), not its form.”
-David Ogilvy

The MSMM 2.0 live event which took place at Paradise Point(June 3 thru 6, 2011) started and ended with a bang! This is becoming quite regular of all Traffic Geyser events. Kickass speakers, awesome guests, good food & music and Mike Koenigs & Rocket Helstrom… what could I possibly add to that? This was one of the best Internet events for sure!
The speakers comprised of some of the most renowned industry speakers who have a great command over the Traffic Geyser tool set as well as a strong understanding of social media and how to put it to use for your benefit. Here is a list of people who spoke at the event (if I ve missed someone, please bring this to my notice)
- Mike Koenigs
- Rocket Helstrom
- Paul Colligan
- Amy Porterfield
- Haley Hohengarten
- Fireman Mike Lemoine
- Valerie Van Bowen
- Brian Williams
- Frank Bianco
- Jody Underhill
- Eric Kurit
I was around only in the mornings, but I sure learnt a lot in these sessions as well. Here is a gist of what I learnt and what you can put to use right away to start attracting some serious attention online. If you are a MSMM 2.0 member then you do have a full access to all the sessions in video format, along with the presenter’s presentations as well as transcripts!
1. After you do an event or a webinar or even a client meeting, what do you do to follow up with the people who attended or the people you met? What is your followup the next day? Most people, just send out a email or a printed corporate kinda letter to the attendees or the people they met thanking them. Some dont even follow up which is worse than sending the printed letter or email. What should ideally be done is, make a quick video explaining how you loved meeting everyone and talking to everyone, add in a personal thing that occurred during the event/meeting and then sign off saying you look forward to seeing em again. Most laptops/netbook/mac books have a video camera, so making a video should not be an issue. Attach a pdf along with this video to an email that you (or your staff) can send to all the people who attended. The attached pdf can just be an article that provides them with some information that is useful for their business. These kinda pdf s are available to you instantly if you are a Monster FollowUp or Traffic Geyser member by the way.
2. While posting on Facebook, most people try to put something creative or intelligent in an attempt to impress their readers/friends/followers. That’s fine, but it does not result into anything substantial. What would be much better is to, firstly attach an image that relates to what you posted. I dont mean you post in image for the heck of it, but instead for eg, when you post something inspiring, attach an image to the post that relates to what you posted. This heightens the impact of the message and the recall is higher. Then, on your personal fan page, instead of just creating a page that informs people who you are and asks them to like you, have a opt in there. Make them watch a video in exchange for the ‘like’. Don’t let the video play unless the user liked you. Inform visitors to your page about the videos or updates they can get if they can get to the other side of the ‘like’.
3. LinkedIn is a great tool, but only a few people use it effectively. The biggest selling point of LinkedIn is groups. Join some groups that are related to your field or industry. Especially groups which have thousands of members. Then, whenever you have something to say or offer or some event or product/service, that you want people to know about, post it in this group along with a link. Thats an instant way to reach thousands of people whom you d not reach otherwise.
4. Each day post not more than 8 posts on Facebook which are basically something inspiring with an image, OR have a video that is related to your field (not something simply amusing like cats who look like hitler) OR a link to something that can seriously be helpful to your readers. Have 3 twitter posts everyday of the same style. Posting more than that can result negatively. Your followers will think, you don’t have a life. And they ll either unfollow you or stop taking you seriously.
5. YouTube is a platform. And a platform means, you get on it and reach as many people as you can humanly reach. First create a channel there, don’t call it by your name or company name. Do a bit of keyword research and name the channel related to what people are likely to search for. Make your 10 by 10 by 4! This is Mike Koenig’s contribution to people who dont know what videos they can make! 10x10x4 is basically, 10 videos of frequently asked questions(about your industry), 10 videos of ‘should’ ask questions(about your industry) and 4 videos about you, your company, products and services and maybe one video that just describes this little repository of information you ve build through videos.
6. Your website must have a video + opt in email + the title of the page should be made up of keywords that you figured out by researching on Google ad sense. Its free to do that. Also, when someone opts in, make sure to followup with another video. The best bet is to offer 24 Free videos on how to make money or how to get what you want out of each relation or whatever. These 24 videos are nothing but your 10x10x4. Offer PDF bonuses without announcing them first. Like a surprise. These PDFs can simply be transcripts of your videos.
So thats is. 6 killer social media marketing tips! If you were at the event or even if you werent, but do know some killer tips, then do post them here in the comments. Thanks and go ahead… tweet this post!


