The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I made a plugin to add a new tab to a users profile, how would i make the data thats shown in the tab be from an executed MySQL Query?
PHP Code:
|
|
#2
|
||||
|
||||
|
The DB object can be called inside the class using $this->registry->db.
|
|
#3
|
|||
|
|||
|
Sorry i'm a php noob. A simple example using my code?
|
|
#4
|
||||
|
||||
|
If you do not know PHP - I doubt any examples are going to help, dealing with SQL and the like is a bit further down the track. I would suggest you learn PHP as best you can before dealing with vBulletin.
|
|
#5
|
||||
|
||||
|
You would put the query inside the function prepare_output. You would not put it in "$this->block_data['mymodification']" as that should contain the html to output. You would do the query as Hanson suggestion, then get the results and put it in the block_data.
|
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
||||
|
||||
|
You would do something like this:
PHP Code:
|
|
#8
|
|||
|
|||
|
Thanks, will try it out. I would +rep you only vb.org doesn't have rep
|
![]() |
|
|