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-02-27, 01:06 PM)bosss Wrote: [ -> ]I make changes ok and after changes works not code what i put in index template (throught admincp), that only guest can see slideshow - result was that all usergroups can see slideshow, (mean members of board) - that is what i try to explain to you!
Did you try my uploaded file?
Otherwise, I don't know how to help you, as the code you posted works fine for me here, and I can't really see any reason why it shouldn't. Could you test it on a clean MyBB install with just the plugin file I uploaded?

(2010-02-27, 01:06 PM)bosss Wrote: [ -> ]for now have problem with characters in posts (croatian)... maybe you have some solutions?
I don't think this would be caused by this plugin, but is your database in UTF-8?
I have tried this plugin with My Tracker and Game Section. I don't have any problem at all. Even I run a conditional in My Tracker template. I don't know about the merge system. I never try that.
Just updated this plugin with the ability to call templates easily from within templates, eg <template my_custom_template>. Useful if you have common code you wish to share between multiple templates.
Do note that it's rather basic, so no pre-caching of templates is done. This shouldn't be an issue if you're only calling one or two templates, but do take note if you're calling a lot of different templates. Also, it doesn't do any recursion checking, so don't get a template to call itself, or get it caught in a cycle of template calls.
I uploaded your file (phptpl.php) and now works - mean guests see only that slideshow - not members - thanks!

my mybb database is utf-8 and vb database is latin1 and i know that is have nothing to do with your plugin!

Thanks

bosss
(2010-02-28, 08:53 AM)bosss Wrote: [ -> ]my mybb database is utf-8 and vb database is latin1 and i know that is have nothing to do with your plugin!
Probably a conversion issue then. You need to ensure that your latin1 -> UTF-8 conversion is successful.
Glad that you got it working.
Thanks.
Works great! Thanks for putting time into this plug-in for us!!
Hi Yumi, thanks a lot for your plugin!!!
Is it possible to add "some staff" in every first post of multipage thread? I mean that when I go in page 2 (or 1, or 3, or 4.......) of a thread I wanna see in first post this "some staff". Fortunately I can suggest you http://www.webbando.com/come-realizzare-...-2401.html where you can find a way to know how to made it without any code.

Is it possibile?
Could you elaborate more?

Did you mean "some stuff" or "some staff" as in names of moderators? Did you want the thread's first post to appear on every page, or did you want something just to show up on whatever post is displayed first on each page?
(2010-03-22, 11:16 PM)Yumi Wrote: [ -> ]Could you elaborate more?

Did you mean "some stuff" or "some staff" as in names of moderators? Did you want the thread's first post to appear on every page, or did you want something just to show up on whatever post is displayed first on each page?
I want something just to show up on whatever post is displayed first on each page Smile

Is it possible?

Thanks a lot!!
Maybe try something like this in the postbit template:
<?php
static $first_done = false;
if(!$first_done) {
$first_done = true;
echo 'Stuff in first post';
}
?>
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22