feat: Implement comprehensive help documentation page
- Create new WordPress page template for trainer documentation (page-trainer-documentation.php) - Add editable documentation content via Gutenberg editor - Implement automatic table of contents sidebar with smooth scrolling - Create comprehensive help content covering: - Platform overview and mission - Core concepts (Events, Venues, Organizers, Tickets, RSVPs, Orders, Certificates) - Profile customization guide - Venue and organizer management - Event creation and management process - Event attendance tracking methods - Certificate generation workflow - Comprehensive FAQs section - Support resources and contact information - Add responsive design with mobile-friendly layout - Include interactive TOC with active section highlighting - Update deployment script to set correct page template - Fix documentation page to use new template system The documentation page now provides trainers with a complete guide to using the platform, including step-by-step instructions for all major features and answers to common questions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
27af93a398
commit
49a7791817
5 changed files with 858 additions and 48 deletions
481
includes/class-hvac-documentation-content.php
Normal file
481
includes/class-hvac-documentation-content.php
Normal file
|
|
@ -0,0 +1,481 @@
|
|||
<?php
|
||||
/**
|
||||
* HVAC Documentation Content
|
||||
*
|
||||
* Provides default documentation content for the help page
|
||||
*/
|
||||
|
||||
class HVAC_Documentation_Content {
|
||||
|
||||
private static $instance = null;
|
||||
|
||||
public static function instance() {
|
||||
if (null === self::$instance) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
private function __construct() {
|
||||
add_shortcode('hvac_documentation_content', array($this, 'render_documentation_content'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the default documentation content
|
||||
*/
|
||||
public function render_documentation_content() {
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<h1>Upskill HVAC Training Platform Guide</h1>
|
||||
<p class="lead">Welcome to the comprehensive guide for creating and managing HVAC training events on the Upskill platform.</p>
|
||||
|
||||
<h2 id="overview">Platform Overview</h2>
|
||||
<p>The Upskill HVAC Training Network connects skilled trainers with trainees throughout the HVAC industry. Our mission is to elevate the entire industry through accessible, high-quality training opportunities.</p>
|
||||
|
||||
<div class="hvac-highlight-box">
|
||||
<h3>Why Choose Upskill HVAC?</h3>
|
||||
<ul>
|
||||
<li><strong>Free Listing Service:</strong> List any HVAC training event at no cost</li>
|
||||
<li><strong>Full Revenue:</strong> Keep 100% of your training fees (minus standard Stripe processing fees)</li>
|
||||
<li><strong>Integrated Ticketing:</strong> Professional ticketing and registration system included</li>
|
||||
<li><strong>Certificate Generation:</strong> Automatic certificate creation for attendees</li>
|
||||
<li><strong>Marketing Support:</strong> Your events are promoted across the Upskill network</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h2 id="core-concepts">Core Concepts</h2>
|
||||
<p>Understanding these key components will help you navigate the platform effectively:</p>
|
||||
|
||||
<div class="hvac-concepts-grid">
|
||||
<div class="hvac-concept-card">
|
||||
<h3>🎯 Events</h3>
|
||||
<p>Your training sessions, workshops, or classes. Each event has its own page with details, registration options, and venue information.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-concept-card">
|
||||
<h3>📍 Venues</h3>
|
||||
<p>Physical or virtual locations where training occurs. Venues can be reused across multiple events.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-concept-card">
|
||||
<h3>🏢 Organizers</h3>
|
||||
<p>The entity hosting the training (you, your company, or affiliated organization). Helps attendees identify who's providing the training.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-concept-card">
|
||||
<h3>🎫 Tickets</h3>
|
||||
<p>Paid registration options for your events. Set prices, early bird discounts, and capacity limits.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-concept-card">
|
||||
<h3>📝 RSVPs</h3>
|
||||
<p>Free registration option for events. Perfect for community events or when you want to track attendance without charging.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-concept-card">
|
||||
<h3>📊 Orders</h3>
|
||||
<p>Completed registrations for your events. Track who's attending and manage check-ins.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-concept-card">
|
||||
<h3>🏆 Certificates</h3>
|
||||
<p>Professional completion certificates for attendees. Automatically generated with unique IDs for verification.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 id="customizing-profile">Customizing Your Profile</h2>
|
||||
<p>Your trainer profile is your public face on the Upskill platform. It appears in the "Find a Trainer" directory and helps potential trainees discover your expertise.</p>
|
||||
|
||||
<h3>Profile Setup Steps:</h3>
|
||||
<ol>
|
||||
<li><strong>Navigate to Your Profile:</strong> Click "Profile" → "Trainer Profile" in the navigation menu</li>
|
||||
<li><strong>Upload Your Photo:</strong> Add a professional headshot to build trust with potential trainees</li>
|
||||
<li><strong>Complete Your Bio:</strong> Share your experience, certifications, and training philosophy</li>
|
||||
<li><strong>Add Contact Information:</strong> Include your business email and phone number</li>
|
||||
<li><strong>Specify Your Location:</strong> Help local trainees find you easily</li>
|
||||
<li><strong>List Certifications:</strong> Highlight your measureQuick certifications and other credentials</li>
|
||||
<li><strong>Set Training Preferences:</strong> Indicate your training formats, audience types, and specialties</li>
|
||||
</ol>
|
||||
|
||||
<div class="hvac-tip">
|
||||
<strong>💡 Pro Tip:</strong> Your profile was auto-created when you registered, but it likely needs updates. A complete profile generates 3x more training leads than incomplete ones.
|
||||
</div>
|
||||
|
||||
<h2 id="venues-organizers">Managing Venues & Organizers</h2>
|
||||
<p>Venues and organizers were automatically created for you during registration, but they need your attention to be fully effective.</p>
|
||||
|
||||
<h3>Updating Your Venues</h3>
|
||||
<ol>
|
||||
<li><strong>Review Existing Venues:</strong> Go to "Profile" → "Training Venues" to see your auto-created venue</li>
|
||||
<li><strong>Edit Venue Details:</strong> Click "Edit" to update address, capacity, and amenities</li>
|
||||
<li><strong>Add Photos:</strong> Upload images of your training facility to attract attendees</li>
|
||||
<li><strong>Create Additional Venues:</strong> If you train at multiple locations, create a venue for each</li>
|
||||
<li><strong>Check for Duplicates:</strong> Before creating new venues, search existing ones to avoid duplicates</li>
|
||||
</ol>
|
||||
|
||||
<h3>Managing Organizers</h3>
|
||||
<ol>
|
||||
<li><strong>Access Organizers:</strong> Navigate to "Profile" → "Training Organizers"</li>
|
||||
<li><strong>Update Your Organization:</strong> Add your company logo and description</li>
|
||||
<li><strong>Set Contact Information:</strong> Ensure phone and email are current</li>
|
||||
<li><strong>Add Affiliated Entities:</strong> Create additional organizers for partner organizations</li>
|
||||
<li><strong>Use Existing When Possible:</strong> You can select any existing organizer when creating events</li>
|
||||
</ol>
|
||||
|
||||
<div class="hvac-important">
|
||||
<strong>⚠️ Important:</strong> You can only edit venues and organizers that you created, but you can use any existing venue or organizer when setting up events. Always check for existing entries before creating new ones.
|
||||
</div>
|
||||
|
||||
<h2 id="creating-events">Creating & Managing Events</h2>
|
||||
<p>Events are the heart of your training business on Upskill. Here's how to create compelling training opportunities:</p>
|
||||
|
||||
<h3>Creating Your First Event</h3>
|
||||
<ol>
|
||||
<li><strong>Start Creation:</strong> Click "Events" → "New Event" in the navigation menu</li>
|
||||
<li><strong>Choose Event Type:</strong>
|
||||
<ul>
|
||||
<li>In-Person Training: For hands-on workshops at a physical location</li>
|
||||
<li>Virtual/Webinar: For online training sessions</li>
|
||||
<li>Hybrid: Combination of in-person and virtual attendance</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Set Essential Details:</strong>
|
||||
<ul>
|
||||
<li><strong>Title:</strong> Make it descriptive and searchable (e.g., "HVAC System Diagnostics Workshop - Dallas")</li>
|
||||
<li><strong>Date & Time:</strong> Set clear start and end times</li>
|
||||
<li><strong>Venue:</strong> Select from existing venues or create new</li>
|
||||
<li><strong>Organizer:</strong> Choose the appropriate organizing entity</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Write Compelling Description:</strong>
|
||||
<ul>
|
||||
<li>Learning objectives</li>
|
||||
<li>Prerequisites or skill level</li>
|
||||
<li>What to bring</li>
|
||||
<li>Agenda or schedule</li>
|
||||
<li>Instructor credentials</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Add Event Image:</strong> Upload an eye-catching image (recommended: 1920x1080px)</li>
|
||||
<li><strong>Configure Registration:</strong>
|
||||
<ul>
|
||||
<li>Set ticket prices (or make it free)</li>
|
||||
<li>Define capacity limits</li>
|
||||
<li>Add early bird pricing if desired</li>
|
||||
<li>Enable RSVPs for free events</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Virtual Event Settings:</strong> If online, add:
|
||||
<ul>
|
||||
<li>Video conference link (Zoom, Teams, etc.)</li>
|
||||
<li>Access instructions</li>
|
||||
<li>Technical requirements</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>Event Approval Process</h3>
|
||||
<div class="hvac-notice hvac-notice-info">
|
||||
<strong>📋 Note:</strong> New events must be approved by a Master Trainer (currently Joe Medosch) before appearing publicly. This ensures quality and consistency across the platform. Approval typically occurs within 24 hours.
|
||||
</div>
|
||||
|
||||
<h3>Editing Existing Events</h3>
|
||||
<ul>
|
||||
<li>Access your events from the dashboard</li>
|
||||
<li>Click "Edit" to modify details</li>
|
||||
<li>Changes to approved events may require re-approval</li>
|
||||
<li>Notify registered attendees of significant changes</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="event-attendance">Managing Event Attendance</h2>
|
||||
<p>Efficiently tracking attendance ensures accurate certificates and helps build your training reputation.</p>
|
||||
|
||||
<h3>Check-In Methods</h3>
|
||||
|
||||
<h4>Method 1: Manual Check-In (Web Interface)</h4>
|
||||
<ol>
|
||||
<li>Go to your event page</li>
|
||||
<li>Click "View Attendees"</li>
|
||||
<li>Mark attendees as "Checked In" as they arrive</li>
|
||||
<li>Add notes for partial attendance if needed</li>
|
||||
</ol>
|
||||
|
||||
<h4>Method 2: Event Tickets Plus App</h4>
|
||||
<ol>
|
||||
<li>Download the Event Tickets Plus app on your mobile device</li>
|
||||
<li>Connect to your Upskill account</li>
|
||||
<li>Scan QR codes or search attendee names</li>
|
||||
<li>Real-time sync with the platform</li>
|
||||
</ol>
|
||||
|
||||
<p><strong>App Setup Guide:</strong> <a href="https://theeventscalendar.com/knowledgebase/connecting-event-tickets-plus-app/" target="_blank">Connect Event Tickets Plus App →</a></p>
|
||||
|
||||
<h2 id="certificates">Certificate Generation</h2>
|
||||
<p>Professional certificates add value to your training and help attendees document their continuing education.</p>
|
||||
|
||||
<h3>Certificate Requirements</h3>
|
||||
<ul>
|
||||
<li>Event must be completed (past the end date)</li>
|
||||
<li>Event must be approved by a Master Trainer</li>
|
||||
<li>Attendees must be marked as checked-in</li>
|
||||
</ul>
|
||||
|
||||
<h3>Generating Certificates</h3>
|
||||
<ol>
|
||||
<li><strong>Navigate to Certificates:</strong> Click "Certificates" → "New Certificate"</li>
|
||||
<li><strong>Select Event:</strong> Choose from your completed events</li>
|
||||
<li><strong>Choose Recipients:</strong> Select all or specific attendees</li>
|
||||
<li><strong>Review Information:</strong> Verify names, dates, and training details</li>
|
||||
<li><strong>Generate PDFs:</strong> Click "Generate Certificates"</li>
|
||||
<li><strong>Distribution Options:</strong>
|
||||
<ul>
|
||||
<li>Email directly to attendees (automatic)</li>
|
||||
<li>Download for manual distribution</li>
|
||||
<li>Attendees can access via their profile</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<div class="hvac-feature">
|
||||
<strong>✨ Certificate Features:</strong>
|
||||
<ul>
|
||||
<li>Unique certificate ID for verification</li>
|
||||
<li>Professional design with Upskill branding</li>
|
||||
<li>Trainer name and credentials displayed</li>
|
||||
<li>QR code for digital verification</li>
|
||||
<li>PDF format for easy sharing and printing</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h2 id="faqs">Frequently Asked Questions</h2>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>How do I change my password?</h3>
|
||||
<p>Navigate to your Profile page and look for the "Change Password" section. Enter your current password, then your new password twice to confirm.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>Why can't I see my events publicly?</h3>
|
||||
<p>New events require approval from a Master Trainer before appearing publicly. This typically happens within 24 hours. If your event hasn't been approved after 48 hours, contact support at <a href="mailto:joe@upskillhvac.com">joe@upskillhvac.com</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>How do I get paid for my training events?</h3>
|
||||
<p>Val Buckles from our finance team will contact you to set up payment processing. You'll receive 100% of ticket sales minus standard Stripe processing fees (2.9% + $0.30 per transaction). Payments are typically processed weekly.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>Who do I contact if I need help?</h3>
|
||||
<p>For technical support and event approval questions, email Joe Medosch at <a href="mailto:joe@upskillhvac.com">joe@upskillhvac.com</a>. Joe is our Master Trainer and platform administrator.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>Can I list any type of HVAC training event?</h3>
|
||||
<p>Yes! We welcome all HVAC-related training events, including:</p>
|
||||
<ul>
|
||||
<li>Technical skills workshops</li>
|
||||
<li>Certification prep courses</li>
|
||||
<li>Safety training</li>
|
||||
<li>Business development seminars</li>
|
||||
<li>Product-specific training</li>
|
||||
<li>Soft skills for HVAC professionals</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>Do I need to be a Certified measureQuick Trainer?</h3>
|
||||
<p>No, you don't need measureQuick certification to use the platform. While many of our trainers are measureQuick certified, we welcome all qualified HVAC trainers. The platform is open to anyone providing quality HVAC education.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>How do I promote my events?</h3>
|
||||
<p>Your events are automatically:</p>
|
||||
<ul>
|
||||
<li>Listed in the public events calendar</li>
|
||||
<li>Searchable by location and topic</li>
|
||||
<li>Promoted in the Upskill newsletter (for approved events)</li>
|
||||
<li>Shareable via direct link and social media</li>
|
||||
</ul>
|
||||
<p>You can also share your trainer profile link to drive traffic to all your events.</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-faq">
|
||||
<h3>Can I offer discounts or promo codes?</h3>
|
||||
<p>Yes, you can create:</p>
|
||||
<ul>
|
||||
<li>Early bird pricing with automatic date cutoffs</li>
|
||||
<li>Group discounts for bulk registrations</li>
|
||||
<li>Custom promo codes for marketing campaigns</li>
|
||||
<li>Member-only pricing for associations</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h2 id="getting-help">Getting Additional Help</h2>
|
||||
|
||||
<div class="hvac-help-resources">
|
||||
<div class="hvac-help-card">
|
||||
<h3>📧 Email Support</h3>
|
||||
<p>For questions and technical issues:</p>
|
||||
<p><a href="mailto:joe@upskillhvac.com" class="hvac-button">joe@upskillhvac.com</a></p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-help-card">
|
||||
<h3>💰 Payment Questions</h3>
|
||||
<p>Val Buckles handles all payment setup:</p>
|
||||
<p>She will contact you directly</p>
|
||||
</div>
|
||||
|
||||
<div class="hvac-help-card">
|
||||
<h3>🎥 Video Tutorials</h3>
|
||||
<p>Coming soon: Step-by-step video guides for common tasks</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Documentation Specific Styles */
|
||||
.lead {
|
||||
font-size: 20px;
|
||||
color: #666;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.hvac-highlight-box {
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
border-left: 4px solid #E9AF28;
|
||||
padding: 20px;
|
||||
margin: 30px 0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.hvac-highlight-box h3 {
|
||||
margin-top: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hvac-concepts-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 20px;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.hvac-concept-card {
|
||||
background: #f8f9fa;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e9ecef;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.hvac-concept-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.hvac-concept-card h3 {
|
||||
margin-top: 0;
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hvac-concept-card p {
|
||||
margin-bottom: 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.hvac-tip {
|
||||
background: #fff3cd;
|
||||
border: 1px solid #ffc107;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.hvac-important {
|
||||
background: #f8d7da;
|
||||
border: 1px solid #f5c6cb;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 6px;
|
||||
color: #721c24;
|
||||
}
|
||||
|
||||
.hvac-feature {
|
||||
background: #d4edda;
|
||||
border: 1px solid #c3e6cb;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.hvac-faq {
|
||||
background: #fff;
|
||||
border: 1px solid #dee2e6;
|
||||
padding: 20px;
|
||||
margin: 20px 0;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.hvac-faq h3 {
|
||||
margin-top: 0;
|
||||
color: #E9AF28;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.hvac-help-resources {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 20px;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.hvac-help-card {
|
||||
background: #f8f9fa;
|
||||
padding: 25px;
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e9ecef;
|
||||
}
|
||||
|
||||
.hvac-help-card h3 {
|
||||
margin-top: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hvac-button {
|
||||
display: inline-block;
|
||||
background: #E9AF28;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border-radius: 6px;
|
||||
text-decoration: none;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.hvac-button:hover {
|
||||
background: #d49a1e;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.hvac-concepts-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hvac-help-resources {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize
|
||||
HVAC_Documentation_Content::instance();
|
||||
|
|
@ -152,6 +152,7 @@ class HVAC_Plugin {
|
|||
'class-hvac-event-navigation.php',
|
||||
'class-hvac-event-manage-header.php',
|
||||
'class-hvac-help-system.php',
|
||||
'class-hvac-documentation-content.php',
|
||||
'class-event-form-handler.php',
|
||||
'class-event-author-fixer.php',
|
||||
'class-attendee-profile.php',
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ echo -e "${GREEN}Step 4: Clearing cache...${NC}"
|
|||
sshpass -p "$SSH_PASS" ssh -o StrictHostKeyChecking=no "$SSH_USER@$SERVER_IP" "cd $SERVER_PATH && wp cache flush 2>/dev/null || echo 'WP-CLI cache flush not available' && wp breeze purge --cache=all 2>/dev/null || echo 'Breeze cache plugin not available' && wp eval 'if (function_exists(\"opcache_reset\")) { opcache_reset(); echo \"OPcache cleared\"; }' 2>/dev/null || echo 'OPcache reset not available'"
|
||||
|
||||
echo -e "${GREEN}Step 5: Activating plugin and creating pages...${NC}"
|
||||
sshpass -p "$SSH_PASS" ssh -o StrictHostKeyChecking=no "$SSH_USER@$SERVER_IP" "cd $SERVER_PATH && echo 'Deactivating plugin to ensure clean activation...' && wp plugin deactivate hvac-community-events --quiet && echo 'Activating plugin (this triggers page creation)...' && wp plugin activate hvac-community-events --quiet && echo 'Updating dashboard page template...' && PAGE_ID=\$(wp post list --post_type=page --name=dashboard --field=ID | head -1) && if [ ! -z \"\$PAGE_ID\" ]; then wp post meta update \$PAGE_ID _wp_page_template templates/page-trainer-dashboard.php --quiet && echo '✅ Dashboard template updated'; fi && echo 'Flushing rewrite rules...' && wp rewrite flush --quiet && if wp plugin list --name=hvac-community-events --status=active --format=count | grep -q '1'; then echo '✅ Plugin activated successfully'; else echo '❌ Plugin activation failed!'; fi"
|
||||
sshpass -p "$SSH_PASS" ssh -o StrictHostKeyChecking=no "$SSH_USER@$SERVER_IP" "cd $SERVER_PATH && echo 'Deactivating plugin to ensure clean activation...' && wp plugin deactivate hvac-community-events --quiet && echo 'Activating plugin (this triggers page creation)...' && wp plugin activate hvac-community-events --quiet && echo 'Updating dashboard page template...' && PAGE_ID=\$(wp post list --post_type=page --name=dashboard --field=ID | head -1) && if [ ! -z \"\$PAGE_ID\" ]; then wp post meta update \$PAGE_ID _wp_page_template templates/page-trainer-dashboard.php --quiet && echo '✅ Dashboard template updated'; fi && echo 'Updating documentation page template...' && DOC_ID=\$(wp post list --post_type=page --name=documentation --field=ID | head -1) && if [ ! -z \"\$DOC_ID\" ]; then wp post meta update \$DOC_ID _wp_page_template templates/page-trainer-documentation.php --quiet && echo '✅ Documentation template updated'; fi && echo 'Flushing rewrite rules...' && wp rewrite flush --quiet && if wp plugin list --name=hvac-community-events --status=active --format=count | grep -q '1'; then echo '✅ Plugin activated successfully'; else echo '❌ Plugin activation failed!'; fi"
|
||||
|
||||
echo -e "${GREEN}Step 6: Verifying deployment...${NC}"
|
||||
sshpass -p "$SSH_PASS" ssh -o StrictHostKeyChecking=no "$SSH_USER@$SERVER_IP" "cd $SERVER_PATH && echo 'Checking if key pages exist...' && if wp post list --post_type=page --name=training-login --format=count | grep -q '1'; then echo '✅ Login page exists'; else echo '❌ Login page missing'; fi && if wp post list --post_type=page --name=certificate-reports --format=count | grep -q '1'; then echo '✅ Certificate reports page exists'; else echo '❌ Certificate reports page missing'; fi"
|
||||
|
|
|
|||
|
|
@ -7,50 +7,5 @@
|
|||
* @since 2.0.0
|
||||
*/
|
||||
|
||||
// Define constant to identify we're in a page template
|
||||
define('HVAC_IN_PAGE_TEMPLATE', true);
|
||||
|
||||
// Get header
|
||||
get_header();
|
||||
|
||||
// Initialize breadcrumbs if available
|
||||
if (class_exists('HVAC_Breadcrumbs')) {
|
||||
$breadcrumbs = HVAC_Breadcrumbs::get_instance();
|
||||
$breadcrumbs->set_custom_breadcrumb([
|
||||
['title' => 'Trainer', 'url' => home_url('/trainer/')],
|
||||
['title' => 'Documentation', 'url' => '']
|
||||
]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="container hvac-trainer-page hvac-documentation-page">
|
||||
|
||||
<?php
|
||||
// Render navigation menu
|
||||
if (class_exists('HVAC_Menu_System')) {
|
||||
HVAC_Menu_System::instance()->render_trainer_menu();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Render breadcrumbs if available
|
||||
if (isset($breadcrumbs)) {
|
||||
echo $breadcrumbs->render();
|
||||
}
|
||||
?>
|
||||
|
||||
<main class="hvac-main-content">
|
||||
<?php
|
||||
// Render the documentation content using shortcode
|
||||
if (class_exists('HVAC_Help_System')) {
|
||||
echo do_shortcode('[hvac_documentation]');
|
||||
} else {
|
||||
echo '<p>Documentation is not available. Please contact an administrator.</p>';
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
// Redirect to new template
|
||||
include HVAC_PLUGIN_DIR . 'templates/page-trainer-documentation.php';
|
||||
373
templates/page-trainer-documentation.php
Normal file
373
templates/page-trainer-documentation.php
Normal file
|
|
@ -0,0 +1,373 @@
|
|||
<?php
|
||||
/**
|
||||
* Template Name: Trainer Documentation
|
||||
* Description: Help and documentation page for HVAC trainers
|
||||
*/
|
||||
|
||||
// Define constant to indicate we're in a page template
|
||||
define('HVAC_IN_PAGE_TEMPLATE', true);
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="hvac-page-wrapper hvac-trainer-documentation-page">
|
||||
<?php
|
||||
// Display trainer navigation menu
|
||||
if (class_exists('HVAC_Menu_System')) {
|
||||
HVAC_Menu_System::instance()->render_trainer_menu();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Display breadcrumbs
|
||||
if (class_exists('HVAC_Breadcrumbs')) {
|
||||
echo HVAC_Breadcrumbs::instance()->render_breadcrumbs();
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container hvac-documentation-container">
|
||||
<div class="hvac-doc-layout">
|
||||
<!-- Main Content Area -->
|
||||
<main class="hvac-doc-main">
|
||||
<?php
|
||||
// Check if user is logged in
|
||||
if (!is_user_logged_in()) {
|
||||
echo '<div class="hvac-notice hvac-notice-warning">';
|
||||
echo '<p>Please <a href="' . home_url('/training-login/') . '">log in</a> to access the documentation.</p>';
|
||||
echo '</div>';
|
||||
} else {
|
||||
// Display the page content (editable via Gutenberg)
|
||||
while (have_posts()) : the_post();
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class('hvac-doc-article'); ?>>
|
||||
<?php
|
||||
// If content exists, show it
|
||||
if (trim(get_the_content()) !== '') {
|
||||
the_content();
|
||||
} else {
|
||||
// Show default content if page is empty
|
||||
echo do_shortcode('[hvac_documentation_content]');
|
||||
}
|
||||
?>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
<!-- Table of Contents Sidebar -->
|
||||
<aside class="hvac-doc-sidebar" id="hvac-toc-sidebar">
|
||||
<div class="hvac-toc-wrapper">
|
||||
<h3 class="hvac-toc-title">Table of Contents</h3>
|
||||
<nav class="hvac-toc-nav" id="hvac-toc-nav">
|
||||
<!-- TOC will be populated by JavaScript -->
|
||||
</nav>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Documentation Page Layout */
|
||||
.hvac-documentation-container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.hvac-doc-layout {
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.hvac-doc-main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.hvac-doc-sidebar {
|
||||
width: 280px;
|
||||
position: sticky;
|
||||
top: 100px;
|
||||
max-height: calc(100vh - 120px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.hvac-toc-wrapper {
|
||||
background: #f8f9fa;
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.hvac-toc-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 15px 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hvac-toc-nav ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.hvac-toc-nav li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.hvac-toc-nav a {
|
||||
display: block;
|
||||
padding: 8px 12px;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
|
||||
.hvac-toc-nav a:hover {
|
||||
color: #E9AF28;
|
||||
background: #fff;
|
||||
border-left-color: #E9AF28;
|
||||
}
|
||||
|
||||
.hvac-toc-nav a.active {
|
||||
color: #E9AF28;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
border-left-color: #E9AF28;
|
||||
}
|
||||
|
||||
/* Nested TOC items */
|
||||
.hvac-toc-nav ul ul {
|
||||
margin-left: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.hvac-toc-nav ul ul a {
|
||||
font-size: 14px;
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
/* Documentation Content Styles */
|
||||
.hvac-doc-article {
|
||||
background: white;
|
||||
padding: 30px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.hvac-doc-article h1 {
|
||||
color: #333;
|
||||
font-size: 36px;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 3px solid #E9AF28;
|
||||
}
|
||||
|
||||
.hvac-doc-article h2 {
|
||||
color: #333;
|
||||
font-size: 28px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.hvac-doc-article h3 {
|
||||
color: #555;
|
||||
font-size: 22px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.hvac-doc-article h4 {
|
||||
color: #666;
|
||||
font-size: 18px;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.hvac-doc-article p {
|
||||
line-height: 1.8;
|
||||
margin-bottom: 15px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.hvac-doc-article ul,
|
||||
.hvac-doc-article ol {
|
||||
margin-bottom: 20px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.hvac-doc-article li {
|
||||
margin-bottom: 10px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.hvac-doc-article strong {
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hvac-doc-article a {
|
||||
color: #E9AF28;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid transparent;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.hvac-doc-article a:hover {
|
||||
border-bottom-color: #E9AF28;
|
||||
}
|
||||
|
||||
/* Notice Styles */
|
||||
.hvac-notice {
|
||||
padding: 15px 20px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hvac-notice-warning {
|
||||
background: #fff3cd;
|
||||
border: 1px solid #ffc107;
|
||||
color: #856404;
|
||||
}
|
||||
|
||||
.hvac-notice-info {
|
||||
background: #d1ecf1;
|
||||
border: 1px solid #bee5eb;
|
||||
color: #0c5460;
|
||||
}
|
||||
|
||||
.hvac-notice-success {
|
||||
background: #d4edda;
|
||||
border: 1px solid #c3e6cb;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (max-width: 992px) {
|
||||
.hvac-doc-layout {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.hvac-doc-sidebar {
|
||||
width: 100%;
|
||||
position: static;
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.hvac-doc-article {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.hvac-doc-article h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.hvac-doc-article h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.hvac-doc-article h3 {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
// Generate Table of Contents from headings
|
||||
function generateTOC() {
|
||||
var toc = $('#hvac-toc-nav');
|
||||
var headings = $('.hvac-doc-article').find('h2, h3, h4');
|
||||
|
||||
if (headings.length === 0) return;
|
||||
|
||||
var tocHTML = '<ul>';
|
||||
var lastLevel = 2;
|
||||
|
||||
headings.each(function() {
|
||||
var heading = $(this);
|
||||
var level = parseInt(heading.prop('tagName').substring(1));
|
||||
var text = heading.text();
|
||||
var id = heading.attr('id');
|
||||
|
||||
// Generate ID if not exists
|
||||
if (!id) {
|
||||
id = text.toLowerCase()
|
||||
.replace(/[^\w\s-]/g, '')
|
||||
.replace(/\s+/g, '-')
|
||||
.replace(/-+/g, '-')
|
||||
.trim();
|
||||
heading.attr('id', id);
|
||||
}
|
||||
|
||||
// Handle nesting
|
||||
if (level > lastLevel) {
|
||||
tocHTML += '<ul>';
|
||||
} else if (level < lastLevel) {
|
||||
for (var i = level; i < lastLevel; i++) {
|
||||
tocHTML += '</ul></li>';
|
||||
}
|
||||
} else if (lastLevel > 2) {
|
||||
tocHTML += '</li>';
|
||||
}
|
||||
|
||||
tocHTML += '<li><a href="#' + id + '">' + text + '</a>';
|
||||
lastLevel = level;
|
||||
});
|
||||
|
||||
// Close remaining tags
|
||||
for (var i = 2; i < lastLevel; i++) {
|
||||
tocHTML += '</ul></li>';
|
||||
}
|
||||
tocHTML += '</li></ul>';
|
||||
|
||||
toc.html(tocHTML);
|
||||
}
|
||||
|
||||
// Smooth scroll to anchor
|
||||
$(document).on('click', '.hvac-toc-nav a', function(e) {
|
||||
e.preventDefault();
|
||||
var target = $($(this).attr('href'));
|
||||
if (target.length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: target.offset().top - 100
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
// Highlight active section in TOC
|
||||
function highlightActiveSection() {
|
||||
var scrollPos = $(window).scrollTop();
|
||||
|
||||
$('.hvac-doc-article h2, .hvac-doc-article h3, .hvac-doc-article h4').each(function() {
|
||||
var currLink = $('.hvac-toc-nav a[href="#' + $(this).attr('id') + '"]');
|
||||
var refElement = $(this);
|
||||
|
||||
if (refElement.position() && refElement.position().top <= scrollPos + 150) {
|
||||
$('.hvac-toc-nav a').removeClass('active');
|
||||
currLink.addClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize TOC
|
||||
generateTOC();
|
||||
|
||||
// Update active section on scroll
|
||||
$(window).on('scroll', highlightActiveSection);
|
||||
highlightActiveSection();
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
Loading…
Reference in a new issue