Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Template Conditionals | If Under X Posts Show Div
DrBaja Offline
Junior Member
**
Posts: 1
Joined: Dec 2017
Post: #1
Template Conditionals | If Under X Posts Show Div
Hey,

I'd like to make a template code say If User has less than 10 posts then set .underPostNotification visible to inline else then set to none.

Basically, I'd like to show users a message if they have under 10 posts (to warn them about spamming is not tolerated and remind them of posting rules)

I haven't seen any in-depth tutorials on how to use Template Conditionals.
I have knowledge of CSS, JS, HTML, and PHP. I'm also familiar with how the MyBB template system works.

If someone could point me to an in-depth tutorial or give me some tips on how to do this that would be awesome!

Here is a quick code I whipped up from some posts I've seen.

PHP Code:
 <if $mybb->user['postnum'] >= 9 then>
// Not sure what to put here but it should set the Visble to Inline (Visible)
<else>
// Not sure what to put here but it should set the Visble to None (Disapear)
</if>


Thanks,
DrBaja

(This post was last modified: 12-12-2017 01:38 PM by DrBaja.)
12-12-2017 01:31 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Template Conditionals | If Under X Posts Show Div - DrBaja - 12-12-2017 01:31 PM

 Standard Tools
Forum Jump: