即将到达的内容是将vBulletin整合到一个PHP页面中,或者是什么。我不想重新创建一个看起来像网站的皮肤,我或多或少想要论坛与网站100%整合,现在显然皮肤需要改变等,所以它看起来的部分,但我将如何整合它,iframes将无法处理它吗? 罗斯有没有办法将vBulletin整合到PHP中?
1
A
回答
1
最常见的方式做,这是重新定义在一个插件global_setup_complete
或类似的$header
和$footer
变量。
例如,如果你已经有了从另一个系统中的header.php文件:
ob_start();
include('/path/to/your/header/file.php');
$header = ob_get_contents();
ob_end_clean();
ob_start();
include('/path/to/your/footer/file.php');
$footer = ob_get_contents();
ob_end_clean();
这将这些文件的输出加载到$header
和$footer
变量。
5
将您的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') . '");');
相关问题
- 1. 有没有办法将g套件服务整合到php中?
- 2. 有没有办法将git整合到Windows cmd或PowerShell中?
- 3. 有没有办法将Fitnesse整合到C++代码中?
- 4. 有没有办法将gnuplot的图表整合到winform中
- 5. Rails:有没有办法将整个* .html.erb保存到@Var中?
- 6. 有没有办法将python代码合并到moinmoin页面中?
- 7. 有没有办法将数据从html标签发送到php?
- 8. 有没有办法将PHP SimpleXMLElement添加到另一个SimpleXMLElement?
- 9. 有没有办法将这两种方法结合起来?
- 10. 我有没有办法将这3种方法合并为1?
- 11. 有没有办法在PHP中将GUID转换为UUID?
- 12. 有没有办法整合Jupyter记事本到我的web应用程序
- 13. 有没有办法通过PHP
- 14. 有没有办法将多个更新查询合并到一个查询中?
- 15. 有没有办法将Docker镜像合并到一个容器中?
- 16. 有没有什么办法可以将asp.net和php结合起来?
- 17. 有没有办法将两个LINQ查询合并为一个?
- 18. 有没有办法将两个gcov文件合并为一个
- 19. 有没有办法将这3个查询合并为一个
- 20. 有没有办法将这3个表结合起来? (mysql)
- 21. 有没有办法将SQL列与LIKE结合起来
- 22. 有没有办法将参数作为集合列出来?
- 23. 有没有办法将pdb文件与ilmerge合并?
- 24. 有没有办法将这两条线合并为一个?
- 25. 有没有办法将IEnumerable转换为XElements集合?
- 26. 有没有办法将变量传递到流星模板中?
- 27. 有没有办法将API测试集成到GitHub中?
- 28. 有没有办法将wireshark http trace导入到java中?
- 29. 有没有办法将SourceSafe与HISTORY迁移到SVN中?
- 30. 有没有办法将Flash SWF文件导入到Flex中?
真。无论如何,大多数页面模板都支持PHP。有数百个关于VBORG的教程 – TheBlackBenzKid