Not Solved PHP in Templates and Template Conditionals
Not Solved
Hi Yumi, thanks a lot!!!

And if I wanna check the specific forum also? For example I want show "some staff1" in a forum fid=1 and "some staff2" in a forum fid=2. Is it possible?

Thanks a lot!!

Reply
Not Solved
<if $GLOBALS['forum']['fid'] == 1 then>
blah
</if>

Won't necessarily work everywhere.
Reply
Not Solved
I remember SMF did perfectly.
When a moderator post on forum they moderated, their mod usergroup will display.
But if his/her post on another forum, usergroup back to normal (general member is displayed).

Any idea Yumi? Smile
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
Reply
Not Solved
<if is_moderator($post['fid'], '', $post['uid']) then>
I am a moderator of this forum
</if>
Reply
Not Solved
Damn nice Yumi Big Grin
Work like a charm
Adding link for direct PM existing Moderator..
On postbit_author_user

<if is_moderator($post['fid'], '', $post['uid']) then>
<font color="red" size="-3">I am moderator <a href="private.php?action=send&uid={$post['uid']}"><u>here</u></a>.</font>
</if>
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
Reply
Not Solved
(2010-03-23, 11:10 PM)Yumi Wrote: 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';
}
?>

This code put 'Stuff in first post' in all posts....Sad


(2010-03-24, 08:56 AM)Yumi Wrote: <if $GLOBALS['forum']['fid'] == 1 then>
blah
</if>

It doesn't work Sad

Reply
Not Solved
Hi GokuFG,

Try this, and place it on postbit templates
<center><?php
if ($postcounter == 2){
echo 'Banner Place Postbit';
}
?></center>

display some stuff like banner or something, right after first post.
but, this is only first page Smile
for all pages, should be add other conditional base on MyBB "posts per page" setting.
Maybe Yumi can help for additional codes
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
Reply
Not Solved
<if ($GLOBALS['forum']['fid'] == 1 || $GLOBALS['foruminfo']['fid'] == 1) && !$GLOBALS['my_first_post'] && ($GLOBALS['my_first_post'] = true) then>
first post in forum id 1
</if>
Reply
Not Solved
the code

<if !$GLOBALS['my_first_post'] && ($GLOBALS['my_first_post'] = true) then>
first post in forum id 1
</if>

It's ok and works

EDIT

I tried to insert in forum template

<if ($GLOBALS['forum']['fid'] == 36 || $GLOBALS['foruminfo']['fid'] == 36) then>
first post in forum id 36
</if>


and the "first post in forum id 36" showed in that forum... But I'd like show "first post in forum id 36" in all threads of forum 36 and i all subforums. Do you understand?

Reply
Not Solved
(2010-03-25, 10:31 AM)gokufg Wrote: and the "first post in forum id 36" showed in that forum... But I'd like show "first post in forum id 36" in all threads of forum 36 and i all subforums. Do you understand?
Read up on PHP and how it evaluates conditionals. I'm only going to help with simple requirements, but for more complex things, you really should spend the few minutes to learn how it really works under the hood.
Reply


Forum Jump:


Users browsing this thread: 14 Guest(s)