[WordPress] 外掛分享: NetDraw

首頁外掛目錄 › NetDraw
WordPress 外掛 NetDraw 的封面圖片
全新外掛
安裝啟用
尚無評分
17 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v1.1.0 上架:2026-07-22

內容簡介

NetDraw 是一款輕量級的 WordPress 外掛,專為管理和顯示淘汰賽網球錦標賽而設計。它提供簡單的介面,讓使用者能夠在 WordPress 網站上輕鬆創建和管理比賽,而無需依賴繁瑣的第三方網站。

【主要功能】
• 簡易設置:像撰寫文章一樣創建新比賽
• 彈性大小:選擇比賽規模(8、16、32 或 64 名選手)
• 繪圖類型:支援單淘汰賽和資格賽
• 簡單資料輸入:動態生成乾淨的輸入格
• 自動進展:自動推進勝利者至下一輪
• 響應式設計:適用於各種裝置的流暢顯示

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「NetDraw」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

NetDraw is a lightweight, spreadsheet-style WordPress plugin designed specifically for managing and displaying knockout tennis tournaments. Think of it as “TablePress, but built for brackets instead of standard tables.”
It eliminates the need to use clunky third-party bracket websites or messy image uploads, keeping the entire tennis tournament experience native to your WordPress site.
For Tournament Admins (Backend)

Simple Setup: Create a new tournament draw just like writing a standard post or page in WordPress.
Flexible Sizing: Choose your tournament size (8, 16, 32, or 64 players) via a simple dropdown selection.
Draw Types: Choose between a Standard single-elimination draw and a Qualifying draw that stops once the configured number of players secure advancement spots into a main draw.
Easy Data Entry: Dynamically generates a clean grid of input fields where you can type in player names for the first round and log scores as matches finish.
Automatic Progression: Mark a player as the winner of a match and the plugin automatically pushes their name forward into the next round’s slot — saving you from manual re-typing.

For Website Visitors (Frontend)

Visual Brackets: Generates a clean, classic, tree-style tournament bracket on any page or post using a simple shortcode (e.g., [netdraw id="123"]).
Qualified (Q) Badges: In qualifying draws, players who win their final qualifying match get a clear Q badge indicating they have advanced to the main draw.
Path Highlighting: Hovering over any player highlights their entire journey (matches won, played, and progressed) across all rounds in real-time.
Responsive Design: Uses a custom CSS tree-structure layout that enables smooth horizontal scrolling on mobile, tablet, and desktop screens without breaking the visual integrity.
No Bloat: Built purely using Vanilla JS and native CSS — no jQuery or external visual dependencies.

Usage
Creating a Tournament

Navigate to the NetDraw section in your WordPress Admin sidebar.
Click Add New Tournament.
Enter a title for your tournament (e.g., Summer Club Open 2026).
Under the Tournament Bracket Editor meta box, choose the tournament size (8, 16, 32, or 64 players).
Choose the Draw Type:

Standard — the bracket plays out to a single champion and finalist.
Qualifying — set the Main Draw Qualifying Spots (2, 4, 8, …). The bracket stops at the round where the remaining winners equal that number; those players advance to the main draw.

Fill in the player names for Round 1.
As matches finish, fill in the score (e.g., 6-4 6-2) and click the checkmark next to the winning player’s name to automatically progress them to the next round.
Click Publish or Update to save.

Displaying the Bracket
Copy the shortcode shown in the Tournament Bracket Editor, or construct it manually using the Post ID:
[netdraw id="YOUR_POST_ID"]

Paste it into any WordPress Post, Page, or Widget area to display the visual bracket.
Data and Privacy
NetDraw does not collect, store, or transmit any personal data to external services. All tournament data (player names, scores, results) is stored exclusively in your own WordPress database as post meta. No cookies are set by this plugin on the frontend.
Developer Notes
Data Schema
The plugin stores tournament configuration and match data in a flat, index-based JSON object inside the _netdraw_bracket_data post meta field:
{
"size": 16,
"drawType": "qualifying",
"qualifyingSpots": 4,
"matches": {
"r1_m1": { "p1": "Federer", "p2": "Nadal", "score": "6-4 6-2", "winner": "p1" },
"r1_m2": { "p1": "Djokovic", "p2": "Murray", "score": "7-5 6-3", "winner": "p1" },
"r2_m1": { "p1": "Federer", "p2": "Sinner", "score": "", "winner": "" }
}
}

drawType is "standard" or "qualifying".
qualifyingSpots is only meaningful for qualifying draws; it is always a power of two and smaller than the bracket size.
For qualifying draws, the bracket renders only up to effectiveRounds = log2(size / qualifyingSpots) rounds. Match data beyond that (if any) is preserved but hidden, so switching back to Standard is non-destructive.

Dynamic Progression Logic
To map match results forward, NetDraw uses simple binary propagation:

The next match index = ceiling( m / 2 ), where m is the current match number within the round.
If m is odd, the winner becomes Player 1 (p1) of the next match.
If m is even, the winner becomes Player 2 (p2) of the next match.
Subsequent rounds are set to read-only in the admin panel to prevent data out-of-sync issues.
In a qualifying draw, propagation stops at the qualifying round: winners there receive a Qualified (Q) badge instead of being pushed into another round.

文章
Filter
Mastodon