easy question. prob. hard to work out. what I wanna do is to have a couple of lines of php code in the sidebar. I tried the html nugget sidebar plugin, it is not accepting php.
any ideas?
and another thing, i have a header image, is it possible to add a couple of lines to make a image map out of it? in the header image i wanna have a part of it to be a link to the index page. any ideas as well?
stifler wrote:easy question. prob. hard to work out. what I wanna do is to have a couple of lines of php code in the sidebar. I tried the html nugget sidebar plugin, it is not accepting php.
any ideas?
function generate_content(&$title)
{
global $serendipity;
$title = $this->get_config('title', $title);
$show_where = $this->get_config('show_where', 'both');
if ($show_where == 'extended' && (!isset($serendipity['GET']['id']) || !is_numeric($serendipity['GET']['id']))) {
return false;
} else if ($show_where == 'overview' && isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])) {
return false;
}
eval($this->get_config('content')); # Actualy this is the only BIG change to the HTML Block code.
}
}
?>
Any idea. Is it perhaps because the script was written for an older version of s9y?
It sounds as if your PHP code of the file is broken? Can it be your copy+paste for the file was wrong?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yes u were right. the code was broken. don't know what happende. now i can include php in the sidebar.
one more thing, if somebody uses the php sidebar plugin: when u paste the php-code in the editor make sure u switched to html mode. then paste it from your source without <?php and ?>. then click save and don't change back to the wysiwyg-mode before u didnt click save, otherwise the code will be changed and item like "" get changed into html quotes and so on and u get error messages. the problem is u can not change the code in the editor, u have to change it outside and then paste it every time as described. at least i did not find another way.