Vbulletin插件开发教程

编程入门 行业动态 更新时间:2024-10-28 14:34:12
本文介绍了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:

创建产品

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

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

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

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

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

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

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

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

    {vb:raw template_hook.mycustommesage}

    {vb:raw template_hook.mycustommesage}

  • 更多推荐

    Vbulletin插件开发教程

    本文发布于:2023-07-23 09:27:28,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1195944.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:插件   教程   Vbulletin

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!