February 23rd, 2010
admin
For a client of mine, i’ve been using the PEAR-package HTML_QuickForm which is ’superseded’ by now and isn’t compatible to php 5.2, whereas the followup package HTML_Quickform2 is still in alpha state. Since the client switched his server and that is running php 5.2, i had to come up with a new solution. I tried out many wordpress contact-form-plugins but they all did not satisfy me fully.
The only form-plugin that i truly would recommend is cForms II. It is flexible, can handle more than one form template. Forms can be inserted via template files or via tags inside posts or pages. I think this is the only plugin that supports individual Fieldsets (this can be very handy for designing complex layouts). The verification of the user input is done with very individual regular expressions. The admin can set Form field name, tooltip and default value and even let the default value be auto-cleared once the form field is activated. cForms II supports multi-page forms (which i didn’t use, though) and it can autoconfirm emails to the user (which i didn’t use either). Spam detection is done not only with the individual regular expressions, but also with a captcha-plugin or alternativey with a simple Q&A-field (like, ‘what color is snow?’). The possible questions for the Q&A field can be set manually. You can even backup and restore the form settings! Furthermore the admin can chose from a dozen css-layouts and manually change them.
Here are the other plugins, that i tried out:
- Contact Form 7: It didn’t seem to have a template tag, that i could use in the theme files.
- Form Builder: Very bad design. It features div-tags that are floated. If your design uses floating objects, it will break it or be broken itself!
- Scaleable Contact Form plugin: Nearly no option to verify the user input. Supports Captcha, but it uses the plugin “simple captcha” for that, which doesn’t seem to support wordpress 2.9.
- Spam-Free Contact Form: simply crap. don’t use that.
- Visitor Contact: only interesting, if you like using external web applications on your own blog.
December 18th, 2008
admin
For quite some time, i had a problem getting pingbacks and trackbacks working. Receiving them wasn’t a problem, but i couldn’t send any. It seems, i’m not alone and no where were any answers to be found..
I think i found the problem: the function spawn_cron (/wp-includes/cron.php, 153) opens a socket to then wp-cron.php file after adding a new scheduled item. For that reason it runs the function wp_remote_post which also accepts a timeout parameter. That parameter is set to 0.01 by default. I guess these are seconds (which means these are 10 milliseconds!) and for some webservers this value is simply too small. Change that to something bigger (i’m using 0.1 or 1) and pingbacks and trackbacks should work again..
Now what about the old trackbacks and pingbacks that didn’t get sent? Actually you’ll simply need to write a new post and all the old unsent pings should be scheduled for sending. If you don’t want to do that, you could install the plugin Wp-Crontrol where you can specify a hook to be scheduled to a specific time. Schedule the hook “do_pings” to be triggered any time soon (parameter should be empty = “[]“) and it should take care of the old pingsbacks.
December 11th, 2008
admin
The final version of wordpress 2.7 “Coltrane” has been released. I’ve kept this blog up to date and switched from trunk to 2.7-branch now for fear that the stability held up until now won’t be kept up. I’ve also updated my main blog. The only thing that is bugging me is the notice at the top of the blog telling me to upgrade to please WordPress 2.7, even though the blog is long updated.. A last-minute bug?
It’s really funny at the dashboard, where it literally says “You have version 2.7. Would you like to upgrade to version 2.7?”

