Log in

View Full Version : Show Message to Users With a Post Count Less Than X


Dave Hawley
05-24-2007, 02:29 AM
Hi,

Ok, I have this code currently in the NewThread Template and wish to ONLY show the message to users with a total post count less than 5. As you can guess, it currently shows to all users regardless of their post count.





<if condition="$vbphrase[total_posts_x] >5">

<script type="text/javascript">

<!--

var answer = confirm ("You are about to post to the $foruminfo[title] forum. Please ensure this the correct forum for your topic. Choose Cancel to be directed to the Question Forums.")

if (!answer)

window.location="forumdisplay.php?f=2"

// -->

</script>

</if>

thienlong
05-24-2007, 04:21 AM
How can i use this? Copy and paste to newthread template?

Dave Hawley
05-24-2007, 04:26 AM
Yes, but it's not my idea or code.
https://vborg.vbsupport.ru/showthread.php?t=111942

If you know how to make it check the user has less than x posts, please share.

Dismounted
05-24-2007, 05:41 AM
$vbphrase[total_posts_x]
That is a phrase, the text, not a post count. Replace that with:
$vbulletin->userinfo['posts']

Dave Hawley
05-24-2007, 06:08 AM
Perfecto Dismounted! Thanks :)