MyBB Hacks

Full Version: PHP in Templates / Complex Templates
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 23 24
Of course.
wow, that's interesting.
Updated to v1.8:
- adds the <?= ... ?> construct from Template Conditionals plugin; conditional isn't checked for safety
- adds <setvar ..>...</setvar> construct from Templates Conditionals plugin; these will still assign to the $GLOBALS['tplvars'] array
- adds phptpl_eval_expr and phptpl_eval_text from Template Conditionals; conditional isn't checked for safety
Upgraded.
Thank you very much, Yumi Smile
Brilliant. Thanks Yumi Smile
Heya! I'm a bit of a lurker and first time poster. Tongue This plugin's awesome and I'd really like to use it but I'm having a bit problem.

Alright, so I uploaded the plugin to where plugins usually get uploaded (inc/plugins) and activated it. So far so good. Then I took the plugin for a test spin and inserted <?php echo "Test"; ?> in a few templates. For some weird reason "Test" isn't being displayed. Oh

I did a fresh install of MyBB (1.6.1) in another location, uploaded the plugin, activated it, inserted <?php echo "Test"; ?> in the header template and took the plugin for a test run and "Test" gets displayed.

My problem's basically this: the plugin parses <?php echo "Test"; ?> in a clean install of MyBB but doesn't display anything in the... not so clean MyBB and I'm not sure why. XD
It does sound like you may have a plugin conflict. What you can do is upload your forum plugins one by one to the alternative location and see which one causes the "Test" to disappear. I realise that might be a bit faint-making if you have a lot of plugins, but that is a way to go.
(12-19-2010 08:26 PM)leefish Wrote: [ -> ]It does sound like you may have a plugin conflict. What you can do is upload your forum plugins one by one to the alternative location and see which one causes the "Test" to disappear. I realise that might be a bit faint-making if you have a lot of plugins, but that is a way to go.
Sorry for not responding sooner but thanks for the reply. Biggrin

I uploaded most of the plugins to the new location, activated them and not a single one managed to make the echoed "Test" disappear. I then decided to go compare the board settings between the two locations to see if there was a setting that was causing it. After a few minutes of comparing settings, I found what was causing the "Test" to not be displayed.

Turns out I had the Output template start/end comments? setting in the Server and Optimization Options setting group set to "No". I felt kind of dumbfounded after finding that out. XD

Thanks for the help, man. I can't wait to start making use of this plugin, thanks Zinga!
Hmm, it _should_ work with HTML comments turned off though.  I wonder if MyBB changed something.
Thanks for finding that one and reporting, I'll take a look.
thanks for your plugin ...

I need to put an image with a link next to a forum ...
In forumbit_depth2_forum with the code <if ..... then>, how can I intercept the forum id 14 ? (or by forum name)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Reference URL's