Topic: Can I do php in the announcement?

I wanna show a special test for my guests in my forum announcement, just an easy return statement. How can I do that?

FluxBB - v1.4.8

2

Re: Can I do php in the announcement?

best way would be to add a new box in a php file with your code in and called it 'file.php' and put it in include/user
then in include/template/main.tpl add below <pun_announcement>
<pun_include "file.php">

that should do what you want wink

Re: Can I do php in the announcement?

I want it in the announcement box.
Oh, would I have to do that in the header.php file then?

FluxBB - v1.4.8

Re: Can I do php in the announcement?

Mediator has already done all the work for you: http://www.punres.org/desc.php?pid=57 wink

Well, almost all of the work. If you don't want the regular announcement box to be shown to guests, you'll have to edit header.php to check if a user is logged in or not (try using $pun_user['is_guest']).

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Can I do php in the announcement?

Thanks, I found a mod for php in the announcement box, too.

FluxBB - v1.4.8

Re: Can I do php in the announcement?

Mark wrote:

best way would be to add a new box in a php file with your code in and called it 'file.php' and put it in include/user
then in include/template/main.tpl add below <pun_announcement>
<pun_include "file.php">

that should do what you want wink

i know this thread is a little old, but i just want to say that your advice worked perfectly for my little website.  thanks!