Not Solved [How To?] PHP in forum description
#1
Not Solved
I'm wondering if this is possible. I have installed the "PHP and Template Conditionals" plugin for my theme, but it doesn't obviously affect forum description.

Is there any other plugin I can use?
Reply
#2
Not Solved
(2019-06-01, 11:44 AM)ShadowOne Wrote: I'm wondering if this is possible. I have installed the "PHP and Template Conditionals" plugin for my theme, but it doesn't obviously affect forum description.

Is there any other plugin I can use?

There's no need for a plugin. 

If you want to do something similar to what I have done on my website as shown in the screenshot, just follow the tabs.

[Image: 5ba2d1057e6b81e27735be0cc9b429cd.png]

To add a new document, which essentially creates a new page for your website... Do this.

[Image: e42b534acd5baacb029daf0700ffcf05.png]

Then... obtain the URL of that document and link that into your main forum page for all to click on.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
Deaf Golf
Reply
#3
Not Solved
can you tell us why you want to use php for the forum descriptions ..
Reply
#4
Not Solved
(2019-06-01, 12:34 PM)Serpius Wrote:
(2019-06-01, 11:44 AM)ShadowOne Wrote: I'm wondering if this is possible. I have installed the "PHP and Template Conditionals" plugin for my theme, but it doesn't obviously affect forum description.

Is there any other plugin I can use?

There's no need for a plugin. 

If you want to do something similar to what I have done on my website as shown in the screenshot, just follow the tabs.

-snip-

Then... obtain the URL of that document and link that into your main forum page for all to click on.

That's not what I need, sorry

(2019-06-01, 01:03 PM).m. Wrote: can you tell us why you want to use php for the forum descriptions ..

My need is placing some links inside description that have to be viewable (or not viewable) depending on user group. They have to be specifically inside description due to how I'm building my site.
Reply
#5
Not Solved
(2019-06-01, 03:53 PM)ShadowOne Wrote:
(2019-06-01, 12:34 PM)Serpius Wrote:
(2019-06-01, 11:44 AM)ShadowOne Wrote: I'm wondering if this is possible. I have installed the "PHP and Template Conditionals" plugin for my theme, but it doesn't obviously affect forum description.

Is there any other plugin I can use?

There's no need for a plugin. 

If you want to do something similar to what I have done on my website as shown in the screenshot, just follow the tabs.

-snip-

Then... obtain the URL of that document and link that into your main forum page for all to click on.

That's not what I need, sorry

(2019-06-01, 01:03 PM).m. Wrote: can you tell us why you want to use php for the forum descriptions ..

My need is placing some links inside description that have to be viewable (or not viewable) depending on user group. They have to be specifically inside description due to how I'm building my site.

You need a template conditional to do that.

See this thread here
https://community.mybb.com/thread-48224-...49330.html

<if $GLOBALS['mybb']->user['usergroup'] == 4 then>
stuff to show
</if>
Hey man, what's up?
Reply
#6
Not Solved
(2019-06-01, 03:57 PM)Michael2014 Wrote: You need a template conditional to do that.

See this thread here
https://community.mybb.com/thread-48224-...49330.html

<if $GLOBALS['mybb']->user['usergroup'] == 4 then>
stuff to show
</if>

That's fine, but the point is having that conditional executed inside forum description
Reply
#7
Not Solved
(2019-06-01, 04:00 PM)ShadowOne Wrote:
(2019-06-01, 03:57 PM)Michael2014 Wrote: You need a template conditional to do that.

See this thread here
https://community.mybb.com/thread-48224-...49330.html

<if $GLOBALS['mybb']->user['usergroup'] == 4 then>
stuff to show
</if>

That's fine, but the point is having that conditional executed inside forum description

Use the same conditional, because any user group that is not designated to view will be excluded.
Hey man, what's up?
Reply
#8
Not Solved
(2019-06-01, 04:04 PM)Michael2014 Wrote:
(2019-06-01, 04:00 PM)ShadowOne Wrote:
(2019-06-01, 03:57 PM)Michael2014 Wrote: You need a template conditional to do that.

See this thread here
https://community.mybb.com/thread-48224-...49330.html

<if $GLOBALS['mybb']->user['usergroup'] == 4 then>
stuff to show
</if>

That's fine, but the point is having that conditional executed inside forum description

Use the same conditional, because any user group that is not designated to view will be excluded.

If you try adding that code inside a description you will see that it is displayed fully, including the "ifs". That's the problem.
Reply
#9
Not Solved
(2019-06-01, 04:07 PM)ShadowOne Wrote:
(2019-06-01, 04:04 PM)Michael2014 Wrote:
(2019-06-01, 04:00 PM)ShadowOne Wrote:
(2019-06-01, 03:57 PM)Michael2014 Wrote: You need a template conditional to do that.

See this thread here
https://community.mybb.com/thread-48224-...49330.html

<if $GLOBALS['mybb']->user['usergroup'] == 4 then>
stuff to show
</if>

That's fine, but the point is having that conditional executed inside forum description

Use the same conditional, because any user group that is not designated to view will be excluded.

If you try adding that code inside a description you will see that it is displayed fully, including the "ifs". That's the problem.

He is using template conditionals plugin so that should not be an issue
Hey man, what's up?
Reply
#10
Not Solved
^ template conditionals or php in templates execute in templates.
does NOT work in forum description field. a different method is needed for it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)