Most PHP installations include cURL.
ul>
Once you have the Challonge plugin installed and activated on your website, you will need to enter your Challonge.com API key in ‘Settings’ > ‘Challonge’.
一旦您在网站上安装并激活了Challonge插件,就需要在“设置”>“挑战”中输入Challonge.com API密钥。
Once you have done that, you have unlocked the full power of this nice plugin.
完成此操作后,您便可以释放此精美插件的全部功能。 p>
Shortcode
简码 h4>
You may use a shortcode in posts and pages to display a tournament or list out tournaments.
您可以在帖子和页面中使用简码显示比赛或列出比赛。 p>
[challonge]
– This will list out all tournament brackets in your account, excluding all organizations.-
[challonge] code> strong> –这将列出您帐户中所有比赛的括号,但不包括所有组织。 li>[challonge url="w4la9fs6"]
– This will embed a tournament bracket.-
[challonge url =“ w4la9fs6”] code> strong> –这将嵌入比赛括号。This may be any Challonge bracket, not just your own.
这可能是任何Challonge括号,而不仅仅是您自己的。 li>
[challonge subdomain="my_sub"]
– This will list out all tournament brackets in the ‘my_sub’ organization.-
[challonge subdomain =“ my_sub”] code> strong> –这将列出“ my_sub”组织中的所有比赛括号。 (eg: my_sub.challonge.com)
(例如:my_sub.challonge.com) li>
[challonge url="w4la9fs6" theme="2" show_final_results="1" width="90%" height="600px"]
– This is just-
[challonge url =“ w4la9fs6” theme =“ 2” show_final_results =“ 1” width =“ 90%” height =“ 600px”] code> strong> –这只是a more customized version of the first shortcode.
第一个简码的定制版本。 li>
ul>
If you have a tournament bracket within an organization, you will have to use the subdomain
attribute along with the url
attribute, like so:
如果您在组织中拥有锦标赛级别,则必须使用 subdomain code>属性以及 url code>属性,如下所示: p>[challonge url="w4la9fs6" subdomain="my_sub"]
[challonge url =“ w4la9fs6” subdomain =“ my_sub”] code> strong> p>Here’s all the shortcode attributes available to you:
以下所有可用的简码属性: p>
url
– The URL to a tournament.-
url code> strong> –锦标赛的URL。 li>subdomain
– The subdomain of the tournament URL or if no tournament URL is provided, the listing will be tournaments within the specified subdomain.-
子域 code> strong> –锦标赛URL的子域,或者如果未提供锦标赛URL,则列表将是指定子域中的锦标赛。 li>theme
– The theme ID you would like to use.-
主题 code> strong> –您要使用的主题ID。 li>multiplier
– Scales the entire bracket.-
乘数 code> strong> –缩放整个括号。 li>match_width_multiplier
– Scales the width allotted for names.-
match_width_multiplier code> strong> –缩放为名称分配的宽度。 li>show_final_results
– Display the final results above your bracket.-
show_final_results code> strong> –在括号上方显示最终结果。 li>show_standings
– For round robin and Swiss tournaments, you can opt to show a table of the standings below your bracket.-
show_standings code> strong> –对于循环赛和瑞士锦标赛,您可以选择在方括号下方显示排名表。 li>width
– The width of the embedded tournament bracket.-
width code> strong> –嵌入式锦标赛括号的宽度。 li>height
– The height of the embedded tournament bracket.-
height code> strong> –嵌入式比赛支架的高度。 li>limit
– Limit the number of returned results for tournament listings.-
限制 code> strong> –限制比赛列表返回结果的数量。 li>allowusers
/ denyusers
/ allowroles
-
allowusers code> strong> / denyusers code> strong> / allowroles code> strong> / denyroles
– A comma separated list of users or roles you would like to specifically allow or deny from viewing the tournament bracket or tournament listings.
/ denyroles code> strong> –用逗号分隔的用户或角色列表,您希望这些用户或角色明确允许或拒绝查看比赛支架或比赛清单。 li>statuses
/ excludestatuses
– A comma separated list of tournament statuses you would like to specifically show or hide-
状态 code> strong> / 排除状态 code> strong> –您要特别显示或隐藏的比赛状态的逗号分隔列表from the tournament listings.
从锦标赛列表中。
All statuses: “Pending,Checking In,Checked In,Underway,Awaiting Review,Complete”
所有状态:“待处理,签入,签入,正在进行,正在等待审核,完成” li>
listparticipants
– List participants currently in the tournament.-
列表参与者 code> strong> –列出当前在锦标赛中的参与者。 (Must be used with url
) – New in 1.1.6!
(必须与 url code>一起使用)– 1.1.6中的新功能! strong> li>
ul>
Widget
小部件 h4>
To allow your users to signup and report their own scores, just add the plugin widget.
要允许您的用户注册并报告自己的分数,只需添加插件小部件即可。 p>
The widget has the following options:
窗口小部件具有以下选项: p>
- Title – The title of the widget, nothing special here.
- 标题 strong> –小部件的标题,此处无特殊之处。
Defaults to ‘Challonge’.
默认为“挑战”。 li>
- Subdomain – The subdomain to list your tournaments from.
- 子域 strong> –用于列出您的锦标赛的子域。
(Optional)
(可选) li>
- Tournament Filter – Only tournament names that match this filter will be listed.
- 比赛过滤器 strong> –仅列出与此过滤器匹配的比赛名称。
(Optional) This may be a simple wildcard filter, for example My * Tournament
will match ‘My Big Tournament’ but not ‘Your Big Tournament’.
(可选)这可能是一个简单的通配符过滤器,例如 My * Tournament code>将匹配“ My Big Tournament”,但不匹配“ Your Big Tournament”。If you need a more robust filter, you may use Regular Expressions (PCRE) like so: /My \d+(st|nd|rd|th) Tournament/i
will match 'My 3rd tournament' but
如果您需要更强大的过滤器,则可以使用正则表达式(PCRE),如下所示: / My \ d +(st | nd | rd | th)Tournament / i code>将与“ My 3rd Tour”匹配,但not 'My Third Tournament'
不是“我的第三场比赛” li>
- Status Filter – Only list tournaments with the selected statuses, unless none are selected.
- 状态过滤器 strong> –仅列出具有选定状态的锦标赛,除非未选择任何状态。 li>
- Max tournaments listed – The maximum number of tournaments that the widget will list.
- 列出的最大比赛数 strong> –小部件将列出的最大比赛数。
Defaults to 10.
默认值为10。 li>
ul>
Integrating Challonge.com Tournaments
整合Challonge.com锦标赛 h4>
Challonge.com tournaments may be easily setup to allow your WordPress users to signup and report scores.
Challonge.com锦标赛可以轻松设置,以允许您的WordPress用户注册并报告分数。
Here are a few things you should know when setting up your Challonge.com tournaments:
在设置Challonge.com锦标赛时,您应该了解以下几点: p>
- Turning ‘Host a sign-up page’ on will allow your users to signup through the widget.
- 打开“托管注册页面”将使您的用户可以通过小部件进行注册。 li>
- In ‘Advanced Options’ > ‘Permissions’: Turning ‘Allow participants with Challonge accounts to report their own scores.’ on will allow your users to report their own scores through the widget.
- 在“高级选项”>“权限”中:启用“允许具有Challonge帐户的参与者报告自己的分数。”将允许您的用户通过小部件报告自己的分数。 li>
- In ‘Advanced Options’ > ‘Permissions’: Turning ‘Exclude this event from search engines and the public browsable index.’ on will hide the tournament from the shortcode and widget tournament listings.
- 在“高级选项”>“权限”中:启用“从搜索引擎和公共可浏览索引中排除此事件。”将从短代码和小部件锦标赛列表中隐藏该锦标赛。 li>
ul>
Did You Know?
您知道吗? h4>
If you run the same tournaments on multiple WordPress websites, your WordPress users will be tracked in your Challonge.com tournaments by their email address and login name, even if their display name differs.
如果您在多个WordPress网站上运行相同的锦标赛,即使显示名称不同,也会通过其电子邮件地址和登录名在您的Challonge.com锦标赛中跟踪WordPress用户。
With this in mind, users may signup and report their score using either website.
考虑到这一点,用户可以使用任何一个网站进行注册并报告分数。
Also note, users who change their email address will lose access to any of their preexisting tournament signups.
另外请注意,更改电子邮件地址的用户将无法访问其任何现有的锦标赛注册。 p>
Good luck!
祝你好运! p>