upgrade27
Anyway, the team of Automattic has again done a great job with this version. I’m totally happy with it. Thanks guys.
November 17th, 2008
admin
Ich hatte Probleme damit, Gengo und Wordpress 2.7 gemeinsam zum Laufen zu bringen und die Option zum Anhängen von Sprachkürzeln in Gengo zu aktivieren (Gengo should append language codes to permalinks automatically.), da Gengo in eine Endlos-Weiterleitungsschleife ging. Ich dachte schon, das wäre eine grundsätzliche unverträglichkeit zwischen den beiden und schaltete deswegen diese Option aus, was dazu führte, dass sämtliche Links nicht mehr funktionierten. Joshreisner schlägt dagegen im Forum auf wordpress.org vor, die Permalink-Strukturen neu zu speichern.
Und tatsächlich geht man auf Einstellungen>Permalinks und speichert einfach die bereits gespeicherte Permalink-Struktur neu, dann geht das Problem der Endlosschleifen weg! Es hat wahrscheinlich damit zu tun, dass Gengo beim Speichern der Permalinks selbst eine Aktion durchführt.
November 17th, 2008
admin
I had an issue with gengo getting into an endless redirect loop once i activate the option “Gengo should append language codes to permalinks automatically.”. I thought this was an issue of gengo-compatibility and deactivated the option making many links unusable. Now i just found this thread over at wordpress.org where joshreisner suggests simply saving the permalink structure again:
i just upgraded to 2.6.1 using the automatic updater and it caused a redirect loop on my site. whenever i would visit it it would be like “the address /en/en/en/en/en/en/en etc was in a repeat loop that would never be resolved”
i pulled my hair out for a minute but then figured it out. just go to the permalinks settings page (in wp, not gengo) and hit save. no change, just save. that fixed the problem!
Thanks. This works. It seems gengo uses some action that is being pulled once the permalink structure is saved..
Quick note: Version 2.7 of Wordpress is coming soon. Ryan has announced the feature freeze. This blog has been running the trunk-version that has been leading to 2.7 for quite a while now. Part of it is to be on top of things, but also to be able to test wp-stattraq with 2.7. And: it still works!
Oh! And the interface doesn’t look like this yet:

but like this:

