The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Use data from php in postbit_legacy
I am not sure how to get this to work or if it would be possible. What I want to do is get some information from a db and add that to each post below the users post count. We have a knowledge base and I want to show something like
Posts: 150 Kb Entries: 3 This will get the kb total $query="select count(kb_id) from kbentries where kb_approved=1 and coder_id=".$userinfo['userid']; $result=mysql_query($query); $row=mysql_fetch_row($result); $RankKB=$row[0]; But where should I put that to be able to use it in the postbit? Thanks |
#2
|
||||
|
||||
Just place the $RankKB variable in your template.
|
#3
|
|||
|
|||
Right, but where should I put the code so the variable is calculated?
Thanks |
#4
|
||||
|
||||
you can put it in the functions showthread if you like
|
#5
|
|||
|
|||
would the code work if it is in the phpinclude_start? I put it there but when I used the variable it had not value (or at least nothing was displayed).
Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|