Google Maps Suggest – Address-Autocompletion with Scriptaculous

Many uses autocompletion on their website. It’s not only an impressiv but also a very user-friendly feature. It can also help to have valid data within a form. But you always have to validate the data on the server before saving them.

Today I want to show you, how easy you can create a autocompletion for Google-Maps-Addresses using Scriptaculous. As you can’t access an external website with an AJAX-Request, we have to use a small Skript as a gateway between Google Maps an your website. So let’s start with this server-side script this time:

Read more →

Best practice for creating WordPress plugins

Now that I’ve already written three WordPress plugins, and even use many other plugins, I have noticed some things that should be considered when creating a plugin. Due to the fairly extensive WordPress Plugin API creating a plugin isn’t very complex, but unfortunately, most of the plugins lack quality. So everyone who wants to create a plugin should care about certain things.

Create something new

The hardest part is probably to find a good idea for a new plugin. The three plugins I have written were founded by a specific need. A certain feature wasn’t included in the main features of WordPress and there was no plugin in sight, that could offer this feature.

Read more →

Transcending the boundries of frame redirects

Many hosters offer cheap domains without a webhosting package. Some of those hosters e.g. Strato only give you the option to use a frame redirect with this domains. But sometimes you can’t see that restriction when you order the domain.

Some might be happy, as they have a free hosting package with a very long URL, so they can use the frame redirect to only present a short URL to the visitors. But there’a a catch with frame redirects.

Read more →

Kau-Boy’s Comment Notification Plugin

This plugin enables blog admins and editors to manage the notification of incomming comments. As WordPress only has the option to notify on every comment, the email account of the admin may recieve many email each day. Notification is also limited to the admin only, so only the admin user will recieve an email for incomming comments.

Using the plugin you can subscribe to a RSS feed that contains even comments that has to be moderated. Every feed entry has the links to delete a comment, mark a comment as spam or approve a comment, if the comment has to be moderated. If a comment has been marked as spam, it will no longer appear in the feed.

Read more →

Install WordPress on a server with Plesk

My blog runs on a virtual server with plesk as administration tool. Installing the blog I had some issues with file permissions. On the wordpress website you can find a tutorial to change file permissions, but it doesn’t answer all problems with a system that has Plesk installed.

At first you have to decide where to install the blog. You can choose one of your domains or a subdomain. You might have to create it and activate the PHP support before.

Read more →

Mark external links with CSS3

Who doesn’t know the problem with external links. You don’t want to expect target=”_blank” to your users so you let open links in the same window. To enable users to see that a link is external, you want to mark them. So a user can than decide to open it eventually in a new window/tab themselves.

I have seen multiple solutions for this problem. Some have been executed server-side, some of them used heavy JavaScript function client-side. Most of the time, the scripts searched for all links within a page to change them afterwards.

Read more →

Kau-Boy’s Backend Localization Plugin

This plugin enables you to run your blog in a different language than the backend of your blog. So you can serve your blog using e.g. German as the default language for the users, but keep English as the language for the administration.

Installation:

Installation trough WordPress admin pages:

  1. Go to the admin page Plugins -> Add New
  2. Search for kau-boy and choose the plugin
  3. Choose the action install
  4. Click on Install now
  5. Activate the plugin after install has finished (with the link or trough the plugin page)
  6. You might have to edit the settings, especially the language you want to use

Installation using WordPress admin pages:

  1. Download the plugin zip file: kau-boys-backend-localization.1.6.zip
  2. Go to the admin page Plugins -> Add New
  3. Choose the Upload link under the Install Plugins headline
  4. Browse for the zip file and click Install Now
  5. Activate the plugin after install has finished (with the link or trough the plugin page)
  6. You might have to edit the settings, especially the language you want to use

Installation using ftp:

  1. Download the plugin zip file: kau-boys-backend-localization.2.0.3.zip
  2. Unzip und upload the files to your /wp-content/plugins/ directory
  3. Activate the plugin through the Plugins menu in WordPress
  4. You might have to edit the settings, especially the language you want to use

Screenshots:

Screenshot of the settings page

Screenshot of the settings page

Screenshot of language switcher in admin menu (similar to qTranslate switcher)

Screenshot of language switcher

Screenshot of language selection on login form

Screenshot of language selection on login form

Change Log:

  • 1.6 Add WP3 CSS class for the language select on the login form
  • 1.5 Fixing the plugin for WordPress 3.0 MULTISITE feature
  • 1.4 Fixing the plugin for WordPress MU and fixing the login form selection
  • 1.3 Make the plugin working with PHP4. Thanks to David for the fix!
  • 1.2.1 Replace the do_action() function with the add_action() function for admin_menu to avoid issues with other plugins
  • 1.2 Adding support for new languages
  • 1.1 Removing “short open tags” which causes error on blog that don’t have “short_open_tag” set to “On”
  • 1.0 Adding language switcher to admin menu and option to hide language selection on login form
  • 0.6 Saving language setting in cookie to enable different languages for multiple users
  • 0.5 Adding language selection to login screen
  • 0.4 Display all languages that are installed in the WordPress language folder
  • 0.3 Activate new language after saving settings (no more need to refresh)
  • 0.2 Adding German translation for settings page
  • 0.1 First stable release

If you like the plugin or if something is missing I would like to here it. Just leave a comment on this page or on my WordPress plugin page.

PayPal - The safer, easier way to pay online! PayPal - The safer, easier way to pay online!

The magical select() function!

In my previous post about the Line-Duplicater I had to find specific tags within a DOM element. As I found nothing in the Utility Methods I had to use the getElementsByTagName() function. But only with this function I couldn’t solve the problem. I also had to use the $A() function to get an array of the elements. The result for all there form input types looked like that:

$A(newRow.getElementsByTagName('select')).invoke('clear');
$A(newRow.getElementsByTagName('textarea')).invoke('clear');
$A(newRow.getElementsByTagName('input')).each(function(elm){
	elm.clear().checked = '';
}); 

Read more →

Simple Line-Duplicater with Prototype

Many programmers might have the problem with form where multiple input lines should be possible for one field. Most of the time this is solved by using multiple text inputs which are arranged in a table. To give the visitor the ability to add another line, most of the forms are “submitted” but without runnig the saving algorithm. Afterwards the form is reloaded with an additional line.

But thankfully we are much further today. A solution with JavaScript was even possible in the past, but with the use of modern JavaScript frameworks like Prototype the whole problem can be solved with a single line of code:

Read more →

Form preview with jQuery Thickbox

English Translation will be following by tomorrow!

For one of my projects I had to implement a small form preview. As I am very satisfied with the result and the simplicity, I want to share the result with you.

The preview functions uses the jQuery framework and it’s plugin Thickbox. The use of Thickbox is only one alternative to implement a preview. Basically the building is quite simple.The JavaScript function sets the target and the action attribute of the form and sends the data to the defined target. The target can be a new tab or as in this exmple a iFrame which will be displayed in the Thickbox.

Read more →