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
(2010-01-28, 02:08 PM)HubSeo Wrote: [ -> ]I have installed this plugin and I would say its awesome.

Yes, this is an amazing plugin.

(2010-01-28, 02:08 PM)HubSeo Wrote: [ -> ]What I am trying to achieve is something like this :

If forum id = X then this else bla bla

I think you can do that like this:

<if $forum['fid'] == X then>
This
<else>
bla bla
</if>
Thanks you!!

(2010-01-28, 07:41 PM)RateU Wrote: [ -> ]
(2010-01-28, 02:08 PM)HubSeo Wrote: [ -> ]I have installed this plugin and I would say its awesome.

Yes, this is an amazing plugin.

(2010-01-28, 02:08 PM)HubSeo Wrote: [ -> ]What I am trying to achieve is something like this :

If forum id = X then this else bla bla

I think you can do that like this:

<if $forum['fid'] == X then>
This
<else>
bla bla
</if>
how add avatar and another features to the showteam list
There's no *good* way to do that with this plugin.
(2010-01-31, 04:40 AM)Yumi Wrote: [ -> ]There's no *good* way to do that with this plugin.

for me is ok.
Fantastic. This plugin works in MyBB 1.6 SVN. Thank you very very much, Yumi.
Hi,

I want to add a condition to a content in the header of MyBB.

I have enabled the PHP and templates conditionals and I need to add the code manyally, here is the code:

<if condition="!in_array($GLOBALS[forumid],array(2))">
Here is the content.
</if>

What I want to do is enable the code with the exception of the array code in this case 2.

Thanks.
(2009-05-12, 09:36 PM)Anman Wrote: [ -> ]Is there a list of available conditions somewhere?

Yeha I support u

Im so interesting on this plugin and i need to know all available conditions... so anybody has it?
I think it is a bit hard to list all available conditions. As long as we know what variable loaded in a page or in a template, I think we can use it as condition in that page or in that template, depend on what condition needed. And we can find some variables in the templates too.
Hello

i think that your plugin have some wrong string

else
					return parent::get($title, $eslashes, $htmlcomments);
			}
		}
	');




it is on line 43 ...

regards

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