Skip to content

Commit 8f753c1

Browse files
committed
event documentation added
1 parent 6759b76 commit 8f753c1

22 files changed

+974
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default {
5252
{ text: "Accounting", link: "/comfortaccounting/" },
5353
{ text: "Invoice", link: "/comfortinvoice/" },
5454
{ text: "Bookings", link: "/comfortbookings/" },
55+
{ text: "Events", link: "/comfortevents/" },
5556
],
5657
//Social Icons
5758
socialLinks: [
@@ -207,6 +208,43 @@ export default {
207208
],
208209
},
209210
],
211+
'/comfortevents/': [
212+
{
213+
text: 'Comfort Event',
214+
collapsible: true,
215+
items: [
216+
{ text: 'How to install', link: '/comfortevents/how-to-install' },
217+
{ text: 'How to Translate', link: '/comfortevents/how-to-translate' },
218+
{ text: 'Template Override', link: '/comfortevents/template-override' },
219+
{ text: 'Hooks and Filters', link: '/comfortevents/hooks-and-filters' },
220+
{ text: 'Code Samples', link: '/comfortevents/code-samples' },
221+
],
222+
},
223+
{
224+
text: 'User Guide',
225+
collapsible: true,
226+
items: [
227+
{ text: 'General', link: '/comfortevents/user-guide/general' },
228+
{ text: 'Event Manager', link: '/comfortevents/user-guide/event-manager' },
229+
{ text: 'Event Calendar View(Pro)', link: '/comfortevents/user-guide/event-calendar' },
230+
{ text: 'Event Category', link: '/comfortevents/user-guide/event-category' },
231+
{ text: 'Event Tags', link: '/comfortevents/user-guide/event-tags' },
232+
{ text: 'Orders', link: '/comfortevents/user-guide/orders' },
233+
{ text: 'Payment History', link: '/comfortevents/user-guide/payment-history' },
234+
{ text: 'Payment Methods', link: '/comfortevents/user-guide/payment-methods' },
235+
{ text: 'Tools Manager', link: '/comfortevents/user-guide/tools-manager' },
236+
{ text: 'Settings Manager', link: '/comfortevents/user-guide/settings' },
237+
{ text: 'Email Templates', link: '/comfortevents/user-guide/emails' },
238+
],
239+
},
240+
{
241+
text: 'Shortcode',
242+
collapsible: true,
243+
items: [
244+
{ text: '7 Shortcodes', link: '/comfortevents/shortcodes' },
245+
],
246+
},
247+
],
210248

