內容簡介
60;br />
此插件已不再維護!
出於歷史目的,此插件仍然在線上。一般概念仍可能有用,
但程式碼可能已無法運作且過時落伍。
使用 bbAggregate 從您的多站點 WordPress 安裝中建立網站範圍聚合內容串流。
串流包含來自那些被允許參與串流的部落格文章。任何寫作的使用者都可以將其文章添加到一個或多個串流中。
透過使用特定的頁面模板來顯示串流,它提供了與網站範圍分類 / 全域專有名 / 全域術語相似的功能,但更具有控制和(希望如此)更少的錯誤行為。
此插件會向您的安裝添加兩個資料庫表:
$prefix_bbAggregate_item(將項目與串流連結)
$prefix_bbAggregate_stream(包含串流資訊)
NB: 此插件僅適用於使用了多個部落格的 WordPress 多站點安裝。
它是如何運作的?
首先,您需要創建一個串流(必需使用者能力:‘manage_options’,管理員角色完美適用)。(參見screenshot-4.png)
建議僅在串流名稱中使用字母、數字和底線或破折號。目前名稱中的空格可能會導致問題。
串流由名稱、描述(儲存但尚未公開使用)和一些選項(參見screenshot-5.png)來定義,例如:
文章限制(限制串流中的總文章數量)
每個部落格文章數限制(限制串流中每個部落格中的文章數)
每頁文章數(限制每頁文章數。包括分頁)
排除部落格(明確排除使用此串流的部落格。這些部落格的文章將不會顯示在此串流中)
創建串流後(參見screenshot-6.png和screenshot-7.png),在未排除使用此串流的部落格中的一個部落格中創建文章。在文章編輯區域下方,您將看到一個名為
Streams(參見screenshot-8.png)的新元框,其中列出了可用串流(已排除此部落格的串流將不會顯示)。勾選串流名稱前面的
核取方塊,您已將文章添加到此串流中。每個能夠新增文章的使用者都可以將他/她的文章新增到顯示的串流上。
為了顯示內容串流,您(或您使用的主題設計師)需要為顯示項目準備主題。您需要一個頁面模板
。可以在bbAggregate/examples中找到一個範例,模板稱為:bbAggregate-template-aggregated-posts。您現在可以複製
它到您的活動主題目錄中,以便測試bbAggregated。請注意,它不會使用您主題的樣式!
在您複製了頁面模板的部落格中創建一個頁面,並將聚合文章模板選為頁面的模板。添加名稱為‘bbagg_stream’(不使用引號)的自訂欄位,自訂欄位值為您希望顯示的串流名稱(參見screenshot-11.png)。
順帶一提,範例頁面模板中自訂欄位名稱是硬編碼的,但是,只要您也使用新名稱來更改模板中的名稱,就可以將其更改為您自己的自訂欄位。
在添加自訂欄位名稱和值以及發佈頁面後,您可以查看該頁面,您現在應該看到您的文章部分
成為串流的聚合內容(參見screenshot-12.png)。
注意:可透過訪問超級管理員 -> 選項(參見screenshot-9.png)來全站更改串流預設選項。查找
外掛標籤
開發者團隊
原文外掛簡介
THIS PLUGIN IS NOT MAINTAINED ANYMORE!
For historical purposes this plugin is still online. The general concept could still be useful,
the code is probably not working and horrible outdated.
Create streams of sitewide aggregated content from your multisite WordPress installation with bbAggregate.
A stream contains posts from those blogs allowed to participate in the stream. Anyone writing posts can add his/her post to one or more streams.
The streams are shown by using a specific page template. (see also the examples directory). It offers functionality similar
to the sitewide categories / global terms, but with more control and (hopefully) less buggy behaviour.
This plugin adds two database tables to your installation:
$prefix_bbAggregate_item (links an item to a stream)
$prefix_bbAggregate_stream (contains the stream info)
NB: This plugin is only useful for a WordPress Multisite installation in which multiple
blogs are being used.
How does it work?
First, you create a stream (neccessary user capabillity: ‘manage_options’,admin role works perfectly). (See screenshot-4.png)
It is recommended to only use letters, numbers and underscores or dashes in the stream name. Spaces in the name may cause problems at the moment.
Streams are defined by a name, a description (which is saved but not yet accessible for public use) and some options (see screenshot-5.png) such as:
maximum number of posts (limits the total amount of posts in a stream)
maximum number of posts per blog (limits the amount of posts per blog in a stream)
number of posts per page (limits the amount of posts per page. Pagination is included)
excluded blogs (blogs which have been explicitly excluded from using this stream. Posts from these blogs will not be shown in this stream)
After creating a stream (See screenshot-6.png and screenshot-7.png), create a post in a blog which is not excluded from this stream. Below the Post Editing Area you will see a new metabox called
Streams (see screenshot-8.png) with a list of available streams (streams which have excluded this blog are not shown). By ticking the checkbox in front of the stream name
you’ve added your post to this stream. Every user able to add a post may add his/her posts to the streams shown.
To show a stream of content you (or the theme designer of the theme you use) need to prepare the theme for showing the items. You need a page template
for this. An example of this can be found in bbAggregate/examples and the template is called: bbAggregate-template-aggregated-posts. For now you can copy
it into the directory of your active theme so you can test bbAggregated. Keep in mind though that it will not use your theme’s style!
Create a page in the blog where you also have copied the page template and select the Aggregated Posts template
as the page’s template. Add the customfield with the name ‘bbagg_stream’ (without quotes) and customfield value the exact(!) stream name of the stream you want to show (see screenshot-11.png).
By the way, the example page template the custom field name is hardcoded, but you can change it in the template as long as you also use the new name
for your customfield. After adding the customfield name and value and publishing the page you can view the page and you should now see your post part
of the stream’s aggregated content (see screenshot-12.png).
Note: The stream default options can be changed sitewide by visiting the Super Admin->Options (See screenshot-9.png). Look for ‘bbAggregate sitewide defaults’ (see screenshot-10.png). After changing
the options’ values and saving the changes new streams will use your new defaults. This can only be done by users with super admin rights. Keep in mind that streams are sitewide. Thus streams created in blog 1
are also visible in the bbAggregate settings of blog 2.
TODO
Feel free to send patches 😉
Remove database tables upon delete of plugin
Add .po and .mo files for translations
Create php doc files
