vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   post rank count (https://vborg.vbsupport.ru/showthread.php?t=282530)

LifesGreatestGift 05-06-2012 05:55 PM

post rank count
 
is there a way to get the amount of ranks a user has? I tried the following conditional and it didnt work..

PHP Code:

<vb:if condition="$post['rank'] > 1">SHOW THIS</vb:if> 


kh99 05-06-2012 07:47 PM

I don't see any way to do that without going through the same kind of code that sets the ranks. Maybe if all your ranks have "stacked" set to yes you might be able to write code that counts the number of times <br /> appears in the $post['rank'] string.

Badshah93 05-06-2012 08:21 PM

1 Attachment(s)
Quote:

Originally Posted by kh99 (Post 2326837)
I don't see any way to do that without going through the same kind of code that sets the ranks. Maybe if all your ranks have "stacked" set to yes you might be able to write code that counts the number of times <br /> appears in the $post['rank'] string.

if admin chooses html as rank and if he uses <br /> tag in ranks then there will be extra count.

anyway,
I have just created quick product for this.


To show rank count use
PHP Code:

{vb:raw post.rankcount// in postbit ot postbit legacy 

only 1 sql query per page.

LifesGreatestGift 05-07-2012 03:54 AM

thank you :)


All times are GMT. The time now is 04:50 PM.

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.00956 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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