On occasion, I am prone to hacking on the software I use – mostly to scratch an itch. This Wordpress page is a gathering point for the various patches etc that I’ve decided to make available for anyone else to use.
Gallery 1.5, Wordpress 2.0 and stripslashes_deep conflict in random blocks
[2006-02-12]
Due to both Gallery and Wordpress implementing stripslashes_deep(), using the standard include() method to get the random block functionality causes some headaches (function already defined).
<?php
$r = file_get_contents('http://localhost/gallery/block-random-enhanced.php');
?>
<li id="photo"><?php _e('Photo:'); ?>
<ul>
<li><?php echo $r; ?></li>
<>
</li>
The snippet above in the theme PHP file solves the problem in PHP 5. Solution originally posted on the Gallery forum.
ExifTool support for Gallery 1.5.4
[2006-08-16]
The original version of this code was posted on the Gallery forum, and was for version 1.5.1 of Gallery. This version updates the code to work with Gallery 1.5.4 – the original patches will fail due to massive code changes.
To utilise this patch, you need to add ExifTool to your server, and
$gallery->app->exiftool = "/usr/bin/exiftool";
to your config.php file. Then apply the patch at the root of your Gallery 1.5.4 installation – I suggest making backups of util.php and view_photo.php in case of problems.
Comments
Leave a comment Trackback