前言介紹
- 這款 WordPress 外掛「bbP Topic Views」是 2011-08-20 上架。
- 目前有 60 個安裝啟用數。
- 上一次更新是 2012-02-09,距離現在已有 4837 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 有 3 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
count | views | gautam | bbPress | topic views |
內容簡介
bbP Topic Views 會追蹤每個 bbPress 主題被瀏覽的次數,然後在論壇頁面、主題存檔頁面、標籤頁面和檢視頁面的主題標題或元數據旁顯示計數。
插件的編寫方式不會在訪客瀏覽同一主題的不同頁面時重複計算視圖次數。如果特定主題沒有視圖計數記錄,插件將為其創建記錄。插件將初始視圖計數設置為該主題中的帖子數,而不是零,因為顯然該主題至少被瀏覽了與發表的帖子數相同的次數!這對於添加插件到現有的 bbPress 論壇非常方便,因為每個主題的視圖計數不是零。
插件還為您提供一些函數,您可以在模板中調用這些函數輸出主題視圖計數,還提供了一些短碼,您可以在文章中放置這些短碼以生成最多瀏覽的主題的主題表格(請參閱 其他說明)。你現在可能已經猜到了,這也有一個視圖。
本插件是 bbPress 獨立的 ck 和 wittmania 的 bb Topic Views 插件的分支。非常感謝他們!
短碼
[bbp-single-view id="btv-most-viewed"] 生成最多瀏覽的主題的主題表格。
函數調用
$bbp->shortcodes->display_view( array( 'id' => 'btv-most-viewed' ) ); 生成最多瀏覽的主題的主題表格。
btv_topic_view_count( $topic_id ) 或
btv_get_topic_view_count( $topic_id ) 輸出或檢索所提供主題 ID 的視圖計數(選擇性,如果沒有傳遞,則使用 bbp_get_topic_id() 函數猜測主題 ID)。
要將視圖計數列添加到主頁面、論壇頁面和/或標籤頁面表格中,請進行以下修改。注意:這些適用於默認的 bbPress (TwentyTen)主題。如果您使用不同的主題或高度修改的默認主題,您的修改可能略有不同。建議如果你在遵循這些步驟之前做你的主題的子主題,那麼當您升級 bbPress 或主題時,您的更改不會丟失。
到 管理區 -> 設置 -> 論壇 ->(向下滾動至)bbP 主題視圖,並勾選不自動添加選項。這將防止視圖計數自動添加到任何地方。
打開 your-theme-name/bbpress/loop-topics.php。在大約 17 行附近,您會發現:
將其替換為:
大約在第 71 行,您會發現:
替換為:
如果您想重新排列列的順序,可以進行更改,只需確保您依照每個部分的正確順序進行排列。
翻譯
意大利語由 Alex提供
捐贈
您可以通過這裡進行捐贈 here。
待辦事項
現在沒有。
原文外掛簡介
bbP Topic Views keeps track of how many times each bbPress topic has been viewed, and then displays the count alongside the title or meta of the topic on forums pages, topic archive pages, tag pages and view pages.
The plugin is written in such a way that it does not double-count views when a visitor browses to a different page in the same topic. If no view count record exists for a specific topic, the plugin will create a record for it. Rather than setting the initial view count to zero, the plugin sets it to the number of posts in the topic, because it has obviously been viewed at least as many times as people have posted in it! This is especially nice for adding the plugin to existing bbPress forums so the view count isn’t zero for every single topic.
The plugin also offers you some functions, which you can call in your template to output the topic view count and some shortcodes which you can place in your posts to generate a topic table for most viewed topics (see Other Notes). As you might have guessed till now, there is also a view for the same.
This plugin is a fork of ck and wittmania’s bb Topic Views plugin for bbPress standalone. Many thanks to them!
Shortcode
[bbp-single-view id="btv-most-viewed"] to generate a topic table for most viewed topics.
Function Calls
$bbp->shortcodes->display_view( array( 'id' => 'btv-most-viewed' ) ); to generate a topic table for most viewed topics.
btv_topic_view_count( $topic_id ) or
btv_get_topic_view_count( $topic_id ) to output or retrieve the view counts for the supplied topic id (optional, if not passed, it is guessed by using the bbp_get_topic_id() function).
To add a view count column to front page, forum, and/or tags page tables, make the following modifications. Note: these apply to the default bbPress (TwentyTen) theme. If you are using a different theme, or a highly modified version of the default, your modifications may be slightly different. It is recommended if you make a child theme of your theme before following these steps so that when you upgrade bbPress or your theme, your changes are not lost.
Go to Admin Section -> Settings -> Forums -> (scroll down to) bbP Topic Views and check the add nowhere option. This will prevent the view count from being added anywhere automatically.
Open your-theme-name/bbpress/loop-topics.php. Around line 17, you would find:
Replace it with:
Around line 71, you would find:
Replace it with:
You can rearrange the order of the columns if you’d like, just make sure you get them in the right order for each section.
Translations
Italian by Alex
Donate
You may donate by going here.
Todo
Nothing for now.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「bbP Topic Views」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Simple Download Monitor 》我開發了「Simple Download Monitor」外掛,因為我需要一個好的方式來管理我的數位下載,並監測我檔案和文件的下載次數。, , 此外掛非常適用於管理和追蹤您的...。
Post Views Count (Support caching plugins!) 》重要提示:3.0 版本支援快取外掛!, 當有人訪問一則文章或頁面(不包括搜尋引擎爬蟲時),它會將瀏覽次數加 1。, 但這還不是全部,這些計數器會分成逐日、逐...。
Waiting: One-click countdowns 》一鍵倒數計時。, 倒數計時到一個日期或特定持續時間(例如從頁面加載開始的 60 秒)。, 功能:, , 無限的倒數計時。, 易於使用的可視化構建器,具有實時預覽...。
GravityWP – Count 》請造訪 GravityWP.com 取得文件。, 最簡單的短代碼版本(計數並顯示指定 Gravity Form 表單的條目數量):, [gravitywp_count formid=''], , 當您需要數字欄...。
WooCommerce Cart Count Shortcode 》如果您正在尋找在您的網站的 WooCommerce 購物車中靈活顯示項目的方法,那就不用再尋找了!此外掛可讓您在網站的任何位置插入短碼,以生成 a href 鏈接。, 參...。
Posts Character Count Admin 》此外掛會在文章管理子面板中加入一個欄位,顯示每篇文章中的字元計數。, 在文章編輯子面板中,此外掛同樣會在「字數計算」附近提供每篇文章的字元計數,協助...。
Easy CountDowner 》Easy Countdowner 讓你能夠在你的文章或網頁上顯示倒數計時器。將全定制的 HTML5 倒數計時器放置到最簡單地方。只需點擊 tinyMce 編輯器中的 countDowner 按...。
Countdown Timer 》倒數計時器可讓您設置一個或多個要倒數至或倒數離開的日期。, 事件可以使用小工具插入側邊欄,或使用短碼插入文章和頁面中。, 目前支援22種語言。, 翻譯, 使...。
AJAX Hits Counter + Popular Posts Widget 》本外掛使用外部 AJAX 計數器腳本來記錄文章的瀏覽次數,是最適合快取整個頁面或使用其他快取外掛的解決方案。, 此外,外掛還包含了「熱門文章」小工具,可根...。
Simple Post Views Count 》插件被棄用了, 現在,我們終於確信谷歌分析統計和追蹤系統是無與倫比的先進做法(其他插件也是,例如:Google Analytics [by MonsterInsights]),相較於無用...。
Dashboard Wordcount 》更新儀表板的 At a Glance 小工具,以顯示此 WordPress 網站中所有已發表文章的總字數(及每篇文章的平均字數)。還會顯示網站的年齡(自最老的文章以來的時...。
Posts Social Shares Count 》關於, 您可以使用此外掛程式,透過文章 ID 取得某篇文章的分享數量。, 如何使用, 例如,在迴圈中使用 echo pssc_facebook() 函數,或是在任何地方使用 echo p...。
bbp topic count 》這個 bbPress 外掛可以在每個主題/回覆檢視中,顯示主題總數、回覆總數和總計數的任意組合,並且允許您自訂標籤,例如「已建立的主題:253」或「主題 — 253」...。
Most Read Posts in XX days 》「最多閱讀文章」外掛可以計算文章和頁面的點擊次數,並讓你在以下頁面上展示它們:, , 單篇文章頁面, 頁面, 索引頁面和存檔頁面, 可配置的小工具,也可帶有...。
WordPress Word Count and Limit 》這個外掛可以在編輯文章視窗的底部即時將字數資訊替換為字元/單字計算。此外,您可以將字元/單字計算限制在指定的使用者角色中。, 這裡列出了設定清單(詳細...。