MyBB Community Forums
PHP in Templates and Template Conditionals - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: PHP in Templates and Template Conditionals (/thread-31860.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: PHP in Templates and Template Conditionals - vat0r - 2009-02-10

Thanks that worked perfectly.


RE: PHP in Templates and Template Conditionals - ghazal - 2009-04-09

very good zinga,
it provides more flexibility in teplates
great work


RE: PHP in Templates and Template Conditionals - ChangUonDyU - 2009-04-15

Thanks.

I thing, only Template Conditionals is really needed.

run PHP in template is shouldn't for security reasons.


RE: PHP in Templates and Template Conditionals - Yumi - 2009-04-15

(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...


RE: PHP in Templates and Template Conditionals - mammut - 2009-04-17

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?


RE: PHP in Templates and Template Conditionals - Yumi - 2009-04-17

Can you reproduce this on a clean board? If so, can you give step by step instructions on how to reproduce your issue? Thanks.


RE: PHP in Templates and Template Conditionals - Anman - 2009-05-12

Is there a list of available conditions somewhere?


RE: PHP in Templates and Template Conditionals - juliusb - 2009-05-19

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


RE: PHP in Templates and Template Conditionals - Yumi - 2009-05-19

(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.


RE: PHP in Templates and Template Conditionals - faviouz - 2009-05-24

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?