embed php into the sidebar

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
JulianDE
Regular
Posts: 13
Joined: Sat May 28, 2005 9:44 pm
Location: Germany

embed php into the sidebar

Post by JulianDE »

Hi,

I would like to embed some small php code into the side bar. The code is stored in a php file and displays the 5 recent posts in my phpbb board.

Is there a simple way to do that? Is the "external php app" plugin recommended? I've read something about a php bos plugin for the side bar but didn't find it.

Sorry for my poor (none) php knowledge.

thanks,

Julian
Oliver
Regular
Posts: 178
Joined: Mon Jan 10, 2005 7:43 pm
Location: Herne, Germany
Contact:

Post by Oliver »

Please have a look at this post: Phpbox :)

Regards,

Oliver
Image
JulianDE
Regular
Posts: 13
Joined: Sat May 28, 2005 9:44 pm
Location: Germany

Post by JulianDE »

Thank you Oliver,

but I suffer under the same problem as stated in the corresponding thread (parse error ......). I did not see this problem solved. Or do you know how?

Thank You,

Julian
Oliver
Regular
Posts: 178
Joined: Mon Jan 10, 2005 7:43 pm
Location: Herne, Germany
Contact:

Post by Oliver »

Did you include <?php and ?> in your phpbox? I use the box to show my counter and the code I use looks like this (example):

Code: Select all

$chCounter_visible = 1;
$chCounter_status = 'active';
include( '/is/htdocs/www.forum4winde.de/mods/chCounter3/counter.php' );
without <?php and ?>. You do not need start- and end-php-tag for the box :)

- Oliver
Image
JulianDE
Regular
Posts: 13
Joined: Sat May 28, 2005 9:44 pm
Location: Germany

Post by JulianDE »

Thanks Oliver,

I've pasted the code with and without "<?php ?>" but still get the same error. It might have something to do with the global variables as stated in the thread about the php box. But I don't know how I could modify the code in order to get it work. The code displays the 5 recent posts from phpbb board. The code can be integrated into any html page or can be run as standalone .php file. But doesn't work with the php box plugin. Do you have any idea?

thank you very much,

Julian
Post Reply