The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Simple plugin code help.
I have a plugin question.
I need to create a plugin to fill a variable from the database. I added an extra field called resource_url to the forums MySQL table. For the mod I'm doing, each forum has a resource url associated with it I need a plugin (I'm told on the on hook: forumdisplay_complete) to pull out the data from that database field and put it in a variable, so i can use it in templates. That is my main requirement. If there was also a way I could populate the field using the forum manager then that would be Excellent.... but I can live with editing the DB directly if need be. Thankyou for any help! |
#2
|
|||
|
|||
If you add the field to the forum table, there is no need to create a plugin to show it. Just add it to your template.
Adding it to the forum options in the admincp involves a bit more coding. |
#3
|
|||
|
|||
Marco.... I know I'm just a dense Noob when it comes to PHP (I'm an ASP man), but how do I show it?
Do I use $foruminfo[MYFIELDNAME] ?? |
#4
|
|||
|
|||
Yes. $foruminfo is filled with the query:
[sql] SELECT * FROM " . TABLE_PREFIX . "forum WHERE forumid = $forumid [/sql] |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|