php - 有没有办法将 vBulletin 集成到 PHP 中?

标签 php javascript html css vbulletin

我想要实现的目标是将 vBulletin 集成到 PHP 页面中,或者其他任何东西。我不想重新创建一个看起来像网站的皮肤,我或多或少希望论坛与网站 100% 集成,现在显然皮肤需要改变等等,所以它看起来很像,但我怎么会集成它,iframe 将无法处理它,对吗? 罗斯

最佳答案

将您的 PHP 页面集成到 vBulletin 中可能比尝试将 vBulletin 集成到您的 PHP 页面中更容易。

然后您可以在论坛根目录下的 PHP 文件中执行类似的操作(或根据需要更改路径):

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'myscript'); 

// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('MYPAGE');

// pre-cache templates used by specific actions
$actiontemplates = array();

// ########################## REQUIRE BACK-END ############################
require_once('./global.php');

// ... your PHP code goes here
// ... you can use vBulletin's database classes and security mechanisms in your page
// ... you can also use vBulletin's headers/footers and other templates too
// example (assuming you've already created a template called MYPAGE):

eval('print_output("' . fetch_template('MYPAGE') . '");');

关于php - 有没有办法将 vBulletin 集成到 PHP 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7098034/

相关文章:

javascript - Fabric.js 动态添加/删除元素

php - 流式传输文件时 CURL 比 fread 慢?如何加速 CURL

java - 如何在我的 JSF Web 应用程序中拥有 AJAX 功能?

javascript - 如何创建圆形内容 slider ?

javascript - Canvas 全屏 100% 导致模糊

html - 如何让3个div在一定 Angular 下并排

php - 当尝试传递包含在数据中的“符号”时,MySQL 语法出错

php - 如何在 Laravel 5.1 迁移中使用外键

php - 我应该使用JOIN函数还是在循环结构中运行多个查询?

javascript - 使用 classList.toggle 定位多个类