diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/assets/css/hvac-help-system.css b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/assets/css/hvac-help-system.css new file mode 100644 index 00000000..f777cda3 --- /dev/null +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/assets/css/hvac-help-system.css @@ -0,0 +1,568 @@ +/** + * HVAC Help System Styles + * Styles for welcome guide, tooltips, and documentation + */ + +/* Welcome Modal Styles */ +.hvac-modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.7); + z-index: 10000; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + animation: hvacFadeIn 0.3s ease-out forwards; +} + +.hvac-modal-content { + background: white; + border-radius: 12px; + box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); + max-width: 600px; + width: 90%; + max-height: 80vh; + overflow: hidden; + transform: scale(0.9); + animation: hvacSlideUp 0.3s ease-out forwards; +} + +.hvac-modal-header { + background: linear-gradient(135deg, #2c5aa0 0%, #1e4080 100%); + color: white; + padding: 24px 32px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.hvac-modal-header h2 { + margin: 0; + font-size: 1.5rem; + font-weight: 600; +} + +.hvac-modal-close { + background: none; + border: none; + color: white; + font-size: 24px; + cursor: pointer; + padding: 4px; + border-radius: 4px; + transition: background-color 0.2s; +} + +.hvac-modal-close:hover { + background: rgba(255, 255, 255, 0.1); +} + +/* Welcome Cards */ +.hvac-welcome-cards { + position: relative; + height: 320px; + overflow: hidden; +} + +.hvac-welcome-card { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 40px 32px; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out; + transform: translateX(100%); + opacity: 0; +} + +.hvac-welcome-card.active { + transform: translateX(0); + opacity: 1; +} + +.hvac-welcome-card.hidden { + transform: translateX(-100%); + opacity: 0; +} + +.hvac-card-icon { + width: 80px; + height: 80px; + background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 24px; + box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3); +} + +.hvac-card-icon i { + font-size: 32px; + color: white; +} + +.hvac-card-content h3 { + color: #2c5aa0; + font-size: 1.4rem; + font-weight: 600; + margin: 0 0 16px 0; +} + +.hvac-card-content p { + color: #555; + font-size: 1rem; + line-height: 1.6; + margin: 0; + max-width: 400px; +} + +/* Modal Navigation */ +.hvac-modal-navigation { + padding: 24px 32px; + display: flex; + justify-content: space-between; + align-items: center; + border-top: 1px solid #eee; +} + +.hvac-nav-btn { + background: #2c5aa0; + color: white; + border: none; + padding: 10px 20px; + border-radius: 6px; + cursor: pointer; + font-weight: 500; + transition: background-color 0.2s; +} + +.hvac-nav-btn:hover:not(:disabled) { + background: #1e4080; +} + +.hvac-nav-btn:disabled { + background: #ccc; + cursor: not-allowed; +} + +.hvac-card-indicators { + display: flex; + gap: 8px; +} + +.hvac-indicator { + width: 10px; + height: 10px; + border-radius: 50%; + background: #ddd; + cursor: pointer; + transition: background-color 0.2s; +} + +.hvac-indicator.active { + background: #2c5aa0; +} + +.hvac-indicator:hover { + background: #4CAF50; +} + +/* Modal Footer */ +.hvac-modal-footer { + padding: 24px 32px; + background: #f9f9f9; + display: flex; + justify-content: space-between; + align-items: center; +} + +.hvac-dismiss-checkbox { + display: flex; + align-items: center; + gap: 8px; + font-size: 0.9rem; + color: #666; + cursor: pointer; +} + +.hvac-primary-btn { + background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); + color: white; + border: none; + padding: 12px 24px; + border-radius: 6px; + font-weight: 600; + cursor: pointer; + transition: transform 0.2s, box-shadow 0.2s; +} + +.hvac-primary-btn:hover { + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3); +} + +/* Tooltip Styles */ +.hvac-tooltip-wrapper { + position: relative; + display: inline-block; +} + +.hvac-tooltip-wrapper:hover::after { + content: attr(data-tooltip); + position: absolute; + background: #333; + color: white; + padding: 8px 12px; + border-radius: 4px; + font-size: 0.85rem; + white-space: nowrap; + z-index: 1000; + opacity: 0; + animation: hvacTooltipShow 0.2s ease-out 0.3s forwards; +} + +.hvac-tooltip-wrapper:hover::before { + content: ''; + position: absolute; + width: 0; + height: 0; + border: 5px solid transparent; + z-index: 1001; + opacity: 0; + animation: hvacTooltipShow 0.2s ease-out 0.3s forwards; +} + +/* Tooltip positions */ +.hvac-tooltip-wrapper[data-position="top"]:hover::after { + bottom: 100%; + left: 50%; + transform: translateX(-50%); + margin-bottom: 8px; +} + +.hvac-tooltip-wrapper[data-position="top"]:hover::before { + bottom: 100%; + left: 50%; + transform: translateX(-50%); + margin-bottom: 3px; + border-top-color: #333; +} + +.hvac-tooltip-wrapper[data-position="bottom"]:hover::after { + top: 100%; + left: 50%; + transform: translateX(-50%); + margin-top: 8px; +} + +.hvac-tooltip-wrapper[data-position="bottom"]:hover::before { + top: 100%; + left: 50%; + transform: translateX(-50%); + margin-top: 3px; + border-bottom-color: #333; +} + +.hvac-tooltip-wrapper[data-position="left"]:hover::after { + right: 100%; + top: 50%; + transform: translateY(-50%); + margin-right: 8px; +} + +.hvac-tooltip-wrapper[data-position="left"]:hover::before { + right: 100%; + top: 50%; + transform: translateY(-50%); + margin-right: 3px; + border-left-color: #333; +} + +.hvac-tooltip-wrapper[data-position="right"]:hover::after { + left: 100%; + top: 50%; + transform: translateY(-50%); + margin-left: 8px; +} + +.hvac-tooltip-wrapper[data-position="right"]:hover::before { + left: 100%; + top: 50%; + transform: translateY(-50%); + margin-left: 3px; + border-right-color: #333; +} + +/* Documentation Page Styles */ +.hvac-documentation { + max-width: 1200px; + margin: 0 auto; + padding: 32px 16px; +} + +.hvac-doc-header { + text-align: center; + margin-bottom: 48px; +} + +.hvac-doc-header h1 { + color: #2c5aa0; + font-size: 2.5rem; + font-weight: 700; + margin: 0 0 12px 0; +} + +.hvac-doc-subtitle { + color: #666; + font-size: 1.2rem; + margin: 0; +} + +.hvac-doc-navigation { + background: #f8f9fa; + border-radius: 8px; + padding: 24px; + margin-bottom: 32px; + text-align: center; +} + +.hvac-doc-nav { + list-style: none; + padding: 0; + margin: 0; + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 24px; +} + +.hvac-doc-link { + color: #2c5aa0; + text-decoration: none; + font-weight: 500; + padding: 8px 16px; + border-radius: 6px; + transition: background-color 0.2s; +} + +.hvac-doc-link:hover { + background: white; + text-decoration: none; +} + +.hvac-doc-section { + margin-bottom: 48px; + padding: 32px; + background: white; + border-radius: 12px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.hvac-doc-section h2 { + color: #2c5aa0; + font-size: 1.8rem; + font-weight: 600; + margin: 0 0 24px 0; + padding-bottom: 12px; + border-bottom: 3px solid #4CAF50; + display: flex; + align-items: center; + gap: 12px; +} + +.hvac-doc-section h2 i { + color: #4CAF50; +} + +.hvac-doc-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 24px; + margin-top: 24px; +} + +.hvac-doc-card { + background: #f8f9fa; + padding: 24px; + border-radius: 8px; + border-left: 4px solid #4CAF50; +} + +.hvac-doc-card h3 { + color: #2c5aa0; + font-size: 1.2rem; + font-weight: 600; + margin: 0 0 12px 0; +} + +.hvac-doc-card p { + color: #555; + line-height: 1.6; + margin: 0 0 16px 0; +} + +.hvac-doc-btn { + background: #4CAF50; + color: white; + padding: 10px 16px; + border-radius: 6px; + text-decoration: none; + font-weight: 500; + display: inline-block; + transition: background-color 0.2s; +} + +.hvac-doc-btn:hover { + background: #45a049; + text-decoration: none; +} + +.hvac-feature-list { + display: grid; + gap: 24px; + margin-top: 24px; +} + +.hvac-feature { + background: #f8f9fa; + padding: 24px; + border-radius: 8px; + border-left: 4px solid #2c5aa0; +} + +.hvac-feature h3 { + color: #2c5aa0; + font-size: 1.2rem; + font-weight: 600; + margin: 0 0 16px 0; +} + +.hvac-feature p, .hvac-feature ul, .hvac-feature ol { + color: #555; + line-height: 1.6; + margin: 0; +} + +.hvac-feature ul li, .hvac-feature ol li { + margin-bottom: 8px; +} + +.hvac-faq-list { + display: grid; + gap: 16px; + margin-top: 24px; +} + +.hvac-faq-item { + background: #f8f9fa; + padding: 24px; + border-radius: 8px; + border-left: 4px solid #4CAF50; +} + +.hvac-faq-item h3 { + color: #2c5aa0; + font-size: 1.1rem; + font-weight: 600; + margin: 0 0 12px 0; +} + +.hvac-faq-item p { + color: #555; + line-height: 1.6; + margin: 0; +} + +/* Animations */ +@keyframes hvacFadeIn { + from { opacity: 0; } + to { opacity: 1; } +} + +@keyframes hvacSlideUp { + from { + transform: scale(0.9) translateY(20px); + opacity: 0; + } + to { + transform: scale(1) translateY(0); + opacity: 1; + } +} + +@keyframes hvacTooltipShow { + from { opacity: 0; } + to { opacity: 1; } +} + +/* Responsive Design */ +@media (max-width: 768px) { + .hvac-modal-content { + width: 95%; + margin: 16px; + } + + .hvac-modal-header, + .hvac-modal-navigation, + .hvac-modal-footer { + padding: 16px 20px; + } + + .hvac-welcome-card { + padding: 32px 20px; + } + + .hvac-modal-header h2 { + font-size: 1.3rem; + } + + .hvac-card-content h3 { + font-size: 1.2rem; + } + + .hvac-card-content p { + font-size: 0.95rem; + } + + .hvac-modal-footer { + flex-direction: column; + gap: 16px; + align-items: stretch; + } + + .hvac-primary-btn { + width: 100%; + text-align: center; + } + + .hvac-doc-nav { + flex-direction: column; + align-items: center; + } + + .hvac-doc-grid { + grid-template-columns: 1fr; + } + + .hvac-documentation { + padding: 16px 8px; + } + + .hvac-doc-section { + padding: 20px; + } + + .hvac-doc-header h1 { + font-size: 2rem; + } +} \ No newline at end of file diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/assets/js/hvac-help-system.js b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/assets/js/hvac-help-system.js new file mode 100644 index 00000000..e7d0ba9c --- /dev/null +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/assets/js/hvac-help-system.js @@ -0,0 +1,323 @@ +/** + * HVAC Help System JavaScript + * Handles welcome guide interactions, tooltips, and documentation navigation + */ + +(function($) { + 'use strict'; + + let currentCard = 0; + let totalCards = 0; + + $(document).ready(function() { + initializeWelcomeGuide(); + initializeTooltips(); + initializeDocumentationNavigation(); + }); + + /** + * Initialize welcome guide functionality + */ + function initializeWelcomeGuide() { + const $modal = $('#hvac-welcome-modal'); + if ($modal.length === 0) return; + + totalCards = $('.hvac-welcome-card').length; + + // Close button + $('.hvac-modal-close').on('click', function() { + closeWelcomeGuide(false); + }); + + // Navigation buttons + $('#hvac-prev-card').on('click', function() { + navigateCard(-1); + }); + + $('#hvac-next-card').on('click', function() { + navigateCard(1); + }); + + // Indicator dots + $('.hvac-indicator').on('click', function() { + const targetCard = parseInt($(this).data('card')); + goToCard(targetCard); + }); + + // Get started button + $('#hvac-get-started').on('click', function() { + const dontShowAgain = $('#hvac-dont-show-again').is(':checked'); + closeWelcomeGuide(dontShowAgain); + }); + + // Keyboard navigation + $(document).on('keydown', function(e) { + if ($modal.is(':visible')) { + switch(e.key) { + case 'ArrowLeft': + e.preventDefault(); + navigateCard(-1); + break; + case 'ArrowRight': + e.preventDefault(); + navigateCard(1); + break; + case 'Escape': + e.preventDefault(); + closeWelcomeGuide(false); + break; + } + } + }); + + // Click outside to close + $modal.on('click', function(e) { + if (e.target === this) { + closeWelcomeGuide(false); + } + }); + + updateNavigationState(); + } + + /** + * Navigate to previous or next card + */ + function navigateCard(direction) { + const newCard = currentCard + direction; + if (newCard >= 0 && newCard < totalCards) { + goToCard(newCard); + } + } + + /** + * Go to specific card + */ + function goToCard(cardIndex) { + if (cardIndex < 0 || cardIndex >= totalCards) return; + + // Hide current card + $('.hvac-welcome-card').removeClass('active').addClass('hidden'); + $('.hvac-indicator').removeClass('active'); + + // Show target card with animation delay + setTimeout(function() { + $('.hvac-welcome-card').eq(cardIndex).removeClass('hidden').addClass('active'); + $('.hvac-indicator').eq(cardIndex).addClass('active'); + currentCard = cardIndex; + updateNavigationState(); + }, 200); + } + + /** + * Update navigation button states + */ + function updateNavigationState() { + $('#hvac-prev-card').prop('disabled', currentCard === 0); + $('#hvac-next-card').prop('disabled', currentCard === totalCards - 1); + + // Update button text on last card + if (currentCard === totalCards - 1) { + $('#hvac-next-card').text('Finish'); + } else { + $('#hvac-next-card').text('Next'); + } + } + + /** + * Close welcome guide + */ + function closeWelcomeGuide(dismissPermanently) { + const $modal = $('#hvac-welcome-modal'); + + if (dismissPermanently) { + // Send AJAX request to set dismissal cookie + $.ajax({ + url: hvacHelp.ajaxUrl, + type: 'POST', + data: { + action: 'hvac_dismiss_welcome', + nonce: hvacHelp.nonce + }, + success: function(response) { + console.log('Welcome guide dismissed permanently'); + }, + error: function() { + console.warn('Failed to save welcome guide dismissal'); + } + }); + } + + // Animate out + $modal.css('opacity', '0'); + $modal.find('.hvac-modal-content').css({ + 'transform': 'scale(0.9) translateY(20px)', + 'opacity': '0' + }); + + setTimeout(function() { + $modal.remove(); + }, 300); + } + + /** + * Initialize tooltip functionality + */ + function initializeTooltips() { + // Enhanced tooltip handling with better positioning + $('.hvac-tooltip-wrapper').each(function() { + const $wrapper = $(this); + let timeoutId; + + $wrapper.on('mouseenter', function() { + timeoutId = setTimeout(function() { + // Add a class to show tooltip + $wrapper.addClass('hvac-tooltip-visible'); + }, 500); // 500ms delay + }); + + $wrapper.on('mouseleave', function() { + clearTimeout(timeoutId); + $wrapper.removeClass('hvac-tooltip-visible'); + }); + }); + + // Add tooltip classes for enhanced styling + $('.hvac-tooltip-wrapper[data-tooltip]').addClass('hvac-has-tooltip'); + } + + /** + * Initialize documentation page navigation + */ + function initializeDocumentationNavigation() { + // Smooth scrolling for documentation links + $('.hvac-doc-link').on('click', function(e) { + e.preventDefault(); + const targetId = $(this).attr('href'); + const $target = $(targetId); + + if ($target.length) { + $('html, body').animate({ + scrollTop: $target.offset().top - 80 + }, 600); + + // Update active state + $('.hvac-doc-link').removeClass('active'); + $(this).addClass('active'); + } + }); + + // Highlight current section on scroll + $(window).on('scroll', function() { + const scrollTop = $(window).scrollTop(); + const windowHeight = $(window).height(); + + $('.hvac-doc-section').each(function() { + const $section = $(this); + const sectionTop = $section.offset().top; + const sectionBottom = sectionTop + $section.outerHeight(); + + if (scrollTop + 120 >= sectionTop && scrollTop + 120 < sectionBottom) { + const sectionId = $section.attr('id'); + $('.hvac-doc-link').removeClass('active'); + $('.hvac-doc-link[href="#' + sectionId + '"]').addClass('active'); + } + }); + }); + + // Add fade-in animation for FAQ items + $('.hvac-faq-item').each(function(index) { + $(this).css({ + 'opacity': '0', + 'transform': 'translateY(20px)' + }); + + $(this).delay(index * 100).animate({ + 'opacity': '1' + }, 400).css('transform', 'translateY(0)'); + }); + + // Collapsible FAQ items (optional enhancement) + $('.hvac-faq-item h3').on('click', function() { + const $content = $(this).next('p'); + const $item = $(this).parent(); + + if ($item.hasClass('hvac-faq-collapsed')) { + $content.slideDown(300); + $item.removeClass('hvac-faq-collapsed'); + } else { + $content.slideUp(300); + $item.addClass('hvac-faq-collapsed'); + } + }).css('cursor', 'pointer').attr('title', 'Click to expand/collapse'); + } + + /** + * Add help button to navigation areas + */ + function addHelpButtons() { + // Add help button to main navigation if it doesn't exist + if ($('.hvac-help-button').length === 0) { + const helpButton = $(' Help'); + + // Try to add to existing navigation + if ($('.hvac-dashboard-nav').length) { + $('.hvac-dashboard-nav').append(helpButton); + } else if ($('.hvac-nav-buttons').length) { + $('.hvac-nav-buttons').append(helpButton); + } + } + } + + /** + * Initialize contextual help + */ + function initializeContextualHelp() { + // Add help icon to page titles + const pageSpecificHelp = { + 'hvac-dashboard': 'Your central hub for managing events, tracking revenue, and viewing performance metrics.', + 'trainer-profile': 'Update your professional information, credentials, and training specialties.', + 'event-summary': 'View detailed information about your event including attendees and sales data.', + 'certificate-reports': 'Generate and manage professional certificates for your training attendees.', + 'email-attendees': 'Communicate with your event attendees using our built-in email system.' + }; + + const currentPage = $('body').attr('class').match(/page-id-\d+|page-[\w-]+/); + if (currentPage) { + const pageName = currentPage[0].replace('page-', '').replace('page-id-', ''); + + Object.keys(pageSpecificHelp).forEach(function(page) { + if (pageName.includes(page) || $('body').hasClass('page-' + page)) { + const helpText = pageSpecificHelp[page]; + const $pageTitle = $('h1').first(); + + if ($pageTitle.length && !$pageTitle.find('.hvac-page-help').length) { + $pageTitle.append(' '); + } + } + }); + } + } + + // Initialize additional features + $(document).ready(function() { + addHelpButtons(); + initializeContextualHelp(); + }); + + // Public API for other scripts + window.HVACHelp = { + addTooltip: function(element, text, position) { + $(element).addClass('hvac-tooltip-wrapper') + .attr('data-tooltip', text) + .attr('data-position', position || 'top'); + }, + + showWelcomeGuide: function() { + if ($('#hvac-welcome-modal').length === 0) { + location.reload(); // Reload to show guide + } + } + }; + +})(jQuery); \ No newline at end of file diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/hvac-community-events.php b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/hvac-community-events.php index e9ef2ce1..e73d5b10 100644 --- a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/hvac-community-events.php +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/hvac-community-events.php @@ -79,6 +79,10 @@ function hvac_ce_create_required_pages() { 'title' => 'Certificate System Diagnostics', 'content' => '[hvac_certificate_fix]', ], + 'hvac-documentation' => [ // Add documentation page + 'title' => 'Trainer Documentation', + 'content' => '[hvac_documentation]', + ], // REMOVED: 'submit-event' page creation. Will link to default TEC CE page. // 'submit-event' => [ // 'title' => 'Submit Event', @@ -373,6 +377,9 @@ function hvac_ce_enqueue_admin_assets($hook) { // Include the main plugin class require_once HVAC_CE_PLUGIN_DIR . 'includes/class-hvac-community-events.php'; +// Include the help system +require_once HVAC_CE_PLUGIN_DIR . 'includes/class-hvac-help-system.php'; + // Initialize the plugin function hvac_community_events_init() { HVAC_Logger::info('Initializing HVAC Community Events plugin', 'Core'); diff --git a/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-help-system.php b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-help-system.php new file mode 100644 index 00000000..fa3e0eea --- /dev/null +++ b/wordpress-dev/wordpress/wp-content/plugins/hvac-community-events/includes/class-hvac-help-system.php @@ -0,0 +1,383 @@ +is_hvac_page() || !$this->is_trainer_logged_in()) { + return; + } + + // Enqueue Font Awesome for icons + wp_enqueue_style( + 'font-awesome', + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css', + array(), + '6.0.0' + ); + + wp_enqueue_style( + 'hvac-help-system', + HVAC_CE_PLUGIN_URL . 'assets/css/hvac-help-system.css', + array('hvac-common-style', 'font-awesome'), + HVAC_CE_VERSION + ); + + wp_enqueue_script( + 'hvac-help-system', + HVAC_CE_PLUGIN_URL . 'assets/js/hvac-help-system.js', + array('jquery'), + HVAC_CE_VERSION, + true + ); + + wp_localize_script('hvac-help-system', 'hvacHelp', array( + 'ajaxUrl' => admin_url('admin-ajax.php'), + 'nonce' => wp_create_nonce('hvac_help_nonce'), + 'showWelcome' => $this->should_show_welcome_guide() + )); + } + + /** + * Check if current page is an HVAC custom page + */ + private function is_hvac_page() { + $hvac_pages = array( + 'hvac-dashboard', 'trainer-registration', 'community-login', + 'trainer-profile', 'event-summary', 'email-attendees', + 'certificate-reports', 'generate-certificates', 'hvac-documentation' + ); + + foreach ($hvac_pages as $page) { + if (is_page($page)) { + return true; + } + } + + return false; + } + + /** + * Check if current user is a logged-in trainer + */ + private function is_trainer_logged_in() { + return is_user_logged_in() && (current_user_can('hvac_trainer') || current_user_can('administrator')); + } + + /** + * Check if welcome guide should be shown + */ + private function should_show_welcome_guide() { + if (!$this->is_trainer_logged_in()) { + return false; + } + + // Check cookie for dismissal + if (isset($_COOKIE['hvac_welcome_dismissed'])) { + return false; + } + + // Only show on dashboard page + return is_page('hvac-dashboard'); + } + + /** + * Render welcome guide modal + */ + public function render_welcome_guide() { + if (!$this->should_show_welcome_guide()) { + return; + } + + $cards = $this->get_welcome_cards(); + ?> +
+ 'fas fa-chalkboard-teacher', + 'title' => 'Verified Expert Platform', + 'description' => 'You\'re part of our vetted community of HVAC training experts. Our screening process ensures only qualified professionals can host events on the platform.' + ), + array( + 'icon' => 'fas fa-calendar-plus', + 'title' => 'Create & Manage Events', + 'description' => 'Easily create training events, set pricing, and manage registrations. All events are reviewed by our in-house trainers before publishing to ensure quality.' + ), + array( + 'icon' => 'fas fa-dollar-sign', + 'title' => 'Keep 100% Revenue', + 'description' => 'You keep 100% of your ticket sales (minus standard Stripe processing fees). Track your earnings and progress toward your revenue goals right from your dashboard.' + ), + array( + 'icon' => 'fas fa-certificate', + 'title' => 'Professional Certificates', + 'description' => 'Generate and send professional certificates of completion to your attendees. Build your reputation and provide value that keeps trainees coming back.' + ) + ); + } + + /** + * Handle AJAX request to dismiss welcome guide + */ + public function handle_welcome_dismissal() { + if (!wp_verify_nonce($_POST['nonce'], 'hvac_help_nonce')) { + wp_die('Invalid nonce'); + } + + if (!$this->is_trainer_logged_in()) { + wp_die('Unauthorized'); + } + + // Set cookie to expire in 30 days + setcookie('hvac_welcome_dismissed', '1', time() + (30 * 24 * 60 * 60), COOKIEPATH, COOKIE_DOMAIN); + + wp_send_json_success(); + } + + /** + * Render documentation page content + */ + public function render_documentation_page($atts) { + if (!$this->is_trainer_logged_in()) { + return 'Please log in to access the documentation.
'; + } + + ob_start(); + ?> +Everything you need to know about managing your training events
+Update your trainer profile with your credentials, business information, and training specialties. This helps trainees find and trust your expertise.
+ Edit Profile +Use our event creation form to set up your training. Include detailed descriptions, pricing, and capacity limits.
+ Create Event +Track your events, revenue, and performance metrics from your centralized dashboard.
+ View Dashboard +Access detailed event information including attendee lists, sales data, and check-in capabilities. Each event has its own summary page accessible from your dashboard.
+View all registrations, payment status, and attendee information from your event summary page. Export attendee lists for your records.
+Send emails to all attendees or specific groups. Use our email templates or create custom messages for updates and reminders.
+Mark attendees as present during your event. This data is used for certificate generation and completion tracking.
+Create professional certificates for attendees who completed your training. Certificates include event details, your signature, and completion date.
+Track which certificates have been issued and manage your certificate templates from the Certificate Reports page.
+Payments are processed through Stripe and deposited directly to your account. You keep 100% of ticket sales minus standard Stripe processing fees (typically 2.9% + 30ยข per transaction).
+Our review process typically takes 1-2 business days. We check for content quality, appropriate pricing, and compliance with industry standards.
+Yes, you can edit event details, but significant changes may require re-review. We recommend finalizing details before initial submission.
+Contact our support team immediately. We\'ll help you manage refunds and communicate with registered attendees.
+Complete your profile thoroughly, use detailed event descriptions, competitive pricing, and maintain high attendance rates. Quality events get featured prominently.
+Yes! You can offer in-person, virtual, hybrid, and on-demand training formats. Set your preferred training locations and formats in your profile.
+Access this documentation anytime, use the help tooltips throughout the platform, or contact our support team for personalized assistance.
+$
Target: $ @@ -116,7 +151,11 @@ get_header(); // Use theme's header