Hold the phone: The user levels in WordPress look like they’ve been changed – here’s how to fix it.
Not sure why but the Postie plugin for WordPress has a habit of pooping out bad HTML. I searched the support page for this and there are many fixes suggested but it doesn’t look like anyone has actually fixed the plugin itself. Here’s the fixes I did. They do break localization settings so if you are using WordPress in a language other than English, you might have problems.
In config_form.php – Search for all instances of the localization echo function it’ll look like this
< %php _e("Recommended");?>
And tweak it to just
Recommended
And then in postie-functions.php, find:
function BuildBooleanSelect($label,$id,$current_value,$recommendation = NULL) {
return("<tr>
<th scope=\"row\">". _e($label).":</th>
<td><select name=\"$id\" id=\"$id\">
<option value=\"1\">"._e("Yes")."</option>
<option value=\"0\" ". (!$current_value ? "SELECTED" : NULL) . '>"._e("No")."</option>
</select>
<br /><code>'._e($recommendation).'</code><br/>
</td>
</tr>');
}
and replace it with:
function BuildBooleanSelect($label,$id,$current_value,$recommendation = NULL) {
return("<tr>
<th scope=\"row\">".$label.":</th>
<td><select name=\"$id\" id=\"$id\">
<option value=\"1\">Yes</option>
<option value=\"0\" ". (!$current_value ? "SELECTED" : NULL) . '>No</option>
</select>
<br /><code>'.$recommendation.'</code><br/>
</td>
</tr>');
}
And also find:
function BuildTextArea($label,$id,$current_value,$recommendation = NULL) {
$string = "<tr>
<th scope=\"row\">"._e($label).":</th></tr>";
if ($recommendation) {
$string .= "<tr><td> </td><td><code>"._e($recommendation)."</code></td></tr>";
}
And replace it with
function BuildTextArea($label,$id,$current_value,$recommendation = NULL) {
$string = "<tr>
<th scope=\"row\">".$label.":</th></tr>";
if ($recommendation) {
$string .= "<tr><td> </td><td><code>".$recommendation."</code></td></tr>";
}
If anyone is familiar with why it breaks with localization, fix it!
Sorry have been swamped with work – so I haven’t been able to monitor Postie as much as I would like. There is a new verison out now that works on WP2.0 – and fixes all of these problems while still respecting the localization 🙂
Thanks to headgeek for all his work. I’m using 2.0 with the latest version of postie and still have the problems with it working with cron…
Are you still working on this plugin?
I get this error when I activate it 🙁
I am running WordPress 1.5.1.2
What am I doing wrong?
Help me please!