The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello, how can I display a random number above the list of topics in a forum? I imagine I have to add code to forumdisplay.php but I am not sure where. I come from phpbb2 where variables would be built in the php files and then displayed in the .tpl files, but I'm having trouble following how this works in vbulletin so far. Can you please tell me how to achive something like this:
(looking at a forum) The random number generated is 32. Thread 1 Thread 2 Thread 3 |
#2
|
||||
|
||||
![]()
In vbulletin, you would use a plugin to 'plug into' the php file. You plug into a hook. If you look at the forumdisplay.php file, you will see several lines like this:
($hook = vBulletinHook::fetch_hook('forumdisplay_start')) ? eval($hook) : false; That is a for a plugin. So, if you write a plugin using the hook location 'forumdisplay_start' then the php code is 'entered' right there in the file. Then, after you write the plugin, you display the results in a template file. For forumdisplay.php, the main template file is FORUMDISPLAY. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|