Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-04-2005, 02:03 PM
oldford's Avatar
oldford oldford is offline
 
Join Date: Feb 2003
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Stop showing post count after it gets to a certain number

After someone reaches a certain number of posts (say 2000) I'd like to have their post count just be text. For example instead of showing "post: 2303" it would say "post: too many to count" or something like that.

I think it would just be a conditional statement, but I'm not sure how to write it.

Thanks for any help!
Reply With Quote
  #2  
Old 04-25-2005, 05:26 AM
oldford's Avatar
oldford oldford is offline
 
Join Date: Feb 2003
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a bump after a few weeks.
Reply With Quote
  #3  
Old 04-25-2005, 02:37 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be as simple as searching for $post[posts] in the postbit or postbit_legacy template, and replacing it with
Code:
<if condition="$post[posts]>=2000">Too many<else />$post[posts]</if>
Reply With Quote
  #4  
Old 04-25-2005, 03:47 PM
oldford's Avatar
oldford oldford is offline
 
Join Date: Feb 2003
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent! Thanks for the reply.

Do I need to rebuild the post count after making this change? It doesn't seem to be working at the moment.
Reply With Quote
  #5  
Old 04-25-2005, 08:01 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, it's because of the thousands separator. They applied it to both of the posts variables that I know of, so you may have to remove it from
Language Manager->Edit Settings->Number Formatting->Thousands Separator
Of course, that would remove it everywhere...
Reply With Quote
  #6  
Old 09-12-2005, 11:47 PM
Ian Montgomerie Ian Montgomerie is offline
 
Join Date: Dec 2003
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bumping this thread, because I'm trying to do the same thing, without removing the separator.

I am happy with just displaying "1000 or more" if the user has 1000 or more posts. I figure that you can check for this using strlen($post[posts]) > 3.

Problem is... can I call strlen from a template? It's not allowed within the if conditional itself. Can I call a function somewhere else and have it set a variable? I know PHP but am a bit clueless about how much of it fits into VBulletin templates.

Currently I've hacked a solution as follows:

<if condition="($post[posts]{0}==NULL) || ($post[posts]{1}==NULL) || ($post[posts]{2}==NULL) || ($post[posts]{3}==NULL)">
$vbphrase[posts]: $post[posts]
<else />
$vbphrase[posts]: 1000 or more
</if>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:38 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03881 seconds
  • Memory Usage 2,208KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete