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
Change the default for the column in phpmyadmin for the table.
Not sure if this is correct, but this makes more sense:
    <td align="center" class="{$bgcolor}" width="2%"><if !$icon then><img src="images/icons/smile.gif"></if>{$icon}</td>
(2009-12-09, 09:42 AM)Yumi Wrote: [ -> ]Not sure if this is correct, but this makes more sense:
    <td align="center" class="{$bgcolor}" width="2%"><if !$icon then><img src="images/icons/smile.gif"></if>{$icon}</td>

Not work neither
[attachment=16451]
I love this plugin! Thank you very much. Big Grin
Uhmm i tried to install it on my Forum (v 1.4.10) and it make a blank page .. No error , nothing .. What's the problem ?


SORRY FOR MY BAD ENGLISH I'M FRENCH !
I advise you to turn on PHP errors, making sure they show up, if I were you.
Hello

PHP version :
$code="blablabla";
<a href="http://domain.com/index.php?<?php echo $code; ?>">link</a>
How to in templates mybb ?

Template MyBB version :
{$code="blablabla";}
<a href="http://domain.com/index.php?{$code}">link</a>

is ok?

I'm french...sorry
Well firstly, your PHP code isn't even valid.
It would be something like this, both for PHP and this plugin:
<?php $code="blablabla"; ?>
<a href="http://domain.com/index.php?<?php echo $code; ?>">link</a>
I added a plugin PHPtpl.php and there it works well.
This location url for this plugin:
Plugin phptpl

Thanks for your reply.

(2010-01-28, 11:57 AM)Yumi Wrote: [ -> ]Well firstly, your PHP code isn't even valid.
It would be something like this, both for PHP and this plugin:
<?php $code="blablabla"; ?>
<a href="http://domain.com/index.php?<?php echo $code; ?>">link</a>
Guess I posted previously in the wrong category :

I have installed this plugin and I would say its awesome.
What I am trying to achieve is something like this :

If forum id = X then this else bla bla

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