內容簡介
如果您有多站設置,通常不能在網絡的所有站點上使用相同的 bbPress 論壇。現在您可以。
安裝此插件,並在主站啟用插件,以及每個應該使用主站論壇的子站點,或網絡啟用以在所有子站啟用。
如果您希望主站和子站論壇顯示在子站上,請在論壇設置中設置不同的根 Slug 和話題 Slug。之後,這兩個 Slug 將在子站上得到確認,並顯示其相應的論壇。
但!普通情況下您不能這樣做是因為代碼庫不支持它。我通過猴子補丁達到了目標,並進行了一些邪惡黑魔法,例如在查詢上鉤住 ‘query’ 並在查詢上運行常規表達式。所有這些都僅在您的論壇頁面上完成,所以請放心嘗試。如果適用於您:太棒了。如果不行:請停用,放鬆,尋找其他解決方案(或修改我的程式碼)。
個人資料注意事項:個人資料不會合併!收藏、開始的話題等僅顯示在主/子站點上。如果您希望用戶在一個地方查看所有訂閱,您需要撰寫一些自定義程式碼,並可能补丁我的程式碼。
BuddyPress 注意:它可與啟用網絡的 BuddyPress 一起使用,但由於 BuddyPress/bbPress 的整合問題,它們不會很好地協作。我已經進行了一些猴子補丁以使其正常工作。如果您未在 /members/ 中安裝 BuddyPress,您將需要進行猴子補丁,請參閱程式碼。至於個人資料:和 bbPress 個人資料相同。
外掛標籤
開發者團隊
原文外掛簡介
If you have a multisite setup, you normally cannot have the same bbPress forums across all sites of the network. Now you can.
Install this plugin and activate it on the main site and for each subsite that should use the main site’s forums, or network-activate to enable on all sub sites.
If you want both main site and sub site forums displayed on the sub site, set a different root slug and topics slug in the forum settings. After that, both slugs will be known on the sub site and display their respective forums.
BUT! There is a reason why you cannot normally do this and that is because the code base is not really supportive of it. I have monkey patched my way to the goal and I’m doing some evil black magic like hooking ‘query’ and running regular expressions on the query. All of this is only ever done to your forum pages, so be cool, give it a try. If it works for you: great. If it doesn’t: deactivate, relax, look for a different solution (or patch mine).
Profile Note: Profiles are not merged! Favorites, topics started etc show main/sub site only. If you want your users to see all their subscriptions in one place, you’ll have to write some custom code and likely patch my code too.
BuddyPress Note: It does work with network enabled BuddyPress, but they don’t play together nicely because of the BuddyPress/bbPress integration stuff. I have monkey patched this to work. If you do not have BuddyPress installed in /members/ you’ll have to monkey patch my monkey patch, please see the code. And as for the profiles: Same thing as with bbPress profiles.
