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?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → 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?
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
I want it in the announcement box.
Oh, would I have to do that in the header.php file then?
Mediator has already done all the work for you: http://www.punres.org/desc.php?pid=57
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']).
Thanks, I found a mod for php in the announcement box, too.
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
i know this thread is a little old, but i just want to say that your advice worked perfectly for my little website. thanks!
PunBB Forums → PunBB 1.2 troubleshooting → Can I do php in the announcement?
Powered by PunBB, supported by Informer Technologies, Inc.