I just found out, that there is a problem with running the woopra wordpress plugin together with gengo. Gengo is the multilingual plugin running in the background of this blog. Woopra is an external statistics program that has a nice wordpress plugin (which by the way is looking for some translation work itself).
Anyway, when i activate the woopra-plugin it says
Fatal error: Call to a member function wp_rewrite_rules() on a non-object in /var/www/oan/htdocs/wp-includes/classes.php on line 145
First, i thought it’s a compatibility thing with wordpress 2.7 (right now: “2.7-almost-beta), but it seems to work when i deactivate gengo. I found this quote on the gengo-blog which i am quoting since the site has some database problems:
If that happens, the plugin you just activated has been written incorrectly. It is trying to set its language too early, before Gengo has loaded. The solution is an easy one – the call to load_plugin_textdomain() in the plugin must be moved so that it is run on the ‘init’ hook. Do your plugin author a favour – drop them an email letting them know the problem and see if they’ll fix it – many authors don’t know that this is even a problem! Make sure you’re polite when you do, though. From personal experience, I can tell you it’s not pleasant to receive an angry email from a stranger, demanding that you fix something that you’ve released for free.
Hope, someone from over at woopra can change the code accordingly. Meanwhile i’m relying on the stattraq-plugin..
September 17th, 2008
admin
I’ve nearly finished the website emirates-mosaic.ae, which enables the customers searching for mosaic art to buy those created by this very artist.
The request was to create a gallery as the main theme of the site and to build some rather static pages around it to explain more about mosaics and how to buy them and such. Furthermore a list of favorite mosaics was to be placed at the right side of the screen.
After considering many platforms, i decided to use wordpress and to extend it’s normal behavior to include the mosaic gallery. Right now, there is no blog on the site so every blog post (technically) is a mosaic-article.
What’s special?
There were some features that had to be incooperated into the whole thing, like a special gallery-shortcode. So instead of putting the shortcode ‘gallery’ into a post, i include the custom shortcode [mosaicg] which includes all the images in the gallery of the post and includes links to the images themselves (not to their respective attachment pages). They’re also formated in a different way: first image is shown as ‘medium’-sized, all others are thumbnails.
Rather than creating own plugins, i included the code for the shortcode and some special widgets into the functions.php of the theme. I think this feature of wordpress should be preserved as it enables a theme developer to easily imitate a plugin and to change the behavior of wordpress fundamentally.
The following plugins were used:
- All in One SEO Pack – that’s a must for most sites
- cforms – For making an offer
- Featplug – for displaying the featured mosaics
- Google Sitemaps – very useful to get different search engines to know your site completely.
- jQuery Lightbox – i changed it to fit the needs here
- StatTraq – the statistics plugin that i myself am maintaining
- Stattraq Queries – a little something i call SEO-wonder. will be released shortly.
- Wordpress Navigation List Plugin NAVT – WOW! You wanna ‘click’ your navigation together and display only those pages/categories/etc. that you want? This is the plugin for you! Honestly, i didn’t expect someone to have the time to code this really awesome plugin
- Wordpress Newsletter subscription Opt-in for SendBlaster – maybe will change that..
Go have a look at emirates-mosaic.ae and tell me, if there’s something not working.
The Wordpress Navigation Tool (NAVT) enables the creation of highly customized and easy to adjust menus. This is some nice coding by Atalaya Studio!
On my main site i've been using the footnotes plugin extensively. I like putting footnotes into the text and signalizing, what I'd rather say, but would not out of respect for the reader. In general placing extended information - be it a citation or an extension to the main text - is a nice way of writing. The plugin i'm using for that is wp-footnotes.
The problem is: for many readers it's hard to read the footnotes especially if they're at the end of a large article. I thought, i would script a little bit and found myself writing the following javascript-snippet which is based on the jQuery-library:
JAVASCRIPT:
-
jQuery(document).ready(function () {
-
jQuery("a[href^='#footnote-'][id^='footnote-link']").each(function () {
-
aa = jQuery(this);
-
jQuery(jQuery(this).attr("href")).clone().find("a:last").replaceWith("<a href=\"" + aa.attr("href") + "\">»</a>").end().contents().wrapAll("<span class='activefootnote'></span>").parent().insertAfter(aa);
-
});
-
});
Update: wp-Footnotes 3.3
Version 3.3 of wp-footnotes formats the footnote-links differently and therefor our selector has to change. This is the new code:
JAVASCRIPT:
-
jQuery(document).ready(function () {
-
jQuery("a[href*='#footnote_'][id^='identifier_']").each(function () {
-
aa = jQuery(this);
-
href = aa.href("href");
-
pos = href.indexOf('#');
-
len = href.length;
-
jQuery(href.substr(pos,len)).clone().find("a:last").replaceWith("<a href=\"" + aa.attr("href") + "\">»</a>").end().contents().wrapAll("<span class='activefootnote'></span>").parent().insertAfter(aa);
-
});
-
});
This inserts a span after the footnote number inside the article, which can then be shown or hidden on the spot. To support that effect, the following css-code should be present:
CSS:
-
span.activefootnote {
-
display: none;
-
}
-
sup {
-
position: relative;
-
}
-
sup:hover span.activefootnote {
-
display: block;
-
position: absolute;
-
background: #fff;
-
border: 1px #000 solid;
-
top:-.5em;
-
left:-100px;
-
width: 200px;
-
}
To make it look nicer, i've expanded the css-code to the following:
CSS:
-
span.activefootnote {
-
display: none;
-
}
-
sup {
-
position: relative;
-
}
-
sup:hover span.activefootnote {
-
display: block;
-
position: absolute;
-
background: #eaeace;
-
border: 3px #ccc solid;
-
top:-.5em;
-
left:-100px;
-
width: 200px;
-
font-size: 1.2em;
-
padding: 6px;
-
border-radius: 10px;
-
-moz-border-radius: 8px;
-
border-radius: 1em;
-
-moz-border-radius: 1em;
-
opacity: 0.95;
-
}
Maybe Simon Elvery will integrate this code into his plugin.. I think this would be a nice addition. You can see the effect at this article of mine. Just hover over one of the many footnote-numbers..