MyBB Community Forums

Full Version: PHP in Templates and Template Conditionals
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Thanks that worked perfectly.
very good zinga,
it provides more flexibility in teplates
great work
Thanks.

I thing, only Template Conditionals is really needed.

run PHP in template is shouldn't for security reasons.
(2009-04-15, 03:24 AM)ChangUonDyU Wrote: [ -> ]Thanks.

I thing, only Template Conditionals is really needed.

run PHP in template is shouldn't for security reasons.
You can still actually run PHP from within the template conditionals, so it really isn't much more secure. The system would require some way of detecting "dangerous" conditionals which can be potentially problematic...
I cant get this plugin to work.
I activated the plugin and added this line to a template:

<?php
echo "code runned.";
?>

But I just see the full PHP-code in the source of my website.
Any idea why?
Can you reproduce this on a clean board? If so, can you give step by step instructions on how to reproduce your issue? Thanks.
Is there a list of available conditions somewhere?
Hi Yumy thanks for the great plugin!

I'm using it for not to see as admin my google adsense ads and accidentally click on them.

<if $GLOBALS['mybb']->user['usergroup'] == 4 then>Hello juliusb!<else>
ADSENSE CODE
</if>

I put this in my header and showthread templates. Do you think it slows down my forum?

Thanks
juliusb
(2009-05-19, 09:09 AM)juliusb Wrote: [ -> ]I put this in my header and showthread templates. Do you think it slows down my forum?
The majority of plugins will slow down your forums. As to what extent really depends.
From what I read, this allows me to use other stuff like {$header} or {$forums} and so on. Is it? And also run PHP codes in templates right?
But where do I upload this? /inc/plugins/? And then, I upload it.. and.. it's done? Am I ready to use it or do I have to do something else?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22