Former Member
inherit
guest@proboards.com
235407
0
Nov 26, 2024 17:04:30 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 28, 2016 20:30:11 GMT -8
i tried using $[current_user.posts] but it doesn't seem to work for me. i want the shoutbox to only appear for people that have made at least 1,000 posts, but i can't figure it out. is it doable?
{if $[current_user.posts] => 1000} $[shoutbox] {/if}
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Dec 29, 2016 1:12:26 GMT -8
i tried using $[current_user.posts] but it doesn't seem to work for me. i want the shoutbox to only appear for people that have made at least 1,000 posts, but i can't figure it out. is it doable? {if $[current_user.posts] => 1000} $[shoutbox] {/if}
That should work and to be sure, I just tossed it on my test site and it seems fine. On that test site I have 47 posts so I set the statement to show the shoutbox if I had more than 46 posts and it showed for me. Set it to be 57 in the statement and it doesn't show for me.
|
|
Former Member
inherit
guest@proboards.com
235407
0
Nov 26, 2024 17:04:30 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 29, 2016 2:24:51 GMT -8
i tried using $[current_user.posts] but it doesn't seem to work for me. i want the shoutbox to only appear for people that have made at least 1,000 posts, but i can't figure it out. is it doable? {if $[current_user.posts] => 1000} $[shoutbox] {/if}
That should work and to be sure, I just tossed it on my test site and it seems fine. On that test site I have 47 posts so I set the statement to show the shoutbox if I had more than 46 posts and it showed for me. Set it to be 57 in the statement and it doesn't show for me. hm.. i guess you're right. i tested it on another account that isn't staff and it works fine. not sure why being admin would affect anything. i just threw this at the top of my wrapper quickly and it works fine on my alt, but not admin (always see 0)
{if $[current_user.posts] => 250} 1 {else} 0 {/if} any ideas what could be wrong there? a workaround is easy if it's not something that can be fixedEDIT: apparently this only works up to 999 posts. post by Ulises here: support.proboards.com/post/6823591/threadEDIT 2: i guess i got it working as well as i can... it's not pretty but it works. posting in case anyone else runs into a similar problem. just gotta think outside the box a little bit {if $[current_user.is_guest] || $[current_user.rank.name] == "rankname1" || $[current_user.rank.name] == "rankname2" || $[current_user.rank.name] == "rankname3" || $[current_user.rank.name] == "rankname4"} <div style="text-align: center;">Sorry! You must have at least 250 posts in order to view the shoutbox here.</div> {else} $[shoutbox] {/if} i want the shoutbox to appear for registered users with at least 250 posts. the first four ranks on my site require post counts under 250 posts with the fifth right at 250, so by excluding the first four ranks, it pretty much achieves the same goal
|
|
inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Dec 29, 2016 8:01:09 GMT -8
Very innovative and well-done! I like your solution!
|
|
#eb7100
33409
0
1
Nov 24, 2024 4:27:37 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Dec 29, 2016 10:21:20 GMT -8
Lynx: That will also render as true for any users with a post count of 1,000 or more due to the comma truncating their post count to just 1. Comparing rank names is the only reliable way to accomplish a greater/less than comparison based on a single post count.
|
|