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 - RateU - 2010-01-28

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



RE: PHP in Templates and Template Conditionals - dan4 - 2010-01-29

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>



RE: PHP in Templates and Template Conditionals - Solstice - 2010-01-30

how add avatar and another features to the showteam list


RE: PHP in Templates and Template Conditionals - Yumi - 2010-01-31

There's no *good* way to do that with this plugin.


[RESOLU] RE: PHP in Templates and Template Conditionals - dan4 - 2010-02-01

(2010-01-31, 04:40 AM)Yumi Wrote: There's no *good* way to do that with this plugin.

for me is ok.


RE: PHP in Templates and Template Conditionals - RateU - 2010-02-01

Fantastic. This plugin works in MyBB 1.6 SVN. Thank you very very much, Yumi.


RE: PHP in Templates and Template Conditionals - Rafael - 2010-02-06

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.


RE: PHP in Templates and Template Conditionals - daakurai - 2010-02-08

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


RE: PHP in Templates and Template Conditionals - RateU - 2010-02-09

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.


RE: PHP in Templates and Template Conditionals - bosss - 2010-02-26

Hello

i think that your plugin have some wrong string

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




it is on line 43 ...

regards

bosss