[WordPress] 外掛分享: Y2K Bug Simulator

首頁外掛目錄 › Y2K Bug Simulator
全新外掛
安裝啟用
尚無評分
2784 天前
最後更新
問題解決
WordPress 3.8.1+ v1.3 上架:2014-04-21

內容簡介

Y2K Bug Simulator是一個能夠部分模擬於1999年12月31日後影響某些系統的潛在Y2K錯誤之外掛。它模擬的具體錯誤通常發生在將年份表示為兩位數字而非四位數字的系統中。因此,在受影響的系統中,1999年12月31日之後的一天可能會被呈現為1900年1月1日(在這種情況下,只有年份的最後兩位數字會翻轉,前兩位數字寫死為“19”)。

這個外掛模擬的錯誤當然不是唯一的Y2K錯誤,也可以說是不太重要的一個。然而,它可能是最有趣的。此外掛對WordPress的影響是將20xx日期在頁面標題、文章和評論、檔案和行事曆中轉換為19xx日期。

注意以下幾點:

在安裝後的初始啟用時,預設僅有管理員層級的使用者能看到此外掛的效果。通過新的Y2K設置頁面(1.2版中新增)可以將其開放給所有使用者,包括未登錄的使用者。
在外掛安裝和啟用後立即進行日期修改,在外掛停用/卸載後立即消失。
更改僅發生在呈現層。這意味著,除了其他事項之外,所有存儲的站點內容和數據都保持不變。此外,網站導航不受影響。如果您點擊標識為1914年2月14日的文章的鏈接,它將帶您進入2014年2月14日的文章中(但仍顯示1914年)。
不受內部日期引用的影響。如果您在外掛啟用時創建帖子/添加評論,該內容將不會以修改後的日期保存,而是以實際日期保存,並在停用/卸載外掛時顯示該日期。
任何未使用WordPress核心功能進行日期顯示的外掛/模板/其他內容不會更改其日期。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Y2K Bug Simulator」→ 直接安裝(推薦)

原文外掛簡介

The Y2K Bug Simulator partially mimics one of the potential y2k failures that could (and did) affect some systems after December 31, 1999. The specific failure it mimics is one which typically occurred in systems where years were represented using two digits rather than four. Thus, in an affected system, the day after December 31, 1999 might be rendered as January 1, 1900 (in this scenario, only the last two digits of the year roll over, the first two are hard-coded as “19”).
The bug that this plugin mimics was certainly not the only y2k bug, nor, arguably, a terribly significant one. It is, however, perhaps the most aesthetically interesting. The effect of this plugin on WordPress is to change 20xx dates into 19xx dates across page titles, posts, and comments, as well as archives and calendars.
Some things to note:

By default, on initial activation following install, only admin-level users will see the effects of the plugin. This can be opened to all users, including non-logged ones, through the new Y2K settings page (new in 1.2).
The date modification occurs immediately after the plugin is installed and activated. It disappears immediately after the plugin is deactivated/uninstalled.
The change is at the presentation layer only. This means, among other things, that all stored site content and data remain unchanged. Moreover, site navigation is not affected. If you click on a link to a post identified as being from February 14, 1914, it will bring you to the post for February 14, 2014 (but still say 1914).
Internal date references are not affected. If you create a post/add a comment while the plugin is active, that content will not be stored with the modified date, but with the actual date, and will show that date when the plugin is deactivated/uninstalled.
Any plugins/templates/other content that do not utilize WordPress core functions for date presentation will not have their dates modified.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon