Vbulletin插件开发教程 [英] Vbulletin plugin development tutorial

查看:88
本文介绍了Vbulletin插件开发教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了教程,但是没有找到任何有用的教程.我想创建一个简单的插件,将"123"添加到论坛每页的标题.

I searched for tutorials but i didn't found any useful tutorial. I want to create simple plugin which add "123" to header of every pages of forum.

我试图进入管理面板->创建新插件.但是我不知道我需要在标题中显示"123"的钩子.

I tried to go to admin panel -> create new plugin. But i don't know what hook i need to display "123" in header.

非常感谢您的帮助.

推荐答案

假定vBulletin 4及更高版本:

Assuming vBulletin 4 and above:

创建产品

  1. 登录到您的AdminCP
  2. 转到插件和放大器;产品->管理产品
  3. 点击添加/导入产品
  4. 在以下屏幕上,在添加新产品"部分中输入您的产品名称,等等(您可以将产品URL"和产品检查URL"留空)

向产品添加插件

  1. 转到插件和放大器;产品->添加新插件
  2. 选择您的产品
  3. 要在每个页面的标题中添加一些内容,请选择global_bootstrap_init_complete挂钩位置
  4. 在PHP代码中输入以下内容:

  1. Goto Plugins & Products -> Add New Plugin
  2. Select your Product
  3. To add something to the header on every page select the global_bootstrap_init_complete hook location
  4. In PHP code enter the following:

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

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

更新标题模板以包含插件输出

  1. 在ACP中,转到样式&模板->样式管理器
  2. 选择要编辑的样式,然后选择编辑模板
  3. 打开标题模板
  4. 要在任何地方显示插件输出,请添加:

  1. In ACP goto Styles & Templates -> Style Manager
  2. Select the style you want to edit and select edit templates
  3. Open the header template
  4. Whereever you want you plugin output to appear add:

{vb:raw template_hook.mycustommesage}

{vb:raw template_hook.mycustommesage}

这篇关于Vbulletin插件开发教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