This is what I need I think. I'd like to put a random thumbnail of my 1.74 gallery into my wordpress 2.31 blog in the new k2 template sidebar. I have random.php working
http://www.maui-tropica.com/maui-tropica-gallery/random.phpbut when I insert:
<?php
include("
http://www.maui-tropica.com/maui-tropica-gallery/random.php");
?>
into the sidebar I get these errors:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/bigwave/public_html/hawaii-agriculture/hawaii-agriculture-blog/wp-content/themes/k2/app/modules/php.php(7) : eval()'d code on line 2
Warning: include(
http://www.maui-tropica.com/maui-tropica-gallery/random.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/bigwave/public_html/hawaii-agriculture/hawaii-agriculture-blog/wp-content/themes/k2/app/modules/php.php(7) : eval()'d code on line 2
Warning: include() [function.include]: Failed opening '
http://www.maui-tropica.com/maui-tropica-gallery/random.php' for inclusion (include_path='.:/usr/lib/php') in /home/bigwave/public_html/hawaii-agriculture/hawaii-agriculture-blog/wp-content/themes/k2/app/modules/php.php(7) : eval()'d code on line 2
I'm very new at this. Is there something I should change in php.php to get this mod functioning or is it just not happy? This mod is obviously the result of lots of hard work--thanks for the effort! Here is my php.php code I case sombody knows the fix for my situation:
<?php
function php_sidebar_module($args) {
extract($args);
echo($before_module . $before_title . $title . $after_title);
eval(' ?>' . sbm_get_option('code') . '<?php ');
echo($after_module);
}
function php_sidebar_module_control() {
if(isset($_POST['php_module_code'])) {
sbm_update_option('code', stripslashes($_POST['php_module_code']));
} ?>
<p>
<label for="php-module-code"><?php _e('Module\'s code:', 'k2_domain'); ?></label><br />
<textarea id="php-module-code" name="php_module_code" rows="6" cols="30"><?php echo(wp_specialchars(htmlspecialchars(sbm_get_option('code'), ENT_QUOTES), 1)); ?></textarea>
</p>
<?php
}
register_sidebar_module('Text, HTML and PHP', 'php_sidebar_module', 'sb-php');
register_sidebar_module_control('Text, HTML and PHP', 'php_sidebar_module_control');
?>
Thanks very much!