AuthImage Hack with WordPress 1.0.2
October 28th, 2004 18:16 by MartinAs I have been blogspammed alot lately, I installed a nice hack by Gudlyf to avoid this. It was a bit tricky, but I would like to report that I got WP AuthImage Hack (v1.3.3) working with WordPress 1.0.2 by modifying a few things (see the README.txt first…):
As the _e() and __() functions are not declared in WP 1.0.2, just use echo instead of _e , and write
die('Error: xyz.');
instead of
die( __('Error: xyz.') );
Also (very important if you’re using wp-style-switcher), in authimage.php require the file authimage-hacks.php directly like this:
<?php
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH . 'authimage-hacks.php');
createCodeImage();
?>
instead of requiring it through my-hacks.php (because wp-style-switcher.php which is required in my-hacks.php uses functions.php and you’ll get a non-object error or something…)