211249
// Sidebar for `/guide/` section
212250
// '/comfortform/': [
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "Comfort Accounting Application Documentation"
3+
description: "Comfort Events index description."
4+
keywords: "Comfort Events index keywords."
5+
url: "/comfortevents/classic-widgets"
6+
type: "type"
7+
site_name: "Comfort ERP"
8+
image: /seo_card.png
9+
card: "article"
10+
---
11+
# Classic Widgets
12+
13+
WordPress currently doesn’t support classic widgets but still you can enable it by using this plugin [“Classic Widgets”](https://wordpress.org/plugins/classic-widgets/)
14+
15+
Comfort Events for WordPress plugin supports classic widgets. To add Comfort Events classic widget from dashboard.
16+
17+
**Appearance -> Widgets -> Latest Form/Form List**
18+
19+
Drag the “Latest Form/Form List” widget from left to any right-side sidebar(s).
20+
21+
After adding the widget to the sidebar, you can adjust the input fields and check your frontend.
22+
\[Video coming soon\]
23+
24+
The following classic widgets(currently 2 widgets (core and pro)) can be accessed from wordpress dashboard widget manager. We will keep adding more classic widgets for this plugin in future as needed.
25+
26+
1. Latest Form
27+
2. Form List (pro)
28+
29+
**Last modified:** August 20, 2025

docs/comfortevents/code-samples.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: "Comfort Accounting Application Documentation"
3+
description: "Comfort Events index description."
4+
keywords: "Comfort Events index keywords."
5+
url: "/comfortevents/code-samples"
6+
type: "type"
7+
site_name: "Comfort ERP"
8+
image: /seo_card.png
9+
card: "article"
10+
---
11+
# Code Samples
12+
13+
## Creating a New Event
14+
```php
15+
<?php
16+
// Create a new event using the Eloquent model
17+
use Comfort\Event\Models\Event;
18+
19+
$event = new Event();
20+
$event->title = 'My New Event';
21+
$event->start_date = '2025-09-01 10:00:00';
22+
$event->end_date = '2025-09-01 18:00:00';
23+
$event->status = 'published';
24+
$event->save();
25+
```
26+
## Getting Event Listing
27+
```php
28+
<?php
29+
// Get a paginated list of events
30+
use Comfort\Event\Helpers\ComfortEventHelpers;
31+
32+
$filters = [
33+
'limit' => 5,
34+
'order_by' => 'start_date',
35+
'sort' => 'asc',
36+
];
37+
$events = ComfortEventHelpers::eventListing($filters);
38+
```
39+
## Getting a Single Event by ID
40+
```php
41+
<?php
42+
// Get event details by ID
43+
use Comfort\Event\Helpers\ComfortEventHelpers;
44+
45+
$event_id = 123;
46+
$event = ComfortEventHelpers::getEvent($event_id);
47+
```
48+
## Creating a Page with Shortcode
49+
```php
50+
<?php
51+
// Create a page with the event manager shortcode
52+
ComfortEventHelpers::create_page(
53+
'event_manager_page',
54+
'event-manager',
55+
'Event Manager',
56+
'[comfortevent_event_manager]'
57+
);
58+
```
59+
## Getting Allowed HTML Tags
60+
```php
61+
<?php
62+
// Get allowed HTML tags for output sanitization
63+
$allowed_tags = ComfortEventHelpers::allowedHtmlTags();
64+
```
65+
## Getting Country List for Select Field
66+
```php
67+
<?php
68+
// Get country list for a select field
69+
$countries = ComfortEventHelpers::countryListForTreeSelect();
70+
```
71+
## Getting User Roles
72+
```php
73+
<?php
74+
// Get user roles including guest
75+
$user_roles = ComfortEventHelpers::user_roles(true, true);
76+
```
77+
## Getting Event Statuses
78+
```php
79+
<?php
80+
// Get all event statuses
81+
$statuses = ComfortEventHelpers::event_statuses();
82+
```
83+
84+
# Comfort Events Pro – Code Samples
85+
86+
## Export Invoice as PDF
87+
```php
88+
<?php
89+
// Export invoice as PDF for download
90+
Comfort\EventPro\Helpers\EventProHelpers::invoice_pdf_export_as_download($exportData);
91+
```
92+
## Export Invoice as String
93+
```php
94+
<?php
95+
// Export invoice as PDF string
96+
Comfort\EventPro\Helpers\EventProHelpers::invoice_pdf_export_as_string($exportData);
97+
```
98+
## Export Attendee Columns for Excel
99+
```php
100+
<?php
101+
// Get attendee export columns for Excel
102+
Comfort\EventPro\Helpers\EventProHelpers::attendee_export_cols();
103+
```
104+
## Add Custom Email Classes
105+
```php
106+
<?php
107+
// Add custom email classes for event member invitation and invoice
108+
add_filter('comfortevent_email_classes', [$misc, 'extends_event_emails']);
109+
```
110+
## Add Custom Payment Classes
111+
```php
112+
<?php
113+
// Add Stripe payment class
114+
add_filter('comfortevent_payment_classes', [$misc, 'extends_event_payments']);
115+
```
116+
## Export Event Attendees (Admin)
117+
```php
118+
<?php
119+
// Export event attendees from admin area
120+
Comfort\EventPro\ComfortEventProAdmin::admin_attendee_listing_export();
121+
```
122+
123+
**Last modified:** August 20, 2025
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "Comfort Accounting Application Documentation"
3+
description: "Comfort Events index description."
4+
keywords: "Comfort Events index keywords."
5+
url: "/comfortevents/elementor-widgets"
6+
type: "type"
7+
site_name: "Comfort ERP"
8+
image: /seo_card.png
9+
card: "article"
10+
---
11+
# Elementor Widgets
12+
13+
Comfort Event for WordPress plugin supports Elementor editor and provides two widget. To add Comfort Event widget in elementor editor.
14+
15+
16+
**Last modified:** August 20, 2025
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "Comfort Accounting Application Documentation"
3+
description: "Comfort Events index description."
4+
keywords: "Comfort Events index keywords."
5+
url: "/comfortevents/gutenberg-blocks"
6+
type: "type"
7+
site_name: "Comfort ERP"
8+
image: /seo_card.png
9+
card: "article"
10+
---
11+
# Gutenberg Blocks
12+
13+
Comfort Event for WordPress plugin supports Gutenberg editor and provides two block. To add Comfort Event widget in the block editor.
14+
15+
16+
**Last modified:** August 20, 2025

0 commit comments

Comments
 (0)