hey guys,
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?
after that i stop customizing my blog
cheers
php code in sidebar
Re: php code in sidebar
Here you find a PHPbox-Sidebar-PlugIn: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?
http://board.s9y.org/viewtopic.php?p=2315#2315
Oliver
thanks for the link, but it is not working I get the error
Any idea. Is it perhaps because the script was written for an older version of s9y?
Starting from Line line 68 the script saysFatal error: Call to a member function introspect() on a non-object in /home/httpd/htdocs/xxx/include/admin/plugins.inc.php on line 68
Code: Select all
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.
}
}
?>
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
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
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/
# 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.
otherwise it works fine.
cheers
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.
otherwise it works fine.
cheers