(2016-08-21, 05:16 PM)Cryptexinside Wrote: This goes to the postbit
<if $post['regdate']+(60*60*24*182) <= TIME_NOW then><div class="postbit-time postbit-time-halfyear" style="margin-top: 3px;">1/2 Year of Service</div></if>
<if $post['regdate']+(60*60*24*365) <= TIME_NOW then><div class="postbit-time postbit-time-halfyear" style="margin-top: 3px;color: #85AE31;">One Year of Service</div></if>
<if $post['regdate']+(60*60*24*700) <= TIME_NOW then><div class="postbit-time postbit-time-halfyear" style="margin-top: 3px;color: red;">Two Years of Service</div></span></if>
</div>
CSS:
.postbit-time-halfyear {
color: #2574A9
}
.postbit-time {
width: 140px;
padding: 4px 0;
text-align: center;
border-radius: 3px;
font-size: 11px;
text-shadow: none;
margin: 0 auto;
font-weight: 500;
background: #181818
}
This was coded by me, Dont copy it to other forums.
Yeah, don't copy that into other forums.
He's using "postbit-time" and "postbit-time-halfyear" (two classes) to style all but at the same time is putting raw css in the same label (style="margin-top: 3px;color: red;").
------------------------------
Instead, you can copy this code in what forum you want:
<if $post['regdate']+(60*60*24*182) <= TIME_NOW then><div class="postbit-time-halfyear">Half year of service</div></if>
.postbit-time-halfyear {
width: 140px;
font-size: 11px;
text-align: center;
margin: 3px auto 0px auto;
padding: 4px 0px;
background: #181818;
border-radius: 3px;
}
By the way, this was coded by me using CSS, an open source language that describes the style of an HTML document.
I don't give support on PM.