vBulletin开发摘要

相信不少企业会购买vBulletin来作为企业论坛、博客或者CMS的开发框架。刚刚接触vBulletin的时候,你可能摸不着头脑;或者你通过自己的潜心修炼,终于可以在某些页面中加入自己的fancy逻辑,但是这种做法可能会影响到你日后的系统升级。为此,本文旨在帮助您了解vBulletin的程序结构,以方便您对自己的应用程序做比较合适的定制。

1. 论坛程序入口

/index.PHP==>content.PHP==>vb/bootstrap.PHP

在bootstrap.PHP中,首先包含/includes/init.PHP,做一下初始化工作, 然后再引入vb/vb.PHP启动它的MVC Router,router将客户端请求转发至Controller,然后在controller中注册模板,render出最终的页面

2.程序的核心类和函数

核心类主要是在class_core.PHP中,其他类基本都定义为includes/class_*.PHP

数据库相关:vB_Datavase

Cache相关:vB_Datastore

Request相关:vB_Input_Cleaner

核心注册器:vB_Register

Session相关:vB_Session

模板引擎相关:vB_Template_*

核心函数主要是在includes/functions.PHP中,其他类基本都定义为includes/functions_*.PHP

3.模板管理

3.1页面管理

添加新模板:Styles & Templates >> Style Manager >> Add new Templates

编辑模板:Styles & Templates >> Style Manager >> Edit Templates

页头模板:Styles & Templates >> Style Manager >> Edit Templates >> header

导航模板:Styles & Templates >> Style Manager >> Edit Templates >> Navigation/Breadcrumb templates >> navbar

页脚模板:Styles & Templates >> Style Manager >> Edit Templates >> footer

3.2JS框架

vBulletin中使用的JS框架是yahooUI,使用手册可以参考:http://developer.yahoo.com/yui/docs/YAHOO.util.Dom.html

4.嵌入程序、插件管理

Plugins & Products >> Plugin Manager >> Add New Plugin

Product: Leave with default value

Hook Location: member_build_blocks_start

Title: forumalias

Execution Order: Leave with default value

Plugin is Active: YES

Plugin PHP Code:

5.语言包管理

5.1.上传、下载完整语言包

Languages & Phrases >> Language Manager

5.2.添加修改语言包中某个子项

languages & Phrases >> Phrase Manager >> Add New Phrase

6.后台菜单管理

Add inlcudes/xml/cpnav_vbulletin_*.xml

7.小技巧

在/includes/config.PHP中加入debug=ture,可以打开程序的调试状态。

先就讲这么多了,有什么不清楚的地方,欢迎大家提问。

至于vBulletin官方提供的开发文档,也可以借鉴一下。

http://members.vbulletin.com/api/

相关文章

Format[$] ( expr [ , fmt ] ) format 返回变体型 format$ 强...
VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办...
在项目中添加如下代码:新建窗口来显示异常信息。 Namespace...
转了这一篇文章,原来一直想用C#做k3的插件开发,vb没有C#用...
Sub 分列() ‘以空格为分隔符,连续空格只算1个。对所选...
  窗体代码 1 Private Sub Text1_OLEDragDrop(Data As Dat...