前言介紹
- 這款 WordPress 外掛「Multi-day Booking Calendar」是 2022-07-30 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2022-08-14,距離現在已有 993 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.9 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
matorel |
外掛標籤
form | booking | reserve | calendar | schedule |
內容簡介
此外掛可以將現有表單連接到一個預約日曆,並允許多天和時間的選擇。
管理畫面是一個簡單的配置畫面,可用於設置工作日、工作時間和預約日期和時間,並可發佈嵌入式短代碼。
由於表單本身不提供任何功能,因此可以直接將其連接到現有的表單。
簡單而沒有額外功能的設計使得初學者容易上手,可用於汽車租賃預約、住宿預約、活動預約、研討會預約、會議室預約、課程預約等等。
使用方法
啟用插件後,打開日曆的通用設置頁面。通用設置頁面可用於設置假期、定期假期以及可以進行預約的時間段和時間。
日曆的新提交頁面允許對每個事件的日期和時間狀態進行管理。
短代碼在上面的頁面生成後,請將其插入含有輸入的表單提交,例如 Contact Form 7。有關短代碼的屬性,請參閱下面的「短碼設置」,僅顯示日曆的文章頁面將不包含輸入。在這種情況下,請勿輸入除 id 以外的屬性值。
前端顯示已註冊的日曆,選擇日期和時間將反映在輸入中。
短碼設置
[multi-day-booking-calendar id='' start-name='' end-name='' start-time-name='' end-time-name='' mode='static']
id
已註冊日曆的提交 ID。必填。
start-name
開始日期的 input tag 的 name 屬性。
start-time-name
開始時間的 input tag 的 name 屬性。
end-name
結束日期的 input tag 的 name 屬性。
end-time-name
結束時間的 input tag 的 name 屬性。
mode
原文外掛簡介
This plugin allows you to link an existing form with a reservation calendar that allows multiple day and time selections.
The administration screen is a simple configuration screen that can be used to set business days, business hours, and reserved dates and times, and can issue embedded shortcodes.
Since the form itself does not provide any functionality, it can be linked directly to existing forms.
The simplicity and lack of extra features makes it easy to get started without confusion.
It can be used for car rental reservations, lodging reservations, event reservations, seminar reservations, meeting room reservations, lesson reservations, etc.
このプラグインは複数日の選択・時間の選択ができる予約カレンダーを既存のフォームに連携させることができます。
管理画面はシンプルな設定画面で営業日や営業時間、予約済みの日時などの設定ができ、埋め込みショートコードの発行が可能です。
フォーム自体の機能は提供しないため、既存のフォームにそのまま連携させることができます。
シンプルで余計な機能がないので混乱せずに簡単に始めることができます。
レンタカー予約、宿泊予約、イベント予約、セミナー予約、会議室予約、レッスン予約など様々な用途でご利用いただけます。
How to Use
After activating the plugin, open the Common Settings page of the Calendar. The Common Settings page allows you to set holidays, regular holidays, and periods and times when appointments can be made.
プラグインを有効化したらカレンダーの共通設定ページを開きます。共通設定画面では、休日や定休日、予約可能な期間や時間帯を設定することができます。
The new submission page of the Calendar allows for day and time status management for each event.
カレンダーの新規投稿ページでは、イベントごとに日にち・時間帯のステータス管理が可能です。
Once the shortcode is issued on the above page, insert it into a form submission containing inputs, such as Contact Form 7. Refer to “Shortcode Settings” below for the attributes of the shortcode, and only the calendar for viewing will be displayed on article pages without inputs. In such cases, do not enter any attribute values other than id.
上記ページでショートコードが発行されたら、Contact Form 7 などのinputの含まれたフォーム投稿に挿入します。ショートコードの各属性は下記の「Shortcode Settings」を参照してください。inputのない記事ページなどでは閲覧用のカレンダーのみが表示されます。その場合、id以外の属性値は記述しないでください。
The front screen displays the registered calendar, and selecting a day and time is reflected in the input.
フロント画面では登録したカレンダーを表示させ、日にち・時間を選択するとinputに反映されます。
Shortcode Settings
[multi-day-booking-calendar id='' start-name='' end-name='' start-time-name='' end-time-name='' mode='static']
id
Submission ID of registered calendar. Required.
start-name
The name attribute of the input tag for the start date.
start-time-name
The name attribute of the input tag for the start time.
end-name
The name attribute of the input tag for the end date.
end-time-name
The name attribute of the input tag for the end time.
mode
static : Embed the calendar in the page. default.
inline : A calendar dialog box appears when you click on the input tag.
API
By the time the form is submitted, the reservation may have been available or changed.
The plugin does not provide form functionality, so to find out exactly what is happening, please hit the API provided by the plugin before submitting the form.
フォームを送信するまでに、予約が可能か変更されている可能性があります。
当プラグインではフォーム機能は提供していないため、厳密に調べるためには、フォーム送信前に当プラグインが提供しているAPIを叩いてください。
Example for Contact Form 7
Please insert the ID of the registered calendar in the form content.
フォーム内容に下記のように登録カレンダーのIDを仕込んでください。
[hidden mdbc-id "2115"]
add_filter('wpcf7_validate', array($this, 'custom_wpcf7_validate'), 11, 2);
function custom_wpcf7_validate($result, $tags)
{
$mdbc_id = null;
foreach ($tags as $tag) {
$name = $tag['name'];
switch ($name) {
case 'start-day': //input tag name
$start_date = Date('Y-m-d', strtotime($_POST[$name]));
break;
case 'start-time': //input tag name
$start_time = $_POST[$name] ? $_POST[$name] : "00:00";
break;
case 'end-day': //input tag name
$end_date = Date('Y-m-d', strtotime($_POST[$name]));
break;
case 'end-time': //input tag name
$end_time = $_POST[$name] ? $_POST[$name] : "00:00";
break;
case 'mdbc-id': //ID of registered calendar
$mdbc_id = $_POST[$name];
default:
break;
}
}
if ($mdbc_id) {
$request = WP_REST_Request::from_url(home_url('/?rest_route=/mdbc/v1/check_reserve'));
$request->set_method('POST');
$request->set_param("postid", $mdbc_id);
$request->set_param("start", $start_date . " " . $start_time);
$request->set_param("end", $end_date . " " . $end_time);
$response = rest_do_request($request);
if ($response->is_error()) {
$result->invalidate("start-day", 'You cannot make reservations during that specified time period.');//Output error.
} else {
$data = $response->get_data();
if (!$data["can_reserve"])
$result->invalidate("start-day", 'You cannot make reservations during that specified time period.');//Output error.
}
}
return $result;
}
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Multi-day Booking Calendar」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 |
延伸相關外掛(你可能也想知道)
MC4WP: Mailchimp for WordPress 》讓訪客訂閱您的電子報應該很容易。透過這款外掛,現在終於可以輕鬆做到了。 這個外掛可幫助您在 Mailchimp 中擴展您的電子郵件列表。您可以使用它來創建外觀...。
Newsletters, Email Marketing, SMS and Popups by Omnisend 》總結文案:, 「Omnisend 外掛連接至 Omnisend 電子郵件行銷工具,可讓其他外掛自動將表單數據和聯絡資訊傳送至 Omnisend。這能夠簡化聯絡人分類並發送個人化郵...。
MW WP Form 》MW WP Form 可以使用 shortcode 創建帶有確認畫面的郵件表單。, , 使用 shortcode 創建表單, 可以使用確認頁面。, 頁面可以使用相同的 URL 或個別的 URL 進行...。
Newsletter, SMTP, Email marketing and Subscribe forms by Brevo (formely Sendinblue) 》Sendinblue 的官方 WordPress 外掛程式是一個功能強大的全方位電子郵件行銷外掛程式。以下是一些概觀:, , 訂閱表單 – 建立自訂訂閱表單,輕鬆整合到文章、頁...。
Conditional Fields for Contact Form 7 》此外掛可以讓您的 Contact Form 7 表單加入條件式邏輯。, 當您編輯您的 CF7 表單時,您會看到一個額外的標籤,名為「條件式欄位群組」。您放置在起始標籤和結...。
MailerLite – Signup forms (official) 》MailerLite – Signup forms (official) 外掛, 官方的 MailerLite 訂閱表單外掛讓您可以輕鬆地從 WordPress 網誌或網站增加您的電子報訂閱者清單。此外...。
Contact Form 7 add confirm 》“Contact Form 7 add confirm” 可以為 “Contact Form 7” 增加確認步驟。, “Contact Form 7 add confirm” 可以為 “...。
Contact Form 7 Multi-Step Forms 》我需要一個可以跨越多個頁面的聯繫表單,並且最終會發送一封帶有所有收集信息的電子郵件。這個外掛通過擴展熱門的 Contact Form 7 外掛來實現這一點。, 這個...。
Calculated Fields Form 》「Calculated Fields Form」外掛能夠讓你創建具有計算欄位的網頁表單,欄位的值根據表單中其他欄位的值實時計算。, , 這個外掛的可能性是無限的。例如,你可...。
Form Maker by 10Web – Mobile-Friendly Drag & Drop Contact Form Builder 》Form Maker 是一款頂尖的拖曳式外掛程式,讓您可以透過幾個點擊輕鬆建立任何複雜度的表單。, 有用連結:, 現場示範, 演示管理員, 由 10Web 提供的高級表單 Ma...。
reCAPTCHA for MW WP Form 》您可以在 MW WP FORM 中使用 "reCAPTCHA V3"。, 注意:, 需要 MW WP Form(https://wordpress.org/plugins/mw-wp-form/), /assets/screenshot-1.png, 。
Gravity PDF 》Gravity PDF 是使用 Gravity Forms 和 WordPress 創建動態數字 PDF 文件的最佳自助式解決方案。, 高度自定義的 PDF, 開箱即用的版本提供了四種高度自定義的 P...。
Advanced Custom Fields: Gravity Forms Add-on 》提供進階自訂欄位 (Advanced Custom Field),讓 WordPress 編輯使用者或管理員可以在欄位群組配置中選擇 Gravity Form。, 可以在 外掛的 GitHub 存儲庫 中找...。
WordPress File Upload 》這個外掛讓你或其他使用者可以從任何頁面、文章或側邊欄輕鬆、安全地上傳檔案到你的網站。, 只需要在任何 WordPress 頁面/文章中加入簡碼 [wordpress_file_up...。
Visual Form Builder 》Visual Form Builder 是一個外掛,可讓您在同一地方建立和管理各種網站表單。只需幾分鐘就可以建立完整的聯絡表單,您不需要撰寫任何 PHP、CSS 或 HTML!, 升...。