即將到達的內容是將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