vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Show Message to Users With a Post Count Less Than X (https://vborg.vbsupport.ru/showthread.php?t=147992)

Dave Hawley 05-24-2007 02:29 AM

Show Message to Users With a Post Count Less Than X
 
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.



PHP Code:


<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

Code:

$vbphrase[total_posts_x]
That is a phrase, the text, not a post count. Replace that with:
Code:

$vbulletin->userinfo['posts']

Dave Hawley 05-24-2007 06:08 AM

Perfecto Dismounted! Thanks :)


All times are GMT. The time now is 03:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01107 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete