Vbulletin plugin development tutorial

I searched for tutorials, but I did not find a useful tutorial. I want to create a simple plugin that will add β€œ123” to the title of each forum page.

I tried to go to admin panel -> create a new plugin. But I don’t know which hook I need to display β€œ123” in the header.

I will be very grateful for any help.

+4
source share
1 answer

Assuming vBulletin 4 and above:

Create product

  • Login to your AdminCP
  • Ready-made modules and products β†’ Product Management
  • Click Add / Import Product
  • On the next screen, enter the name of your product, etc. in the "Add a new product" section (you can leave the product URL and product validation URL blank).

Add plugin to your product

  • Go to plugins and products β†’ Add new plugin
  • Choose your product
  • To add something to the title on each page, select the global hook location global_bootstrap_init_complete
  • In the PHP code, enter the following:

    $ template_hook ['mycustommesage'] = 'hello world';

Refresh the header template to include plugin output

  • In ACP goto Styles and Templates β†’ Style Manager
  • Select the style you want to change and select edit templates
  • Open Header Template
  • The vibrator you want you to display the output of the plugin adds:

    {vb: raw template_hook.mycustommesage}

+11
source

All Articles