MyBB Community Forums

Full Version: How to make it visible to all?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i add following command to postbit but its effect shown only to uid 1 and also seen for other user'sfirst post if they create thread.
<if $GLOBALS['mybb']->user['uid'] == 1 then>
<div class="postbit-time postbit-time-halfyear" style="margin-top: 3px;">7 Years Experienced</div>
</if>

I want to show that this value is shown under post of uid 1 only. 
Please help me.
Hello! This is just an idea, have you tried turning the < and > into [ and ]?

Its just an idea.
means i dont understand bro.
with <?php ?>
also not work.
(2016-01-08, 10:00 AM)Dr_The_One Wrote: [ -> ]means i dont understand bro.

Try instead of <div/>, use [div/]

Im thinking that could be the cause if your trying to use MyCode.
not work..
i have installed template condition plugin also.
try it like this..

<if $post['uid'] == 1 then>
<div class="postbit-time postbit-time-halfyear" style="margin-top: 3px;">7 Years Experienced</div>
</if>
Thanks...kumar

Is it possible that according to registration date only years shown like 1/2 year experience, 1year experience automatically.
Thanks and repped.

i try to done with following codes but not successful on running board. it work on localhost.

it work on local host but not showing years/months on running board.
what may be the issue?

i use following code for months:
<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*30))</setvar>
<span class="service-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']} months of service</span>

Following code for years:
<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*365))</setvar>
<span class="service-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']} years of service</span> 

Work fine on local host but not on running board.

Below code is also not working.
<if $post['regdate']+(60*60*24*30) <= TIME_NOW then>1 month services
<elseif $post['regdate']+(60*60*24*330) <= TIME_NOW then>11 months services
<else/></if>

i tried below thing also but not work
<?php
			<if $post['regdate']+(60*60*24*30) <= TIME_NOW then>1 month services
             <else if $post['regdate']+(60*60*24*330) <= TIME_NOW then>11 months services
				<else></if>?>
Can anyone help me?

It work now with updated template condition plugin.
Than zinga.

http://mybbhacks.zingaburga.com/showthread.php?tid=464