Gallery 1.5, WordPress 2, stripslashes_deep conflict (solution included)

cricalix

Joined: 2004-07-24
Posts: 9
Posted: Sun, 2006-02-12 21:02

I've recently upgraded from WordPress 1.5 to WordPress 2, and have found that the block-random include no longer works. This can be attributed to both Gallery and WordPress defining a function stripslashes_deep(), and thus PHP detects a conflict due to the fact I was including the block-random.php script in the sidebar.php file for the theme I use.

I've worked out that if I change to an iframe, I can embed the block-random script's output, but I lose all the formatting applied by the theme. I have also worked out that using PHP 5 gives me the handy file_get_contents(), and I have fopen wrappers enabled. Doing:

<?php
$r = file_get_contents('http://localhost/gallery/block-random-enhanced.php');
?>
 <li id="photo"><?php _e('Photo:'); ?>
        <ul>
                <li><?php echo $r; ?></li>
        </ul>
 </li>

Pulls in the data from the local server (which is fine for my usage, it's an internalish transfer) and spits it to the browser :)

 
Dick Knod

Joined: 2006-02-18
Posts: 20
Posted: Wed, 2006-07-05 15:29

So what is our question exactly ? .....

 
Dick Knod

Joined: 2006-02-18
Posts: 20
Posted: Wed, 2006-07-05 15:29

oh nvm u gave a solution for a problem hehe

 
cricalix

Joined: 2004-07-24
Posts: 9
Posted: Thu, 2006-12-21 14:08

You've quoted the solution in your query. Suggest removing dark glasses and re-reading the posting.