內容簡介
此小型插件可讓您輕鬆地將動態更新的表格從 www.faustball.com 整合到每個頁面、文章和小工具中。它提供多種設計和配置選項,例如自定義表格標題(包括外部比賽數據和比賽鏈接)、顯示/隱藏表格標題、自定義比賽列標題、faustball.com 的面包屑導航、以您的球隊高亮顯示表格行、標記晉級和降級的球隊行,以及顯示/隱藏帶有球的列。
為了不阻塞您的主頁,當 faustball.com 沒有及時響應時,可以設置可配置的超時(默認為1秒)。此插件還啟用 HTML 小工具中的簡碼使用(在標準 WordPress 中禁用)。最後,您可以搜索所有頁面以查找 [faustball] 簡碼,以便輕鬆識別可能需要對 [faustball] 簡碼設置進行重新編輯的頁面。
為了減輕對 faustball.com 的負擔,此插件使用具有可配置的 TTL 的本地表緩存。只有在 TLL 過期時才會從 faustball.com 請求新數據。此外,它可以檢測到爬行器、機器人和蜘蛛的請求,然後僅發送緩存中的數據。如有必要,可以刪除緩存的數據。
使用非常簡單:
簡碼
[faustball contest=<比賽編號>]
基本上就這麼簡單!
屬性 "contest" 為必填項,並描述應在其中顯示表格的比賽。要查找編號,請轉到 faustball.com 上期望的比賽頁面,然後從 URL 中複製編號。這是Dirk Haase的說明中的ID相同。
例如:在男子“Bundesliga Süd”2018年賽季中,表格位於此比賽鏈接中:https://faustball.com/#/contest/257/competition。
這意味著必須輸入 contest = 257 在簡碼中:
[faustball contest=257]
這是使用的最簡單形式。
其他可選屬性
ownteam='<own team>' [string/1/0]
如果設置了此屬性,則對應的表格行將提供 CSS 類 "fb_ownteam",如果傳輸的名稱與表格中的球隊名稱匹配(子字符串就足夠)的話。
可以使用相應的 CSS 標記突出顯示此行。
如果此屬性設為“1”,將使用在插件設置中定義的 ownteam 字符串。
如果未使用此屬性或將其設置為“0”,則不會添加 CSS 類 "fb_ownteam"。
balls='<balls>' [0/1]
使用此屬性可隱藏“balls (球)”列。為此,該列附帶 CSS 類 "display-none"。當然,需要在樣式表中定義帶有“display: none;”的 CSS 類 "display-none"。
優點是,在表格代碼中添加此額外的可選 CSS 標記後,可以顯示一次不帶球的表格(例如在側邊欄中的小工具中),以及在球隊頁面中顯示相同的表格以及帶有球的表格。
如果未使用該屬性,則會顯示球。
header='<header>' [0/1]
使用此屬性可控制第一個標題行的顯示。
如果未使用此屬性,則會顯示第一個標題行。有關格式化能力的信息,請參閱屬性 "ownheader"。
ownheader='<ownheader>' [string]
此屬性可用於組合自定義表頭。它可以包含文字和可選的 HTML 標記。例如使用='”將表頭置於右側。
報告帶有類似 fb_promotion 的類的升級和降級的行。所有類都以“fb_”開頭,可以添加自己的流量。
例如:
[faustball contest = 257 ownheader=“ Ranking”]。
外掛標籤
開發者團隊
原文外掛簡介
This small plug-in enables an easy integration of dynamically updated tables from www.faustball.com into every page, post and widget. It offers many design and configuration possibilities, like a custom table header (including external contest data and link to contest), show/hide table headers, custom contest column headers, breadcrump navigation from faustball.com, highlight the table row with your own team, marking of the rows of promoted and relagated teams, as well as to show/hide the column with the balls. To not block your homepage when faustball.com does not respond timely, a configurable timeout (default 1s) can be set. This plugin also enables the usage of shortcodes in HTML Widgets (disabled in standard WordPress). Finally you can search all pages for the [faustball] shortcode, so you can easily identify the pages, where a rework on the [faustball] shortcode settings might need to be done. To reduce load on faustball.com this plugin uses a local table cache with configurable TTL. Only when the TLL has expired new data is requested from faustball.com. Additionally requests from crawlers, bots and spiders are detected and only data from the cache is then sent. The cached data can be deleted, if necessary.
Usage is very easy:
The shortcode
[faustball contest=
is basically all it takes!
The attribute “contest” is mandatory and describes the competition from which the table should be displayed. To find out the number, go to the desired competition page on faustball.com and copy the number from the URL. This is the same number as the ID in Dirk Haase’s instructions.
Example: In the field season 2018 in men’s “Bundesliga Süd”, the table is located in this contest link: https://faustball.com/#/contest/257/competition.
This means that contest = 257 must be entered in the shortcode:
[faustball contest=257]
This is the simplest form of use.
Additionally, the attribute “competition” can be used to address a specific table in contests with more than one table. To find out the ID, go to the structure of the contest and select the link to the table you want to show. In the URL you find the attribute “compId”, which is the ID you must use here.
[faustball contest=6315 competiton=41603]
Other optional attributes
ownteam='
If this attribute is set, the corresponding table line is provided with the CSS class “fb_ownteam”, if the transfered name matches (substring is sufficient) a team name in the table.
This line can be highlighted using the appropriate CSS markup.
If this attribute is set to “1”, the ownteam string that is defined in the plugin settings is used.
If this attribute is not used or set to “0”, no CSS class “fb_ownteam” is added.
balls='
The “balls” column can be hidden using this attribute. For this purpose, the column is provided with the CSS class “display-none”. A definition of the CSS class “display-none” with “display: none;” in the stylesheet is of course also necessary.
The advantage is that with this additional, optional CSS markup in the table code, it is possible to display a table once without balls (e.g. in a widget on the side), but the same table with the balls on a team page.
If the attribute is not used, the balls are displayed.
header='
With this attribute the display of the first header row can be controlled.
If this attribute is not used, the first header row is shown. See also attribute ‘ownheader’ for formating capabilities.
ownheader='
This attribute enables to compose the first header row with custom text and data from the contest.
If this attrubute is not used or is empty, the format string from the settings page is used (Default: ‘%A%: %N% %R%’).
%A% = Association
%N% = Name of contest
%R% = Region
%C% = Category
%G% = Gender
%O% = String from ownteam attribute (empty, if ownteam attribute is not defined)
%L% = Link header to contest (position in attribute is not relevant)
Examples:
* “My Team 1 – %N%”
* “%L%My Team 1 – %N%”
* “%O% – %N% %L%”
breadcrump='
Shows the breadcrump navigation from faustball.com in a second table header row.
If the attribute is not used, the navigation row is not shown.
contestlink='
Controls the display of the table footer area with the link to the faustball.com contest and info about cached data.
If the attribute is not used, the area is shown.
The shortcode can then look like this:
[faustball contest=257 ownteam="TV SW-Oberndorf" ownheader="%O% - %C%, %N%" balls=0 contestlink=0]
See Screenshots for a view of this shortcode.
Plugin settings
The whole Plugin is very configurable. See help section of the plugin settings page.
* You can predefine your match string, that will be used for [faustball] shortcodes, that have the attribute ownteam=’1′.
* The ownteam string search strategy can be selected (wildcard/exact match)
* The table header can be predefined, that will be used for every [faustball] shortcode, unless you define something different directly in the shortcode.
* Every column heading can be defined (also with empty string).
* Set the timeout after which the plugin cancels the query of a table (default: 1s).
* Set the time range how long cached data is valid until fresh data is requested from faustball.com (default: 900s).
* Activate the usage of shortcodes in HTML Widgets (default: true).
Plugin Homepage
