Not Solved PHP in Templates and Template Conditionals
Not Solved
I just got this plugin installed (or so I assume since it doesn't have ANY installation instructions) and I still can't seem to even get an echo statement working from a template.

It only comes with one file, I uploaded that to inc/plugins and activated the plugin from Admin CP.

The PHP and conditionals are actually being output to the browser. The code is not even being parsed... that's a pretty sure shot sign that this plugin is not working for me.

If I put the following code in a template with 'x' replaced with '1' (Guests) and view my forum logged in as Admin (shouldn't display) it still displays.

<if $mybb->user['usergroup'] == x then>
Your link here
</if>

If you were to view source you will see this in the source:

<if Array['usergroup'] == 1 then>
Your link here
</if>

As a second example, the following code:

<?php echo "Hi from PHP"; ?>

would be seen in the source as:

<?php echo "Hi from PHP"; ?>

The plugin seems to be installed wrong or not functional - for whatever reason.

Any advice?



P.S.
(2008-05-31, 07:14 PM)TStarGermany Wrote: you're beating one of the biggest weaknesses in mybb with this...

If I could actually get this to work for me that would be VERY true. The lack of control over logic flow in MyBB's template system is the very reason most of my friends still use SMF.
TechTalkin — The Premier Community for Technology Enthusiasts
Full Ambit Media — Zero Sacrifice Web Design & Development
SiteSense — Fast, Flexible and Free PHP/MySQL CMS
Reply


Messages In This Thread
RE: PHP in Templates and Template Conditionals - by Alex Stanford - 2010-04-20, 05:19 PM
RE: Template conditionals - by expat - 2015-01-31, 05:28 AM

Forum Jump:


Users browsing this thread: 92 Guest(s)