The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
hello!
im looking foward to create a mod for my forum i want people to have custom ranks based on their gender, and the custom ranks to grow from their postcount like the default ranking system works so im aware i need the post variable and lots of if/else cases but, to be honest im not sure where to begin, so far i have tried to write the code on a hook in postbit_complete and imput the variable in the postbit template but it doesnt seems to work, thanks for your help! |
#2
|
||||
|
||||
![]()
You can use them in the same way you do in PHP.
Code:
<if condition="$var1 < 2"> <if condition="$var1 =< 2"> <if condition="$var1 == 2"> |
#3
|
||||
|
||||
![]() Quote:
![]() --------------- Added [DATE]1243358250[/DATE] at [TIME]1243358250[/TIME] --------------- Quote:
PHP Code:
|
#4
|
||||
|
||||
![]()
I'm assuming you want to add something to postbit - you can just use the user ranks feature for that.
Also, the "posts" number is formatted (e.g. 1,000 instead of 1000) and will fail in number comparisons. |
#5
|
||||
|
||||
![]()
how do i get the number raw instead? without format to use them in the template, and what im trying to do, is to generate the ranks based on the members gender, for example, when the male users reaches 500 posts their rank becomes "prince" and when the female users reaches 500 posts their rank become "princess" and on untill they reach king/queen, emperor/emperess
|
#6
|
||||
|
||||
![]()
You can't get the number raw without using plugins. What you can do is setup a rank, and use conditionals on that rank's content.
|
#7
|
||||
|
||||
![]() Quote:
now i been trying to add the plugin as requested, i suppose i need to find the variable vbulletin uses to extract the userposts from the table and make a new variable with the stripped commas from the userposts, what i have tried so far is this: plugin: showthread_postbit_create $rawpost = str_replace(",", "", $bbuserinfo[posts]); im not sure if i have to se $bbuserinfo[post] or the variable $post that appears in showthread.php as well i suppose i need to find a way to fit $rawpost in either the global vbulletin array or in the $post[] array that the template uses thanks again for your time and patience ![]() |
#8
|
||||
|
||||
![]()
postbit_display_start
PHP Code:
|
#9
|
||||
|
||||
![]() Quote:
thanks a lot! you have helped me a lot and at the same time i have realized i have a LONG LONG LONG road ahead to cross in this little vbulletin modification world; thanks again! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|