內容簡介
這個外掛可以將你的 WordPress 安裝轉變為一個維基,用來保存家族歷史紀錄。
推薦的設置
在管理後台進入「設置」→「閱讀」,設置一個靜態主頁。該外掛還添加了一個選項「我想讓我的網站私有,只能由我自己和我選擇的用戶看到」,這通常是你想要使用的選項,因為只有註冊用戶才能編輯。
使用“維基用戶”(可以編輯頁面)或“維基編輯器”(也可以刪除頁面)來創建新用戶。不幸的是,否則他們只能使用“編輯者”或“管理員”角色來編輯頁面。
如果你創建了一個日曆頁面,請設置選項 family_wiki_calendar_page,例如使用 cli 命令 wp option add family_wiki_calendar_page /Calendar,那麼日期將連接到該頁面。
短代碼
使用以下短代碼填充日曆:
[born date="1910-01-01"]
注意:
- 你也可以使用文字日期:[born date="January 1, 1910"]
- 對於在世的人,加上showage,像這樣: [born date="January 1, 1910" showage]。它將在生日日曆中顯示。
對於已故親屬,請像以下這樣指定他們去世的日期:
[died date="2000-01-01" birth="1910-01-01"]
你也可以使用文字日期: [died date="January 1, 2000" birth="January 1, 1910"]
古騰堡模塊
家庭日曆模塊將顯示來自維基的所有日期。
生日日曆模塊將顯示維基上所有在世人的日期(由showage確定,請參見上文)。
效能
為了顯示紅色缺失連結或綠色外部連結,所有頁面都會在頁面加載時進行評估。這對於小型網站有效,但如果你有數千個頁面,它將無法很好地工作。
此插件的開發在GitHub 上進行。歡迎提出拉取請求。使用前請參閱在那裡報告的問題,然後再到外掛論壇中討論。
外掛標籤
開發者團隊
原文外掛簡介
This plugin transforms your WordPress install into a Wiki for keeping your family history.
Recommended setup
In wp-admin go to Settings → Reading and set a static homepage. The plugin also adds an option I would like my site to be private, visible only to myself and users I choose which will usually be an option you’ll want to use since only registered users should be allowed to edit.
Create new users with Wiki User (can edit pages) or Wiki Editor (can also delete pages). Unfortunately otherwise only the roles Editor or Administrator will allow them to edit pages.
If you created a calendar page, set the option family_wiki_calendar_page, for example with the cli command wp option add family_wiki_calendar_page /Calendar, then the dates will be linked to that page.
Advanced Custom Fields
The plugin has switched to using Advanced Custom Fields for wiki page metadata. Please install that plugin in version 6.2 or up. The fields should be automatically restored using the provided JSON file in the acf-json/ directory.
For each wiki page, you can enter data like birth or death date as well as mother/father/children relationships. This data is used for the calendar page but also for automatically generating a short bio using the shortcode [name_with_bio]. You’d put this as the first thing in a wiki page.
Gutenberg Blocks
The Family Calendar block will show all dates from the wiki.
The Birthday Calendar block will show all dates of living people (determined by showage, see above) from the wiki.
Performance
For displaying the red missing links or green external links, all pages are evaluated on page load. This works for small sites but won’t work well if you have thousands of pages.
Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.
