前言介紹
- 這款 WordPress 外掛「phpbb_recent_topics」是 2007-03-21 上架。
- 目前有 70 個安裝啟用數。
- 上一次更新是 2011-07-08,距離現在已有 5049 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.0.9 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
linickx |
外掛標籤
forum | phpbb | posts | topics | sidebar |
內容簡介
如果您有一個 phpBB 論壇,並想要把博客讀者引導到您的論壇中,那麼這個外掛或許可以幫助您,您可以在 WordPress 中的頁面、文章甚至是主題中包含最近的 phpbb 主題列表,以及在您的側邊欄中顯示!
關於資料庫配置
如果 WordPress 和 phpBB 共享相同的資料庫,那麼只要設定 $PHPBBDB 為 DB_NAME 即可,否則您需要將 WordPress 使用者設定為讀取 phpBB 的權限(如果您需要,您可以使用“不安全”的連線方式將 phpbb 資料庫憑證存儲在外掛中)。
如何讓 WordPress 讀取 phpBB 的唯讀權限?
如果您還不知道,您需要找到您的 WordPress MySQL 使用者 ID,它將在 wp-config.php 中:
define('DB_USER', 'wp_user'); // 您的 MySQL 使用者名稱
您也應該找到上述 phpBB 資料庫和表。
您需要在 MySQL 資料庫中輸入以下語法:
GRANT SELECT ON phpbb_database.phpbb_topics TO wp_user@localhost;
以及
GRANT SELECT ON phpbb_database.phpbb_forums TO wp_user@localhost;
以及
GRANT SELECT ON phpbb_database.phpbb_posts TO wp_user@localhost;
您可以作為 phpMyAdmin 資料庫使用者登入,選擇 SQL,並將正確的 GRANT 語法貼到文本框中以實現這一點。
如何使用不安全的資料庫連線方式
在 phpbb_recent_topics 外掛/設置頁面上,勾選“啟用不安全的資料庫連線”框,並提交,刷新頁面後,您會看到一些可以填寫的訊息,從您的 phpbb config.php 中填入:
$dbuser = phpbb MySQL 資料庫使用者名稱
$dbpasswd = phpbb MySQL 資料庫密碼
$dbhost = phpbb MySQL 伺服器:
點擊“更新”,即可完成連線!
回撥函數
為了允許使用者自定義顯示項目,已實現了一個回撥函數 phpbb_topics_callback。
在工單 1216 中,phil 建議在主題清單中顯示論壇名稱。以下代碼是新回撥函數的示例使用,應添加到您的主題 functions.php 中:
function phpbb_topics_callback($phpbbdb, $wpdb, $lnx_PRT_options, $topic) {
// 獲取發布文章所在的論壇 - Phil Ewels,2010 年 09 月 26 日
$sql_query = "SELECT * FROM $lnx_PRT_options[prt_phpbb_ft] WHERE forum_id=" . $topic->forum_id. " LIMIT 1";
# 執行查詢
if ($lnx_PRT_options['prt_phpbb_dbinsecureon'] == "1") {
$forum = $phpbbdb->get_row($sql_query);
} else {
$forum = $wpdb->get_row($sql_query);
}
echo "
" . $forum->forum_name . " ";
}
以下變數可在回撥函數中使用:
* $wpdb
** 如果使用 Secure 連線,這是您到 PHPBB 資料庫的連線
** 如果使用 Insecure 連線,這是標準的 WordPress 資料庫
* $phpbbdb
** 如果使用 Secure 連線,這將是 NULL
** 如果使用 Insecure 連線,這是您到 PHPBB 資料庫的連線
* $lnx_PRT_options
** phpbb-recent-topics 設定的陣列
* $topic
** 當前話題,具有相關屬性。
原文外掛簡介
Do you have a phpBB forum, do you want to drag your blog readers into your forum ? Then this plugin might just help, you can include somewhere in wordpress a list of recent phpbb threads (topics) in a page, a post, and even in your theme – so your sidebar for example !
A bit about Database configuration.
If wordpress & phpBB share a DB already then set $PHPBBDB to DB_NAME and everything will be fine, else you.re going to need to GRANT the wordpress user read access to phpBB. (If you really need to, you can store the phpbb databse credential in the plugin using the “Insecure” connectivity method.)
How to GRANT wordpress read only access to phpBB ?
If you don.t know it already you need to find your wordpress mysql user id, it.ll be in wp-config.php
define('DB_USER', 'wp_user'); // Your MySQL username
and you should have already found your phpbb database & table for the above.
You need to type the following syntax into your mysql database
GRANT SELECT ON phpbb_database.phpbb_topics TO wp_user@localhost;
AND
GRANT SELECT ON phpbb_database.phpbb_forums TO wp_user@localhost;
AND
GRANT SELECT ON phpbb_database.phpbb_posts TO wp_user@localhost;
this can be achieved by logging into phpmyadmin as your phpbb user, selecting SQL and pasting the correct GRANT into the text box.
How to use the Insecure Database Connectivity Method
From the phpbb_recent_topics admin / settings page, tick the .Enable Insecure Database Connection. box, and submit, when the page re-freshes you.ll have some more boxes to populate, from your phpbb config.php fill in
$dbuser = phpbb MySQL Database UserName
$dbpasswd = phpbb MySQL Database Password
$dbhost = phpbb MySQL Server
Click update, and you should be connected!
The Callback function
To allow users to customize what is / can be displayed a callback function phpbb_topics_callback has been implemented.
In ticket 1216 (https://plugins.trac.wordpress.org/ticket/1216) phil suggested that the forum name should be displayed within the topic list; the following code is an example use of the new callback function and should be added to your themes functions.php
function phpbb_topics_callback($phpbbdb, $wpdb, $lnx_PRT_options, $topic) {
// GET FORUM WHICH POST IS IN - Phil Ewels, 26/09/2010
$sql_query = "SELECT * FROM $lnx_PRT_options[prt_phpbb_ft] WHERE forum_id=" . $topic->forum_id. " LIMIT 1";
# Run Query
if ($lnx_PRT_options['prt_phpbb_dbinsecureon'] == "1") {
$forum = $phpbbdb->get_row($sql_query);
} else {
$forum = $wpdb->get_row($sql_query);
}
echo "
" . $forum->forum_name . " ";
}
The following variables can be used within your callback function:
* $wpdb
** If using Secure Connectivity this is a connection to your PHPBB Database
** If using Insecure Connectivity this is the standard WordPress Database
* $phpbbdb
** If using Secure Connectivity this will be NULL
** If using Insecure Connectivity this is a connection to your PHPBB Database
* $lnx_PRT_options
** An array of the phpbb-recent-topics settings
* $topic
** The current topic, with associated attributes.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「phpbb_recent_topics」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.3 | 0.4 | 0.6 | 0.7 | 0.4.1 | 0.4.2 | 0.5.2 | 0.5.3 | 0.7.1 | trunk |
延伸相關外掛(你可能也想知道)
WPYog Documents 》這是一個非常簡單的外掛程式,可讓您上載各種檔案並建立文件清單。, 此外掛程式可以輸出一個無序文件清單。, , 文件以新增日期排序。最新的文件在頂部。, 短...。
bbPress – Report Content 》讓您的 bbPress 論壇使用者能夠舉報主題或回覆中的不適當內容或垃圾訊息。這個外掛會在主題和回覆上新增一個「舉報」管理員連結,點擊後,主題/回覆將被指派...。
bbPress Protected Forums 》bbPress Protected Forums 外掛會在討論區的編輯頁面中添加一個元框,允許您禁用特定使用者角色的新主題創建功能。, 此外掛很適合用於您希望使用者僅能查看討...。
bbPress Pencil Unread 》bbPress Pencil Unread會顯示已經被登錄使用者讀取的bbPress論壇/主題,並為論壇/主題添加類別,以便您輕鬆自定義主題。, 與BuddyPress群組論壇功能兼容。, ,...。
bbPress Live Topic Suggestions 》我們在 InboundNow 的 bbPress 支援論壇上開發了這個工具。我們的目標是在使用者建立新主題標題時,提供相關主題以減少客製化支援負載。, 任務完成。, 開發人...。
SermonPress 》這是一個完全可自定義的講道庫外掛程式,可加入音訊及影片講道。 , 文件, , 說明中心, 聖經經文引用設置, , 外掛程式連結, , 專案頁面, 文件, 。
WP-Phpbb Last Topics 》此外掛用於顯示您的 phpBB 論壇中最近的主題(可適用於 phpbb 2.* 和 phpbb 3.*),您可以設置要顯示的主題數量、自動換行長單詞或排除某一論壇分類。插件主頁。。
BBP Close Old Topics 》BBP Close Old Topics 是一個針對 bbPress 的擴充套件,當話題存在一段由管理員定義的時間(一週至一年)後便會自動關閉。此處所設置的時間將與話題的新鮮度...。
Innovade Learndash Activities 》- LearnDash是一個出色的學習管理系統(LMS),它使您能夠有效地管理網上課程。- 如果您希望增強課程的參與度和互動性,您可能需要考慮添加更多主題類型並調...。
mybb Last Topics 》這個外掛可以讓您在 WordPress 網站上顯示 mybb 論壇的最新帖子。, 功能:, , 快速且容易安裝和使用, 查看最新帖子論壇的標題、最新回覆、訪問次數,以及最新...。
Menu Extension for bbPress 》, 我們提供每小時 $10 的高級安裝和定制支持。, 點擊這裡 了解更多信息。, , 與添加其他菜單項目一樣,您可以將“bbPress Links”添加到WordPress菜單中!, 功...。
bbPress Top Contributors 》這是一個 WordPress 外掛的簡短代碼,可以顯示發表文章最多的作者。。
bbPress Popular Topics 》此為Shortcode,用於顯示回覆數量較多的主題。
bbPress – No Admin 》在 wp-admin 內,除了超級管理員,禁止所有使用者創建 bbPress 內容。, 此外掛沒有使用者介面。。
bbPress Like Topics 》讓您的社群成員通過添加「讚」按鈕到 BBPress 主題來表達他們的喜愛。安裝只需要幾分鐘,只需將短碼放在那裡即可!。