‘HOW-TO’ Category

Reduce the Size of Your WordPress Plugin Footprint

19
responses

For each WordPress plugin you install, you are adding to the bandwidth/server overhead of your site. As a plugin author, there are some simple steps to take to reduce the footprint of your plugin (whether it be helping with server load or conserving bandwidth), even if your plugin still requires a lot of code. Break Out Admin Panels Into Separate Files Even for simple plugins, adding admin panels can easily balloon a plugin’s file size. A simple, yet effective technique, is to copy the code used for the admin panel to a separate file and simply provide an include in the function that loads the admin panel. For example, say you load in your admin panel using this code: add_options_page(‘Plugin Name’, ‘Plugin Name’, 10, basename(__FILE__), ‘printAdminPage’); The function printAdminPage is going to be the function that loads the admin panel. Within this function you could have: function printAdminPage() { include […]

[Continue Reading...]

Adsense with Rounded Corners

7
responses
by
on
July 6th, 2007
in
Blogging News, HOW-TO, LinkyLoo

Google Adsense Ad Border with Rounded Corners: Apparently I was snoozing when this feature was released by Google but now you can have rounded corners on your Google AdSense ads. This could be a good way to increase your CTR, especially on blogs with AdSense blindness. I can see people coming up with very creative variations of the borders and colors to attract more attention to AdSense ads. I first noticed it on Google Blogoscoped while reading their article on AdSense Referrals.

[Continue Reading...]

Dissecting a Plugin: Better Comments Manager

8
responses
by
on
June 18th, 2007
in
HOW-TO, WordPress Plugins

One question I’ve been receiving a lot lately is regarding editing or traversing WordPress plugin code. The question more-or-less is, “Where do I start?” It’s a hard question to answer since every plugin is different, but there are a few ways to get a handle on how a plugin works. I feel a real-world application is needed to show how to edit plugin code, so I am going to periodically dissect a plugin and show you the innards by adding in a few simple features. The first plugin to be dissected is called Better Comments Manager (version 1.2). Ajay did a good job reviewing the Better Comments Manager plugin, so I suggest you check out the review to get a good overview of the plugin. In this dissection, we will be adding/modifying two simple features to the plugin: Disable the scrolling effect when replying to a comment. Add the panel […]

[Continue Reading...]

CSS for code: Wrap long lines

15
responses
by
on
June 16th, 2007
in
Code, HOW-TO, WordPress

If you post code on your WordPress blog, you could use a code beautifier plugin such as syntax highlighter or you could include your code in <pre> tags. They preserve line breaks, multiple blanks, tabs between words and other formatting commonly used in code. However, in some cases, if body of your blog is narrow(er) or your line of code is really long, it will not wrap and will overflow over your sidebar. You can just hide the overflow but that still will look tacky and not very usable. On performing a little search, I discovered that Tyler Longren had already come up with a clever hack to solve the problem. If you add the following code to your stylesheet, it will wrap the long lines of code. pre { white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: […]

[Continue Reading...]

Make the web a cleaner place : adopt a Honey Pot

19
responses
by
on
May 3rd, 2007
in
HOW-TO, Spam, Web Ethics, WordPress Plugins

A few days ago, Project Honey Pot introduced a new service, http:BL, “a system that allows website administrators to take advantage of the data generated by Project Honey Pot in order to keep suspicious and malicious web robots off their sites”. A honeypot is a trap set to detect email havesters and spam robots : this should ring a bell to most bloggers, I guess. The beauty of Project Honey Pot is that anyone can contribute : just register an account, download the script and put it somewhere on your blog. It’s been more effective than I would have thought and wished : the day I had my first honeypot installed, it detected a new and before unseen comment spammer. Contributing to this project is an easy way of making the web a cleaner place, and it will also benefit to another WordPress related spam-fighting project : the almighty Bad […]

[Continue Reading...]

Install WordPress on a USB stick

17
responses
by
on
March 8th, 2007
in
HOW-TO, LinkyLoo, WordPress, WordPress FAQs

How to install WordPress on a USB stick takes you through installing and configuring XAMPP-Lite to install WordPress on a USB. Infact, you can follow the guide it on your hard disk as well.

[Continue Reading...]

WP Translations: mo and po files

9
responses
by
on
March 6th, 2007
in
General, HOW-TO, WordPress, WordPress FAQs

You can install WordPress in various different languages and it is very easy to setup these translations. You can find more information on translating WordPress into your own language on the WordPress Codex. The Codex also has a lot of information on existing translated versions of WordPress and the .mo language files. They are very simple to use. You just copy the .mo file to the wp-includes/languages folder and change/add the following line to add the filename of your language translation file define (‘WPLANG’, ”); to define (‘WPLANG’, ‘es_ES’); if your language filename is es_ES.mo I suggest making this change before you install WordPress. This is all well and good, but this post is more about dispelling some of the myth and confusion surrounding .mo files. .mo files are not human readable by their nature and cannot be edited directly. You would need to install a version of poedit on […]

[Continue Reading...]

How To: Install mod_security

14
responses
by
on
March 4th, 2007
in
HOW-TO, WordPress FAQs

mod_security is a well known web application firewall for Apache that is easy to setup and provides a fair amount of protection from web malware and can even provide some protection from comment spam. The benefits of mod_security have been discussed over and over again and with the recent unforeseen problems with WordPress (In case you have not heard about it, if you have not upgraded your WordPress 2.1.1 installation, you need to do it NOW), mod_security would have provided a level of security if it was installed. Since I had to install mod_security on one of my servers, the steps are fresh in my mind and worth a post. All of the steps below are assuming that you have some sort of a LAMP installation over which you have complete control. If you are on a shared host on LAMP, you will have to ask your provider to install […]

[Continue Reading...]

Upgrade WordPress via Shell

10
responses
by
on
March 3rd, 2007
in
HOW-TO, LinkyLoo, WordPress, WordPress FAQs

Upgrade WordPress via Shell guides you to upgrading your existing WordPress installation to the latest one if you have shell access to your hosting account. And if you haven’t upgraded to 2.1.2 yet, then please do so immediately to ensure that your WordPress 2.1 installation doesn’t get compromised.

[Continue Reading...]



Obviously Powered by WordPress. © 2003-2013

css.php