![]() |
IF Condion in postbit template
I want to use a IF condition in postbit template like this
Code:
<if condition="$post['posts']>20"> any solution you guys can suggest? |
You may need to add a line of code in the hook to do like $post[int_posts] = intval(str_replace(",","",$post[posts])). Then do your conditional on int_posts. I'm not sure if the integer value exists or not already in the $post array. I didn't read the code. If it does, you don't need a hook, just ID the var index and use it.
|
Can I edit something in showthread.php to accommodate this
I am not sure how hooks works |
$post['postcount'] is the variable you want.
|
Quote:
|
Isn't $post[postcount] the post number in the thread? ie. this is post #6, thus $post[postcount] = 6
|
Yes Postcount Does not work,its serial number of post in the thread
any idea how I can get User no of posts in thread page in integer without commas formatting. |
Did you try the suggestion in post 2? I think that is how you will have to do it as the variable is not available for use (they write over it in class_postbit.php - $this->post['posts'] = vb_number_format($this->post['posts']); ).
|
Try the code I suggested in post 2 on hook showthread_postbit_create.
That's the postbit loop. hook PHP Code:
HTML Code:
<if condition="$post[int_posts]>20"> |
All times are GMT. The time now is 10:28 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|