Posts Tagged ‘Tips’

Ever though of creating a Safely Remove Hardware icon on your desktop? You may ask why because the icon will usually appear at the taskbar, but for some odd reason, mine will not always appear, so sometime i have no other choice but to pull the USB stick right away. I don’t know what caused this happen, it’s Windows anyway and apparently i’m not the only one who facing this problem.

However, i found this simple workaround, which is create a shortcut on your desktop to open the Safely Remove Hardware menu, this is how you do it:-

On your desktop, right click then choose New > Shortcuts after that copy and paste the following:

%windir%\system32\rundll32.exe shell32.dll,Control_RunDLL hotplug.dll

Press next, you will be ask to give a name for your shortcut, any name will do, or just name it Safely Remove Hardware, then press finish.

That’s it! You are done, the shortcut should appear on your desktop. But for now you probably in love with your new shortcut, so you feel like want to make it fancier a bit, and here is how you can add an icon for it:-

Right click on your shortcut then choose Properties.

Go to the Shortcut tabs and click on the button Change Icon….

A menu should appear with a bunch of icon for you to choose, you can pick any icon from here OR you may paste the following and press enter for the Windows Safely Remove Hardware icon.

For those who are using WordPress 2.1 WYSIWYG editor, ever wonder why there are so less buttons for the visual editor? Well actually you can toggle the advance button by pressing Alt+Shift+V for Firefox user or Alt+V for Internet Explorer user.

If you are using AdSense-Deluxe together with other WordPress plugins that is using ButtonSnap Class Library to create Quicktags button for WordPress Editor, then most probably the buttons created by ButtonSnap won’t show up.

However, after playing around with the JavaScipt inside AdSense-Deluxe (shame to say that i’m not very familiar with JavaScipt 😳 ), finally i came out a solution that’s extremely easy and still maintain the AdSense-Deluxe drop down option in WordPress Editor.

Follow these simple step to do the AdSense-Deluxe and ButtonSnap fix:

Step 1: Open up adsense-deluxe.php with your favorite editor, then search for the following two line.

Upon trying to achieve XHTML 1.0 Strict, one of the thing i found out that i had been doing wrong all this while is that i put target=”_blank” HTML tag in most of my post link, this is not a valid XHTML for Strict and it won’t pass the validation, but i had been doing this since the very first day i blog! It will be troublesome if i’m going to search for every post and take away the target=”_blank”!! So i guess the only way to do this easily is by using the MySQL query, i went to Google around and found this very useful SQL query in Lorelle’s blog.

Before proceed to make any changes to your WordPress database, it’s always a good idea that you backup your database first, who know you might missed out something and screw up your database, it’s always better to prevent than cure right? 😉

Continue with the search and replace, in order to do search and replace in WordPress database, you can use the REPLACE syntax in SQL query, the full line would like the following:

Where wp_posts is your WordPress database post table and post_content is your post content table field, most of the time you don’t need to change this two value.

The thing you need to change is obviously the Item to replace here, which is the text you want to search, it can be multiple string as long as the string is within the single quote, and Replacement text here is the text you want to replace, also can be multiple string as long as it’s within the single quote.

So in my case, i want to strip away target=”_blank” and replace it with nothing, so i do this:

Note that the i didn’t put anything for replace string, because i want to delete target=”_blank”, it’s a two single quote.

Again i would like to say, it’s a good practice that you backup your database always, once you screw up your database there is no turning back, and i will take no responsibility if something happen to your database, so do this at your own risk! 🙂