The Arcive of vBulletin Modifications Site. |
|
Probobly simle question. Details »»
|
|||||||||||||||||||||||||
Hi dudes.
I have a simple question ( I hope ) I have added a new "User Profile Field" called Nick. Now i want to use it to find a rank in my Db. The DB looks like this: Table Name: stats_individual Rows: name , rank What i need is to display the "rank" under "posts" in the postbit using the "nick" the user provided in the CP. I have tried to edit the postbit but i cant get it to work :-( My test: Location: $post[field2] Posts: $post[posts] Rank: SELECT rank FROM stats_individual WHERE name=$post[field5] That dident work ( Not that i actualy belived that it would ) Any ideas? /DonLKSAB Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Woa what you said is confusing :-p
SELECT rank FROM stats_individual WHERE name=$post[field5] Will not work in the post biut ![]() You may want to try putting in the showthread.php PHP Code:
I am still bit confused on what you want, but try that. Also then in the postbit put Rank: $ranking[rank] |
|
#3
|
||||
|
||||
|
@Arunan: Thank would create an extra query for each post!!
It would work you are right, but one more query per post is not good ![]() @Don: open showthread.php find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
|
#4
|
|||
|
|||
|
Well both look good.
But non of them work :-( I dont get any errors or any indication that something is wrong. It simply dont display anything. /DonLKSAB |
|
#5
|
||||
|
||||
|
Quote:
ur rite...lost my mind, because I didn't tell him where to put it either lol.That above should work. |
|
#6
|
|||
|
|||
|
Ahh.
There were 2 places in Showtread to change. One in the begining and one in the end :-) Now it works. Thanks dudes. /DonLKSAB |
|
#7
|
||||
|
||||
![]() you're welcome ![]() @Arunan: , as long as i saw where you wanted to put it, and could give a better advice it's ok ![]() I remember my own first small hacks to showthread.php, without the microstats hack i always thought all is good ^^ |
|
#8
|
||||
|
||||
|
Hehe, thanks Xenon
You have been teaching me new things alot, and they are coming in handy alot too. For that I thank you!Whenever you need anything...anything at all, my pm box/email inbox are open
|
|
#9
|
||||
|
||||
![]() you're always welcome ![]() hmm, yeah i need time, but i'm sure you can't send it to me right? ![]() well, maybe i'll find something in future. it's enough to see you've learned a lot so you could help others
|
![]() |
|
|