开发者 |
dgewirtz
adiant |
---|---|
更新时间 | 2024年8月14日 10:34 |
WordPress版本: | 6.6 |
版权: | GPL-3.0+ |
版权网址: | 版权信息 |
[pcal]
, and the Format of the Date can be modified from the Admin Settings panel for this plugin. A "Help and Info" button provides Visitors with background and usage details.
Providing your site visitors with a Perpetual Calendar is as easy as installing and activating this Plugin with Add Plugin and inserting the [pcal]
Shortcode in a Page, Post or any other place where Shortcodes are allowed.
This Plugin has been Internationalized ("Translation-Ready"). Both the Admin and User (Site Visitor) views are presently available in either English or Spanish, with a .POT translation file available in the /languages/ directory within the Plugin, for any translators wishing to translate it into other languages, which we would love to include in future versions of the Plugin. Special thanks to Andrew Kurtis of WebHostingHub for the Spanish translation.
Once the plugin is successfully installed and activated, adding the plugin's Shortcode (by default, [pcal]
) to any WordPress Post or Page will insert an HTML <form>
that prompts the user to select a Month, Day, and Year from drop-down lists. Clicking the "Display Day of Week" button will generate a message above the <form>
indicating the full name of the day of the week for the given date. Or an error message for all invalid dates. Clicking the "Help and Info" button will display, right below the Perpetual Calendar, instructions explaining what it is and how to use it.
To reduce the size of the drop-down lists, the Year is entered in three parts: (1) first one or two digits ("century"); (2) second to last digit ("tens"); and (3) last digit. Plugin Settings are provided within the WordPress Admin panels to display current era dates as A.D., CE or solely by the numeric Year; ancient dates are displayed as B.C. or BCE, or are not allowed when current era dates are displayed solely as numbers. A.D./B.C. is the default.
A PHP Function, jr_weekday
, given Day, Month and Year as input parameters, will return the Date and Day of the Week as a formatted message that you can insert anywhere in the PHP code of your site. The Format of the Date in the message can be modified from the Admin Settings panel for this plugin. Like the Shortcode and Admin panels, the language of the message returned by the PHP function is controlled by the 'WPLANG' constant defined in wp-config.php
If Network is turned on in WordPress, Network Activation of the plugin allows both the plugin and shortcode to be called from all WordPress sites within the Network. Alternatively, the plugin can also be activated for individual sites within the Network.
Supported dates range from November 25, 4714 B.C. (1 A.D. when Plugin Settings specify "Do not allow Dates more then 2000 Years in the Past") to December 31, 9999 A.D.; the jr_weekday function accepts years larger than 9999, but it has not been tested for accuracy past the year 9999. Illegal dates, such as February 31 of any year, and the Year Zero (A.D. or B.C.), are detected and an error message is returned in place of the message indicating the weekday.
Multiple uses of the plugin's Shortcode on the same Page are detected: the first works normally, but all others display the Shortcode's Name, surrounded by square brackets, followed by "(duplicate)". Likewise when displaying multiple Posts, with the Shortcode occurring more than once across all the displayed Posts.
For more information, please click here or on the FAQ tab above.
/jonradio-perpetual-calendar/
directory to your WordPress web site's /wp-content/plugins/
directory.[pcal]
shortcode in a WordPress Page, Post or anywhere else where WordPress processes Shortcodes (other plugins can determine this); or call the jr_weekday()
function from any php code, passing the function integer values for Year, Month and Day of Month, and displaying the message returned by the function.To date, we have not received any reports of Themes where this plugin does not work properly. A lot of work may be required in the Date Form Input Layout section of the plugin's Settings (WordPress Admin panels) to find the layout that works best for any specific Theme.
This can be very confusing. This measurement is from the bottom of the new line that begins with the Date Field where Height and "New Line Before?" are selected. Any value smaller than the minimum vertical space required to display the new line is ignored. A value of 50 is a good starting point.
The term Perpetual Calendar normally refers to the display of a calendar of any week or month across a broad range of years. However, it is almost always used to determine the day of the week for a given date, which is what this plugin does.
The format of the Date can be changed in the Settings for the plugin. At present, this plugin is only available in English and Spanish. Anyone interested in providing translation files and localization information for this plugin into any other language and culture is strongly encouraged to visit this page for more information: http://zatzlabs.com/plugins/
Yes, see the Plugin's Settings page in the WordPress Admin panels. There you can choose "Do not allow Dates more then 2000 Years in the Past" to eliminate "A.D." before or after Years.
Yes, see the Plugin's Settings page in the WordPress Admin panels. There you can choose "Current and Future Dates as CE, Ancient Dates as BCE".
Yes, by checking the first three characters of the returned value for "Err". If there is enough interest, we will create a new plugin with a jr_validate_date function. Please let us know, including your ideas on how you would like it to work, and how you would use this function. Note that php has a similar date validation function, but it supports a different range of dates, so please let us know what range of dates you are interested in.
Do not Network Activate this plugin. Instead, Activate it on each site individually, using the Admin panel for each site, not the Network Admin panel.
If there is enough interest, we will add that to a future version. Please let us know, including your ideas on how you would like it to work, and how you would use this feature.
<form>
when [pcal]
appears twice on the same web page<form>
is displayed