Plugin Directory

Changeset 3444346


Ignore:
Timestamp:
01/21/2026 06:18:49 PM (2 months ago)
Author:
technodrome
Message:

4.0.2 version - new tab menu and profile names

Location:
technodrome-ai-content-assistant/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • technodrome-ai-content-assistant/trunk/changelog.txt

    r3432273 r3444346  
    1 # Changelog
    2 
    3 # 3.8.3 - 2026-01-04 - License Key Format Normalization & Critical Bug Fixes
    4 
    5 ## CRITICAL BUG FIX: License Key Validation Failure
    6 
    7 ### Problem
    8 - License keys with spaces (e.g., `XXXX-XXXX XXXX-XXXX` format) were causing "License invalid" errors
    9 - Server expects keys without spaces (e.g., `XXXX-XXXX-XXXX-XXXX` format)
    10 - Users had to manually format license keys, which was error-prone
    11 
    12 ### Solution
    13 - **Automatic Normalization**: License keys now automatically convert spaces to dashes
    14 - **Frontend Auto-Formatting**: JavaScript updates input field to show normalized key immediately
    15 - **Backend Validation**: Server-side normalization as additional safeguard
    16 - **Both Platforms**: Applied to both WordPress and Joomla versions simultaneously
    17 
    18 ### Files Modified
    19 - `technodrome-ai-content-assistant.php` - Version updated to 3.8.3
    20 - `features/header/add-licence.js` - Automatic space-to-dash conversion
    21 - `includes/class-license-manager.php` - Normalization in three methods:
    22   * `validate_remote_license()`
    23   * `ajax_validate_license()`
    24   * `ajax_validate_license_with_site()`
    25 
    26 ### Impact
    27 ✅ Users can now paste license keys in any format
    28 ✅ Automatic formatting prevents validation errors
    29 ✅ Seamless license validation without manual intervention
    30 ✅ Works identically on WordPress and Joomla
    31 
    32 ---
    33 
    34 # 3.5.4 - 2026-01-04 - Credit Toggle & Auto-Reset on Empty/Invalid License
    35 
    36 * **NEW FEATURE: Credit Toggle (v3.8.0)**
    37   - PRO/PREMIUM users can optionally hide Technodrome credit footer from generated articles
    38   - Free users: Credit footer remains mandatory (toggle disabled)
    39   - Pro/Premium users: Can toggle credit footer YES/NO via new footer control
    40   - Storage: Global user_meta setting (`taics_show_credits`)
    41   - Default: YES (credit shown)
    42   - Files Modified:
    43     * features/footer/credit-toggle.js (NEW)
    44     * dashboard/modules/footer/footer.php
    45     * includes/class-settings.php
    46     * includes/class-ajax-handler.php
    47     * includes/class-content-generator.php
    48     * technodrome-ai-content-assistant.php
    49     * includes/class-license-manager.php
    50     * dashboard/modules/footer/footer.css
    51 
    52 * **NEW FEATURE: Auto-Reset on Empty/Invalid License Key**
    53   - Automatically resets to FREE tier when:
    54     * License key field is emptied and "Save License" clicked
    55     * License key is invalid and validation fails
    56     * Any license validation error occurs
    57   - Prevents users from keeping premium features with invalid/empty keys
    58   - Better user experience for license management
    59 
    60 * **SECURITY:** All changes follow WordPress security standards
    61   - Nonce validation on all AJAX endpoints
    62   - Capability checks for user permissions
    63   - Input sanitization and output escaping
    64   - License enforcement on backend
    65 
    66 # 3.5.3 - 2025-12-28 - License Expiration Auto-Reset
    67 
    68 * **NEW FEATURE: License Expiration Auto-Reset ***
    69   - Automatic detection of expired licenses on page load
    70   - Auto-resets to free tier (Profile 1) when license expires
    71   - Clears all PRO features and premium settings
    72   - Adds prominent expiration banner in dashboard
    73   - Seamless user experience with minimal disruption
    74 
    75 * **CRITICAL BUG FIX:** API Model Loading Logic (features/generate-tab/ai-provider-select.js:450)
    76   - Root Cause: fetchModelsFromAPI() was filtering API responses by count - only used API if it had MORE models than hardcoded
    77   - Problem: Valid API responses showing fewer models were IGNORED, users saw hardcoded models instead of actual available ones
    78   - Solution: Changed logic to ALWAYS use API models when API returns valid response, regardless of count
    79   - Impact: Users now see what their API key can actually access, not arbitrary hardcoded list
    80   - Principle: "API models are the source of truth for what's available to this user"
    81 
    82 * **FEATURE IMPLEMENTATION:** Clear Model Cache Admin Button (v3.5.1 Complete)
    83   - **Frontend:** Clear Cache button in footer (dashboard/modules/footer/footer.php:174)
    84   - **JavaScript Handler:** handleClearCache() method in ai-provider-select.js:476
    85   - **Backend Handler:** handle_clear_model_cache() in class-ajax-handler.php:1172
    86   - **CSS Styling:** Footer button styling in dashboard/modules/footer/footer.css:485
    87   - **Functionality:** Clears WordPress 24-hour transient cache, reloads fresh API models
    88   - **User Benefit:** No more waiting 24 hours for new models to appear - click button to refresh
    89 
    90 * **SECURITY FIX:** Nonce Verification Corrected
    91   - Changed backend nonce from 'taics_ajax_nonce' to 'taics_footer_nonce' to match footer.php
    92   - JavaScript now correctly retrieves nonce from window.taics_footer object
    93 
    94 * **DOCUMENTATION:** Comprehensive guides for API model loading system
    95   - CRITICAL_FIX_v3.5.1_SUMMARY.md - Overview and explanation
    96   - CODE_COMPARISON_v3.5.1.md - Before/after code analysis
    97   - AI WordPress USTAV.txt - Updated with detailed troubleshooting
    98 
    99 * **TESTING CHECKLIST:**
    100   - [x] API models ALWAYS used when API returns valid response
    101   - [x] Clear Model Cache button clears WordPress transient cache
    102   - [x] Fresh API models loaded after clearing cache
    103   - [x] Fallback to hardcoded ONLY on API error
    104   - [x] Nonce verification works correctly
    105   - [x] Button shows loading state during cache clear
    106   - [x] Notification displays after cache cleared
    107 
    108   - Comprehensive Model Updates & Together AI Fix =
    109 * **CRITICAL FIX:** Together AI API Key Validation (class-ai-providers.php:526-561)
    110   - Root Cause: Validation was making test API calls that Together AI rejects
    111   - Solution: Changed to format-only regex validation (no test API call needed)
    112   - Result: Together AI keys now accepted and all models load successfully
    113 
    114 * **COMPREHENSIVE MODEL UPDATES:** All 8 AI Providers Updated to Dec 2025 Standards
    115 
    116   **OpenAI** (ai-provider-select.js:53-65, class-ai-providers.php)
    117   - Added: GPT-5.2 (Latest flagship), GPT-4.1-mini (cost-effective - user requested)
    118   - Updated: GPT-5.1, GPT-4.1, O3 (advanced reasoning), DALL-E 3
    119   - Verified: All models tested against current OpenAI API
    120 
    121   **Anthropic Claude** (ai-provider-select.js:66-72, class-ai-providers.php:216-224)
    122   - MAJOR: Added Claude 4.5 versions - claude-opus-4-5-20251101, claude-sonnet-4-5-20250929, claude-haiku-4-5-20251001
    123   - Kept: Claude 3.5 versions for backward compatibility
    124   - Note: These are the actual latest Claude versions as requested
    125 
    126   **Google Gemini** (ai-provider-select.js:73-82, class-ai-providers.php:273-286)
    127   - LATEST: Added Gemini 3 Pro (Dec 2025 latest generation)
    128   - Added: Gemini 2.5 Flash Lite and Gemini 2.0 Flash Lite variants
    129   - Verified: All models supported by Google API
    130 
    131   **DeepSeek** (ai-provider-select.js:83-89, class-ai-providers.php:348-356)
    132   - Updated: DeepSeek V3.5 (latest), V3.2 improvements, V3 flagship
    133   - Enhanced: R1 reasoning and R1 Distill variants
    134 
    135   **Cohere** (ai-provider-select.js:90-96, class-ai-providers.php:420-427)
    136   - NEW: Command A 03 (2025 latest model)
    137   - Kept: Command R+ for backward compatibility
    138 
    139   **Groq** (ai-provider-select.js:97-104, class-ai-providers.php:491-501)
    140   - Latest: Qwen QWQ 32B (newest reasoning model)
    141   - Enhanced: Llama 3.3 70B, DeepSeek R1 Distill Llama, Mixtral 8x7B
    142 
    143   **Together AI** (ai-provider-select.js:105-112, class-ai-providers.php:551-561)
    144   - NEW: Nvidia Nemotron 3 Nano (latest efficient model)
    145   - Verified: All model IDs match Together AI platform exactly
    146 
    147   **Mistral AI** (ai-provider-select.js:113-120, class-ai-providers.php:624-634)
    148   - New: Mistral Nemo (advanced efficient model)
    149   - Added: Ministral 8B (lightweight option)
    150   - Kept: Codestral for specialized code generation
    151 
    152 * **SYNCHRONIZATION:** Frontend (ai-provider-select.js) and Backend (class-ai-providers.php) Lists Fully Aligned
    153   - Both show identical model lists for consistency
    154   - Dynamic API loading for OpenAI still works as fallback
    155   - Hardcoded lists serve as reliable defaults
    156 
    157 * **KEY IMPROVEMENTS:**
    158   - No more model version lag - all models Dec 2025 current
    159   - Cost-effective options highlighted (GPT-4.1-mini, Mistral variants)
    160   - Better reasoning model support (O3, Claude 4.5, Qwen QWQ, DeepSeek R1)
    161   - Lite variants included for lightweight use cases
    162 
    163 ## 3.5.0 - 2025-12-16 - Critical Fixes Final =
    164 * **CRITICAL FIX:** Anthropic API Key Validation (class-ai-providers.php:188-227)
    165   - Root Cause: Validation was making expensive live API calls (10+ per session), repeatedly failing
    166   - Solution: Changed to format-only regex validation with 24-hour caching
    167   - Now supports both old (sk-ant-[alphanum]) and new (sk-ant-api03--MT...) key formats
    168   - Eliminates 10+ redundant API calls per profile load
    169 * **CRITICAL FIX:** Image Generation Empty Fragment Warning (class-content-generator.php:835-880)
    170   - Root Cause: appendXML() silently failed when image generation failed, creating empty fragments
    171   - Result: insertBefore() threw PHP Warning: "Document Fragment is empty"
    172   - Solution: Added validation checks before XML insertion, proper error logging
    173   - Removed @ suppression operator that was hiding real errors
    174 * **ENHANCEMENT:** All 9 providers working correctly (Demo, OpenAI, Anthropic, Google, DeepSeek, Cohere, Groq, Together, Mistral)
    175 * **PERFORMANCE:** Eliminated excessive API validation calls via intelligent caching system
    176 * **USER EXPERIENCE:** Image generation failures now show clear error messages without PHP warnings
    177 * **TESTING CHECKLIST:**
    178   - [ ] Anthropic key (new format sk-ant-api03--MT...) accepted without errors
    179   - [ ] No spam error logs for API validation (reduced from 12+ to 0)
    180   - [ ] All providers load models without excessive API calls
    181   - [ ] Image generation errors show proper notifications
    182   - [ ] No PHP DOMNode warnings in error logs
    183 
    184 ## 3.3.3 - 2025-12-13 =
    185 * **FIX:** OpenAI Model Capability Detection - Fixed bug where non-existent 'gpt-4' was in image capable models list
    186 * **BUG:** Toggle was enableing/disabling incorrectly because model list didn't match actual available models
    187 * **TECHNICAL:** Removed invalid 'gpt-4' from imageCapableModels array in ai-provider-select.js (line 490-496)
    188 * **VERIFIED MODELS:** gpt-4.1, gpt-4.1-mini, gpt-4o, gpt-4-turbo, gpt-3.5-turbo all support AI image generation
    189 * **RESULT:** AI Image toggle now correctly reflects model capabilities
    190 
    191 ## 3.3.2 - 2025-12-13 =
    192 * **FIX:** Photo Positions Null Container Error - Fixed "can't access property find" error when generating articles without photo slots
    193 * **FIX:** Added null-safety guards to photo-positions.js to prevent crashes when module not initialized
    194 * **TECHNICAL:** Added null checks in clearImagePreview(), updateImagePreview(), updateStatus() functions
    195 * **TECHNICAL:** Enhanced getValue() to safely handle uninitialized module state
    196 * **TECHNICAL:** Enhanced setValue() to store data without UI updates when container not initialized
    197 * **RESULT:** Articles now generate successfully with or without template photo slots (Opcija A - AI images separate from photo slots)
    198 * **NOTE:** AI Image Generation remains independent of photo slot system - featured images and photo positions don't mix
    199 
    200 ## 3.3.1 - 2025-12-13 =
    201 * **CRITICAL FIX:** API Key Sanitization Bug - Fixed critical issue where API keys were being corrupted by sanitize_text_field() function
    202 * **CRITICAL FIX:** OpenAI API validation - Fixed regex pattern to allow hyphens and underscores in OpenAI API keys (sk-[a-zA-Z0-9_-])
    203 * **TECHNICAL:** Updated class-profile-manager.php to NOT sanitize API keys during profile load
    204 * **TECHNICAL:** Updated class-ajax-handler.php ajax_save_profile() to preserve API keys without sanitization
    205 * **TECHNICAL:** Updated class-ajax-handler.php ajax_save_profile_simple() to preserve API keys without sanitization
    206 * **TECHNICAL:** Fixed api-status.js validation regex for all providers (OpenAI, DeepSeek, Anthropic, Google, Cohere)
    207 * **TECHNICAL:** Removed unused variables in api-status.js (provider and model parameters)
    208 * **RESULT:** All API keys now work correctly without corruption - Fixes "INVALID API KEY" error even with valid keys
    209 * **NOTE:** This fix ensures API keys with special characters are preserved and not modified during storage/retrieval
    210 
    211 ## 3.3.0 - 2025-12-13 =
    212 * **NEW FEATURE:** AI Image Generation with DALL-E 3 - Automatically generate featured images for articles using OpenAI's DALL-E 3
    213 * **NEW:** AI Image Toggle in Generate tab - Enable/disable AI image generation with a simple toggle button
    214 * **NEW:** Model Capability Detection - Real-time detection showing which AI models support image generation
    215 * **NEW:** Visual Capability Indicators - Green checkmark for supported models, red X for unsupported models
    216 * **NEW:** Non-blocking Implementation - Article generation continues even if image generation fails
    217 * **NEW:** WordPress Media Library Integration - Generated images are automatically saved to Media Library
    218 * **NEW:** Featured Image Auto-attach - Generated images are set as featured images for articles
    219 * **TECHNICAL:** Added TAICS_AI_Image_Generator service class for centralized image generation logic
    220 * **TECHNICAL:** Added generate_image() method to OpenAI provider for DALL-E 3 API integration
    221 * **TECHNICAL:** Extended AJAX handler to accept generate_ai_image parameter
    222 * **TECHNICAL:** Added ai-image-toggle.js module following existing toggle pattern
    223 * **TECHNICAL:** Added model capability detection in ai-provider-select.js
    224 * **TECHNICAL:** Updated generate-button.js to collect AI image flag and send to backend
    225 * **TECHNICAL:** Added comprehensive CSS styles for AI Image capability messages
    226 * **SUPPORTED MODELS:** All OpenAI models (gpt-4.1, gpt-4.1-mini, gpt-4o, gpt-4-turbo, gpt-4, gpt-3.5-turbo) support AI image generation
    227 * **LICENSE:** AI Image Generation feature is FREE for all users (not PREMIUM)
    228 * **NOTE:** Single OpenAI API key works for both text generation (GPT models) and image generation (DALL-E 3)
    229 
    230 ## 3.2.9 - 2025-12-09 =
    231 * **NEW FEATURE:** Schedule Publishing Template Support - Scheduled articles now use the selected template from profile (Templates 1-6)
    232 * **FIX:** Schedule Publishing now processes images based on template layout (Templates 2-5)
    233 * **FIX:** Schedule Publishing Category - Category is now taken from profile instead of duplicate form field
    234 * **FIX:** Fixed "Undefined array key 'category_id'" error in scheduled articles listing
    235 * **FIX:** Fixed "Array to string conversion" error in template processing for scheduled posts
    236 * **IMPROVEMENT:** Removed duplicate Category dropdown from Schedule Publishing form to avoid confusion
    237 * **IMPROVEMENT:** Schedule Publishing now uses all static settings from profile (language, tone, length, category, AI settings)
    238 * **TECHNICAL:** Added template processing to generate_content_only() function
    239 * **TECHNICAL:** Added user_id parameter to scheduler for accessing global resources (photos/videos)
    240 * **TECHNICAL:** Category retrieval from profile in AJAX handler for scheduled articles statistics
    241 * **NOTE:** Video embedding in scheduled articles requires further optimization (planned for future update)
    242 
    243 ## 3.2.7 - 2025-11-22 =
    244 * **PRODUCTION CLEANUP:** Complete cleanup of debug code and development artifacts for production deployment
    245 * **CLEANUP:** Removed all `error_log()`, `print_r()`, `var_dump()` debug functions from PHP files
    246 * **CLEANUP:** Removed suvišni `console.log()` debug pozivi sa emoji oznakama iz JavaScript fajlova
    247 * **CLEANUP:** Očišćeni svi `[DEBUG]` označeni pozivi iz advanced-template.js (50+ linija)
    248 * **CLEANUP:** Optimizovano enqueueing JavaScript fajlova u glavnom plugin fajlu
    249 * **CLEANUP:** Očišćeni debug pozivi iz photo-positions.js, generate-button.js, profile-buttons.js
    250 * **CLEANUP:** Očišćeni debug pozivi iz dashboard.js, websources-input.js, bulk-generator.js
    251 * **OPTIMIZATION:** Code optimization for better performance and WordPress standards compliance
    252 * **PREPARATION:** Priprava za buduće radove na vizuelnom poboljšanju templatea 1-6
    253 * **PREPARATION:** Priprava za fix koda generisanja članaka sa slikama i videom
    254 * **TECHNICAL:** Kod je sada production-ready bez suvišnih debug izlaza
    255 
    256 ## 3.2.6 - 2025-11-20 =
    257 * **CRITICAL FIX:** UTF-8 Encoding Issue - Resolved critical bug where Serbian Cyrillic characters were appearing garbled in generated articles (e.g., "oÅ¡aniÄka Banja" instead of "Jošanička Banja")
    258 * **FIX:** Removed problematic `mb_convert_encoding()` functions that were converting UTF-8 text to HTML entities and back, causing character corruption
    259 * **FIX:** Updated DOMDocument handling in content generator to preserve original UTF-8 encoding without unnecessary conversions
    260 * **FIX:** Removed UTF-8 encoding conversions from all AI provider classes (OpenAI, Anthropic, DeepSeek, Cohere)
    261 * **IMPROVEMENT:** Serbian and other non-Latin characters now display correctly in both demo and AI-generated content
    262 * **IMPROVEMENT:** Video embed codes now maintain proper encoding in generated articles
    263 * **NEW FEATURE:** Global Video System - Implemented new global video management with 2 video slots that can be added to Custom Template 6
    264 * **NEW FEATURE:** Video Slot Integration - Videos are now stored globally and can be referenced by slot number in Template 6 Custom Builder
    265 * **NEW FEATURE:** Auto-Save Video - Videos automatically save when user clicks outside of input field (blur event)
    266 * **NEW FEATURE:** Video Platform Support - Supports YouTube, Vimeo, TikTok, X/Twitter, and Instagram with automatic embed conversion
    267 * **TECHNICAL:** Simplified content processing to use WordPress's built-in UTF-8 handling instead of manual encoding conversions
    268 
    269 ## 3.2.5 - 2025-11-04 =
    270 * **ENHANCEMENT:** Web Sources Enhancement for Premium Users - Improved web sources validation and integration for AI content generation
    271 * **IMPROVEMENT:** Enhanced URL validation system with fixed infinite checking loop issue - button now properly returns to normal state after validation
    272 * **IMPROVEMENT:** Web sources are now properly integrated into AI prompts for premium generation modes (ai_with_rules and rules_only)
    273 * **IMPROVEMENT:** Fixed validation logic to prevent "checking" state from persisting indefinitely
    274 * **TECHNICAL:** Replaced jQuery each() with JavaScript for loop for synchronous validation in websources-input.js
    275 * **TECHNICAL:** Enhanced error handling and user feedback for web sources input validation
    276 
    277 ## Version 3.2.3 - Custom Builder Template 6 Preview Persistence Fix (2025-10-16)
    278 ### CRITICAL FIXES
    279 - **Custom Builder Template 6 Preview Persistence:** Fixed critical issue where canvas preview was not persisting after user login and profile switching
    280   - **Root Cause:** Timing issue between JavaScript module initialization and profile data loading
    281   - **Solution:** Enhanced `advanced-template.js` with dedicated `handlePreloadedCanvasData()` function that runs after initialization
    282   - **Implementation:** Added 300ms timeout check to ensure canvas data loads even when plugin initializes on different tabs
    283 
    284 ### MAJOR IMPROVEMENTS
    285 - **Canvas Data Loading Logic:** Complete overhaul of canvas initialization flow
    286   - **New Method:** `handlePreloadedCanvasData()` checks for existing canvas data and Template 6 selection
    287   - **Timing Fix:** Canvas now loads immediately if Template 6 is active and data exists
    288   - **Fallback:** Graceful handling for scenarios where canvas data is not yet available
    289 - **Enhanced Event Handling:** Improved template and profile change event processing
    290   - **Template Switching:** Canvas data auto-loads when user switches to Template 6
    291   - **Profile Changes:** Immediate canvas restoration when switching between profiles
    292   - **Initial Load:** Proper canvas initialization on page load if Template 6 is selected
    293 - **Robust Data Validation:** Enhanced canvas data validation and error handling
    294   - **Input Validation:** Strict validation for canvas data format and structure
    295   - **Error Handling:** Try-catch blocks with detailed error logging for each element
    296   - **Data Recovery:** Graceful handling of corrupted or missing element data
    297 - **Improved User Experience:** Enhanced notifications and feedback
    298   - **Debug Logging:** Detailed console logs for canvas operations and data flow
    299   - **User Feedback:** Clear status messages during canvas loading and operations
    300   - **Persistence Guarantee:** Users now see their saved layouts immediately after login
    301 
    302 ### TECHNICAL CHANGES
    303 - **JavaScript File:** `features/layout-templates-tab/advanced-template.js`
    304   - **New Function:** `handlePreloadedCanvasData()` - Centralized canvas data loading logic
    305   - **Enhanced `init()`:** Added timeout call to `handlePreloadedCanvasData()`
    306   - **Improved `setValue()`:** Better validation, error handling, and element rendering
    307   - **Robust `saveCanvasData()`:** Enhanced validation and safe data extraction
    308   - **Enhanced `getValue()`:** Better handling of edge cases and empty data
    309   - **New Helper:** `clearCanvasDisplay()` - Safe canvas clearing with data preservation
    310 - **Profile Integration:** Enhanced data flow between profile loading and canvas rendering
    311   - **Event System:** Improved `taics_template_changed` and `taics_profile_changed` event handling
    312   - **Data Flow:** Profile data → TAICS_Advanced_Template.canvasData → Canvas rendering
    313   - **Timing Synchronization:** Proper sequencing of profile data loading and canvas initialization
    314 - **Security Enhancements:** Improved canvas data sanitization and validation
    315   - **Input Validation:** Strict type checking for canvas data arrays
    316   - **Element Validation:** Validation of element types and required fields
    317   - **Config Validation:** Safe handling of element configuration data
    318 
    319 ### FIXES RESOLVED
    320 1. **Login Issue:** Canvas preview not showing after user login
    321 2. **Profile Switch:** Canvas layout not restoring when switching profiles
    322 3. **Template Switch:** Canvas not loading when switching to Template 6 from other templates
    323 4. **Tab Navigation:** Canvas data loss when navigating between different plugin tabs
    324 5. **Timing Issues:** Race conditions between module initialization and data loading
    325 6. **Data Corruption:** Graceful handling of missing or invalid canvas data
    326 7. **Empty Canvas:** Proper placeholder display when canvas data is empty
    327 
    328 ### USER IMPACT
    329 - **No More Canvas Loss:** Template 6 layouts now persist across all user actions
    330 - **Instant Loading:** Canvas preview loads immediately after login or profile switch
    331 - **Seamless Experience:** Users no longer need to rebuild custom layouts after login
    332 - **Reliable Functionality:** Canvas data is preserved in all scenarios and edge cases
    333 - **Better Feedback:** Clear status indicators and logging for troubleshooting
    334 
    335 ### DEVELOPER NOTES
    336 This fix addresses a critical user experience issue that was preventing Template 6 from being usable in production environments. The solution focuses on timing synchronization between asynchronous operations and provides robust error handling for edge cases.
    337 
    338 ## Version 3.2.2 - Internationalization Update (2025-10-14)
    339 * **NEW:** Added full interface translations for Spanish (es_ES), Mexican Spanish (es_MX), French (fr_FR), Serbian (sr_RS), Russian (ru_RU), German (de_DE), Japanese (ja), and Chinese (zh_CN).
    340 * **IMPROVEMENT:** The plugin interface will now automatically switch to the user's selected WordPress language.
    341 * **IMPROVEMENT:** If a translation is missing for a specific string, it will correctly fall back to English.
    342 
    343 ## Version 3.2.1 - Custom Builder & Advanced Canvas (2025-10-13)
    344 ### IMPROVEMENTS
    345 - **Technical:** Name postions of Templates 1-6
    346 
    347 ## Version 3.2.0 - Bulk Article Generation & Queue Management (2025-10-12)
    348 
    349 ### MAJOR FEATURES
    350 - **Bulk Article Generation:** Generate multiple articles at once with intelligent queue management
    351   - **Batch Processing:** Process 1-5 articles simultaneously in configurable batches
    352   - **Queue Management:** Real-time queue with Pause/Resume/Cancel controls
    353   - **Bulk Analytics:** Live statistics showing Total/Completed/Processing/Failed articles
    354   - **Progress Tracking:** Visual progress bar with estimated completion time
    355   - **Topic Input:** Multi-line textarea for entering article topics (one per line)
    356   - **Smart Delays:** Configurable delay between batches (0-60 seconds) to prevent API throttling
    357   - **Error Handling:** Failed articles are marked and tracked, processing continues with remaining items
    358   - **Profile Integration:** Uses Active Profile settings for all generated articles
    359 
    360 ### IMPROVEMENTS
    361 - **Queue System:** Complete state management with pending/processing/completed/failed/cancelled statuses
    362 - **Real-time Updates:** Live rendering of queue items with status icons (⏳ Pending, 🔄 Processing, ✅ Completed, ❌ Failed, ⛔ Cancelled)
    363 - **Analytics Dashboard:** Average generation time and estimated remaining time calculations
    364 - **Responsive UI:** Two-column layout (input + queue/analytics) with mobile support
    365 - **User Experience:** Topic counter, batch size selector, delay configuration
    366 - **Professional Design:** Color-coded status indicators, smooth animations, pulse effects for processing items
    367 
    368 ### UI COMPONENTS
    369 - **Left Panel:** Article Topics textarea, Topic counter, Batch size selector (1/2/3/5), Delay selector (0/5/10/30/60s), Settings source, Control buttons (Start/Pause/Resume/Cancel/Clear)
    370 - **Right Panel:** Generation Queue with scrollable list, Progress bar, Queue items (topic/status/duration), Bulk Analytics (Total/Completed/Processing/Failed), Time statistics (Avg. Time, Est. Remaining)
    371 
    372 ### TECHNICAL IMPLEMENTATION
    373 - **JavaScript (bulk-generator.js):** Queue management with Promise-based async processing, Batch processing using Promise.all, Real-time DOM rendering, XSS protection with escapeHtml()
    374 - **HTML (extras.php):** Semantic markup, Accessibility attributes, Internationalization ready
    375 - **CSS (extras.css):** Modern CSS Grid/Flexbox, Smooth animations (pulse, progress), Color-coded status system, Dark mode compatible, Responsive design
    376 - **Backend Integration:** Uses existing `taics_generate_content` AJAX handler, No new PHP/database required, Profile-based generation
    377 
    378 ### USE CASES
    379 1. **Content Calendar Filling:** Generate 10-20 articles for the month in one session
    380 2. **Topic Research Batch:** Process a list of keywords/topics from competitor analysis
    381 3. **Multi-language Content:** Bulk generate translations by switching profiles
    382 4. **SEO Content Creation:** Mass-produce SEO-optimized articles for keyword targeting
    383 5. **Emergency Publishing:** Quickly generate multiple articles when content pipeline is empty
    384 
    385 ## Version 3.1.1 - Template 6 Canvas Persistence Hotfix (2025-10-11)
    386 
    387 ### CRITICAL FIX
    388 - **Template 6 Canvas Persistence:** Resolved issue where canvas data was lost when plugin loaded on different tabs
    389   - Problem: `TAICS_Advanced_Template` object didn't exist when profile loaded before Layout Tab was accessed
    390   - Solution: Added placeholder object creation in `profile-buttons.js` if module hasn't loaded yet
    391   - Canvas data now always sets `window.TAICS_Advanced_Template.canvasData` regardless of module load state
    392 
    393 ### IMPROVEMENTS
    394 - **Profile Loading Enhancement:** `loadLayoutTemplateData()` now creates placeholder object before setting canvas data
    395   - Ensures canvas data is available when user switches to Layout Tab later
    396   - Prevents "Cannot read property 'canvasData' of undefined" errors
    397 - **Asynchronous Module Loading:** Better handling of module initialization timing
    398   - Canvas data persists even when modules load in different order
    399   - Improved reliability across different browser and caching scenarios
    400 
    401 ### TECHNICAL CHANGES
    402 - **profile-buttons.js (lines 299-332):**
    403   ```javascript
    404   if (!window.TAICS_Advanced_Template) {
    405       console.log('⚠️ TAICS_Advanced_Template not loaded yet - creating placeholder');
    406       window.TAICS_Advanced_Template = { canvasData: null };
    407   }
    408   window.TAICS_Advanced_Template.canvasData = layoutTemplate.advanced_template_canvas;
    409   ```
    410 - **Canvas Data Flow:** Profile load → Create placeholder object → Set canvasData → Layout Tab init → Render canvas
    411 - **Backward Compatibility:** No changes required to existing profiles or canvas data structure
    412 
    413 ## Version 3.1.0 - Content Structure Builder & Enhanced Content Rules (2025-10-10)
    414 
    415 ### MAJOR FEATURES
    416 - **Content Structure Builder:** Complete workflow for organizing and structuring AI-generated content
    417   - **Structure Name Field:** Name and organize your custom content structures
    418   - **Writing Guidelines Editor:** Define custom writing instructions, style guidelines, and formatting rules for AI to follow
    419   - **Web Sources Input:** Add up to 5 reference URLs for AI to research and incorporate information
    420   - **Structure Preview Panel:** Real-time visual preview of headings structure with proper formatting
    421   - **URL Validation System:** Traffic light indicators (🔴 Red/🟡 Yellow/🟢 Green) show URL validity status
    422 
    423 ### IMPROVEMENTS
    424 - **Unicode Character Support:** Serbian Cyrillic (Ћ, Ђ, Ж, Љ, Њ, Џ, Ш, Ч, Ц) and all special characters now save correctly
    425   - Added `JSON_UNESCAPED_UNICODE` flag to profile manager
    426   - Characters no longer convert to escape sequences (e.g., \u017e)
    427 - **AI Content Quality Enhancement:** Increased `max_tokens` from 2x to 3x word count for all 5 AI providers
    428   - **OpenAI:** `max_tokens => word_count * 3`
    429   - **Anthropic:** `max_tokens => word_count * 3`
    430   - **Google:** `maxOutputTokens => word_count * 3`
    431   - **DeepSeek:** `max_tokens => word_count * 3`
    432   - **Cohere:** `max_tokens => word_count * 3`
    433   - AI now generates complete articles without premature cutoff (fixes 90% text issue)
    434 - **Template 6 Canvas Persistence:** Enhanced initialization logic to properly restore canvas elements
    435   - Canvas data loads even when plugin starts on different tab
    436   - Added initialization checks for pre-loaded canvas data
    437   - Canvas elements auto-restore when Layout Tab is accessed
    438 
    439 ### BUG FIXES
    440 - **Template 6 Preview Loss:** Fixed canvas reset after plugin reload/page refresh
    441   - Added persistent storage check in `advanced-template.js init()`
    442   - Canvas data now loads from `this.canvasData` if set before initialization
    443 - **Profile Save/Load for Structure Name:** Properly sanitized and stored in database
    444   - Added `structure_name` field to Content Rules sanitization
    445   - Field now loads and resets correctly when switching profiles
    446 - **Headings Array Handling:** Fixed sanitization to support both array and string formats
    447   - `sanitize_content_rules()` now checks `is_array()` before processing
    448   - Prevents PHP errors when headings arrive as arrays from frontend
    449 - **WordPress Coding Standards:** Added `phpcs:disable` comments for legitimate third-party embed scripts
    450   - TikTok embed script: Required for TikTok functionality
    451   - Twitter/X embed script: Required for Twitter/X functionality
    452   - Instagram embed script: Required for Instagram functionality
    453 
    454 ### TECHNICAL CHANGES
    455 - **Profile Manager Enhancement:**
    456   - Added `JSON_UNESCAPED_UNICODE` flag to `wp_json_encode()` calls
    457   - Enhanced `sanitize_content_rules()` to handle `structure_name` field
    458   - Fixed array/string detection for headings field
    459 - **JavaScript Improvements:**
    460   - `advanced-template.js`: Added canvas data initialization check in `init()`
    461   - `profile-buttons.js`: Added `structure_name` load/reset in profile switching
    462   - Canvas loading logic now checks if Template 6 is active before rendering
    463 - **AI Provider Updates:**
    464   - Updated all 5 provider classes with increased `max_tokens` multiplier
    465   - Ensures consistent content generation across all AI models
    466 
    467 ### CONTENT RULES TAB STRUCTURE
    468 The Content Rules tab now provides a complete content structuring workflow:
    469 1. **Structure Name:** Name your content structure (e.g., "Tech Review Template")
    470 2. **Writing Guidelines:** Define tone, style, formatting rules
    471 3. **Web Sources:** Add reference URLs (with validation indicators)
    472 4. **Headings Editor:** Create custom heading structure
    473 5. **Structure Preview:** See real-time formatted preview
    474 
    475 ## Version 3.0.0 - Custom Builder & Advanced Canvas (2025-10-09)
    476 
    477 ### MAJOR FEATURES
    478 - **Template 6 - Custom Builder:** Revolutionary drag & drop canvas system for creating custom article layouts
    479 - **Advanced Canvas Elements:** 5 draggable element types:
    480   - AI Text: Position AI-generated content anywhere in your layout
    481   - Photo Elements: Drag photos 1-3 to any position
    482   - Custom Text: Insert custom-written content blocks with HTML formatting
    483   - Video Embed: Embed YouTube, Vimeo, TikTok, Twitter/X, Instagram videos
    484   - iFrame Embed: Embed external content with customizable height
    485 - **Canvas Persistence:** Template 6 layouts are saved in user profiles and persist across sessions
    486 
    487 ### IMPROVEMENTS
    488 - **Enhanced Progress Notifications:** Added 7 detailed progress steps during content generation (up from 3):
    489   1. Content generation started
    490   2. Loading profile settings
    491   3. Connecting to AI provider
    492   4. Building content prompt
    493   5. Generating AI content (30-90 seconds notification)
    494   6. Processing layout template and images
    495   7. Finalizing article and saving
    496 - **Layout Templates Reorganization:** Templates 1-3 in row 1, Templates 4-5 in left column, Template 6 as large 2x2 canvas
    497 - **Always Visible Element Palette:** Element palette positioned below canvas for easy access
    498 - **Profile Manager Enhancement:** Added `advanced_template_canvas` field with dedicated sanitization
    499 
    500 ### BUG FIXES
    501 - **CRITICAL FIX:** Resolved canvas elements not being saved to database - added proper sanitization in Profile Manager
    502 - **Canvas Reload Fix:** Added retry logic to ensure canvas loads properly after profile switch or page reload
    503 - **Timing Issues:** Fixed canvas initialization timing issues when switching between profiles
    504 - **Plugin Check Compliance:** Removed ALL debug error_log calls (0 warnings in WordPress Plugin Check)
    505 
    506 ### TECHNICAL CHANGES
    507 - **Canvas Data Flow:** Implemented proper data flow: JavaScript → AJAX → Profile Manager → Database → Content Generator
    508 - **Sanitization Methods:** Added `sanitize_advanced_canvas()` method with security measures:
    509   - URLs sanitized with `esc_url_raw()`
    510   - HTML content filtered with `wp_kses_post()`
    511   - Text fields sanitized with `sanitize_text_field()`
    512 - **Video Embed Support:** Regex patterns for YouTube, Vimeo, TikTok, Twitter/X, Instagram
    513 - **Canvas Element Config:** Each element stores type, ID, and configuration data
    514 - **Retry Logic:** Canvas loading uses retry mechanism to handle async initialization
    515 
    516 ### SECURITY
    517 - All canvas elements are properly sanitized before saving
    518 - Video URLs validated and escaped
    519 - Custom text content filtered for XSS protection
    520 - iFrame URLs validated and escaped
    521 
    522 ## Version 2.7.1 - Photo Link Functionality (2024-10-08)
    523 - **NEW FEATURE:** Added photo link functionality - images in articles can now be clickable and redirect to custom URLs
    524 - **IMPROVEMENT:** Photo links persist across profile switches and tab navigation
    525 - **IMPROVEMENT:** Photo links are properly saved in user metadata (handle_save_photos) and included during content generation (handle_generate_content)
    526 - **FIX:** Removed debug error_log calls from class-content-generator.php to comply with WordPress Plugin Check requirements
    527 - **IMPROVEMENT:** Images with links are now automatically wrapped in anchor tags with target="_blank" and rel="noopener noreferrer" security attributes
    528 - **IMPROVEMENT:** Added comprehensive validation for photo link URLs with automatic https:// prepending
    529 
    530 ## Version 2.6.1 - Dynamic History Tab and UX Overhaul
    531 - **ENHANCEMENT:** Completely overhauled the "History" tab to be fully dynamic, eliminating the need for page reloads for any action.
    532 - **FEATURE:** The dashboard now automatically switches to the "History" tab after an article is successfully generated, providing immediate feedback.
    533 - **FEATURE:** The History tab list now auto-refreshes when a new article is created, ensuring the latest content is always visible.
    534 - **FEATURE:** Replaced the standard post deletion link with an AJAX-powered inline deletion. Posts are now removed instantly from the list with a fade-out animation without opening a new page.
    535 - **FIX:** Corrected the logic for refreshing the history content, which previously relied on a non-existent AJAX action, making the feature reliable.
    536 
    537 ## Version 2.6.0 - Critical Image Insertion Fix & Stability Improvements
    538 - **CRITICAL FIX:** Implemented a robust HTML DOM parser (`DOMDocument` with `XPath`) for image insertion. This resolves the critical bug where images were not appearing in generated articles by correctly preserving all HTML tags (headings, lists, etc.) during manipulation.
    539 - **IMPROVEMENT:** Refactored the JavaScript `setValue()` function for photo positions to handle multiple data formats (Array and Object), preventing errors when loading photo data from different sources (user meta vs. AJAX responses).
    540 - **IMPROVEMENT:** Corrected the profile loading logic (`loadLayoutTemplateData`) to no longer interfere with photo selections, reinforcing that photos are dynamic content separate from static profiles.
    541 - **FIX:** Resolved a bug where the `cleanup()` function in the photo management module was incorrectly clearing selected photos during tab switching, causing the generation process to fail. Photo data now persists correctly.
    542 
    543 ## Version 2.5.0 - Schedule Publishing & Critical Bug Fixes
    544 - **NEW FEATURE:** Added "Schedule Publishing" for PRO and PREMIUM users, allowing automated content generation and publishing at a future date and time.
    545 - **IMPROVEMENT:** Reworked the scheduler statistics logic to correctly filter and display user-specific scheduled articles.
    546 - **FIX:** Resolved a critical bug where scheduled articles were not appearing in the schedule list due to incorrect user ID filtering.
    547 - **SECURITY:** Hardened the AI provider class by adding escaping to error message outputs, passing WordPress Plugin Check requirements.
    548 
    549 ## Version 2.4.2 - UI Enhancements
    550 - **UI IMPROVEMENT:** Enhanced the user interface for the "Add Content Title" field for better clarity and usability.
    551 - **UI IMPROVEMENT:** Redesigned the "Generate Content" button with improved visual feedback during the content generation process.
    552 
    553 ## Version 2.4.0 - Reworked content generation logic and Bug Fixes
    554 - **REFACTOR:** Reworked the entire content generation logic. The system now exclusively uses settings from the saved active profile, making generation more reliable and predictable.
    555 - **FIX:** Resolved a series of bugs that prevented the "Generate Content" button from functioning correctly under various conditions.
    556 - **FIX:** Corrected the data flow for API keys and AI model settings, ensuring the correct provider is used.
    557 - **IMPROVEMENT:** Simplified the AJAX request for content generation, improving security and performance.
    558 
    559 ## Version 2.3.0 - Feature Enhancements and Bug Fixes
    560 
    561 - **Feature:** Added a "Default Tone" selector to the Generate tab for setting a consistent writing tone.
    562 - **Fix:** Resolved a persistent issue causing duplicate notifications on dashboard load.
    563 - **Fix:** Corrected a CSS bug that displayed a "not-allowed" cursor on input fields.
    564 - **Fix:** Addressed several visual and functional inconsistencies in Dark Mode.
    565 - **UI:** Implemented minor visual enhancements to the header and footer.
    566 
    567 ## Version 2.2.0 - UI and Security Enhancements
    568 
    569 - **Improvement:** Enhanced the footer UI with real-time information about the currently active profile and plugin usage statistics.
    570 - **Fix:** Corrected an issue where the plugin version was hardcoded in the header and not dynamically displayed. The version now correctly shows 2.2.0.
    571 - **Fix:** Hardened the plugin against various WordPress Plugin Check warnings, including output escaping, nonce sanitization, and fixing the stable tag mismatch.
    572 
    573 ## Version 2.1.0 - Security and Stability Update
    574 
    575 - **Improvement:** Overhauled the license validation system to be more robust and secure. All AJAX calls now use a unified nonce system, resolving critical `403 Forbidden` errors and `Invalid nonce` issues.
    576 - **Improvement:** Hardened the plugin against double-loading errors by implementing singleton initialization patterns, resolving `Cannot redeclare function` fatal errors.
    577 - **Fix:** Corrected an issue where the plugin version was hardcoded in the header and not dynamically displayed. The version now correctly shows 2.1.0.
    578 - **Fix:** Removed a duplicate and non-functional AJAX handler for license validation that was causing conflicts.
    579 
    580 ## Version 2.0.0 - Full rewrite and modernization
    581 
    582 - Completely refactored plugin architecture
    583 - Modular visual, functional, and backend separation
    584 - Multiple AI providers integrated: OpenAI, Anthropic, Google, DeepSeek, Cohere
    585 - User profile system with 6 profiles and full save/load support
    586 - Layout templates with image upload and WordPress media library integration
    587 - Content rules with live heading editing and premium web sources
    588 - Scheduling publishing and bulk generation (premium feature)
    589 - Dark mode and responsive design
    590 - License system with online validation and plan enforcement
    591 - Security enhancements: nonce verification, input sanitization, and escaping
    592 - Performance improvements with lazy loading and AJAX optimization
    593 - Numerous bug fixes and UI refinements
    594 
    595 ## Version 1.0.0 - Initial release
    596 
     1# Changelog - Technodrome AI Content Assistant
     2
     3## Version 4.0.2 - 2026-01-21
     4
     5### NEW FEATURES
     6- **Custom Profile Names:** Rename profiles (Profile 1-6) with custom 7-character labels for better organization
     7  - Type in Structure Name field → Profile button updates instantly
     8  - Examples: SPORT, NEWS, BLOG, TECH for quick identification
     9  - Names persist across sessions
     10
     11### IMPROVEMENTS
     12- Enhanced profile navigation and identification
     13- Simplified profile management workflow
     14
     15---
     16
     17## Version 4.0.1 - 2026-01-21
     18
     19### NEW FEATURES
     20- **Dual Tab Navigation:** Access tab controls from both top and bottom of dashboard
     21  - Better UX for long content areas
     22  - Automatic synchronization between top and bottom tabs
     23  - Smooth auto-scroll when clicking bottom navigation
     24
     25### IMPROVEMENTS
     26- Visual enhancement with blue gradient active tab highlighting
     27- Improved navigation accessibility
     28- Enhanced visual feedback for tab selection
     29
     30---
     31
     32## Version 4.0.0 - 2025-12-28
     33
     34### NEW FEATURES
     35- **Credit Toggle Control:** PRO/PREMIUM users can optionally hide Technodrome credits from generated articles
     36  - FREE users: Credits are mandatory (toggle disabled)
     37  - PRO/PREMIUM users: Can toggle credits YES/NO globally
     38
     39- **Auto-Reset on License Changes:** Automatically resets to FREE tier when:
     40  - License key is removed
     41  - License key becomes invalid
     42  - License expires
     43
     44### IMPROVEMENTS
     45- Better license management experience
     46- Cleaner article footer control for premium users
     47- Automated license state management
     48
     49---
     50
     51## Version 3.8.3 - 2026-01-04
     52
     53### IMPROVEMENTS
     54- **License Key Format Flexibility:** License keys now accept multiple formats
     55  - Automatic format normalization (spaces → dashes)
     56  - Paste keys in any format, plugin handles conversion
     57  - Reduces validation errors and user frustration
     58
     59---
     60
     61## Version 3.8.0 - 2025-12-20
     62
     63### IMPROVEMENTS
     64- Enhanced model availability system across all AI providers
     65- Improved model loading reliability
     66
     67---
     68
     69## Version 3.5.3 - 2025-12-28
     70
     71### NEW FEATURES
     72- **License Expiration Monitoring:** Automatic detection of expired licenses
     73  - Auto-resets to free tier on page load when license expires
     74  - Displays expiration banner for awareness
     75  - Seamless transition without disrupting workflow
     76
     77---
     78
     79## Version 3.5.1 - 2025-12-16
     80
     81### NEW FEATURES
     82- **Clear Model Cache:** One-click button to refresh AI model lists
     83  - Eliminates 24-hour wait for new models to appear
     84  - Useful when upgrading to new API plans or changing API keys
     85
     86### IMPROVEMENTS
     87- Faster model availability updates
     88- Better support for API changes without waiting
     89
     90---
     91
     92## Version 3.5.0 - 2025-12-16
     93
     94### IMPROVEMENTS
     95- Enhanced API key validation performance
     96- Reduced redundant API calls during profile operations
     97- Better error messaging for API issues
     98- Improved stability for all AI providers
     99
     100---
     101
     102## Version 3.3.3 - 2025-12-13
     103
     104### BUG FIXES
     105- Fixed AI image generation toggle behavior
     106- Improved model capability detection accuracy
     107
     108---
     109
     110## Version 3.3.2 - 2025-12-13
     111
     112### BUG FIXES
     113- Fixed article generation with custom layout templates
     114- Enhanced template initialization stability
     115
     116---
     117
     118## Version 3.3.1 - 2025-12-13
     119
     120### BUG FIXES
     121- Fixed API key handling and validation across all providers
     122- Improved data integrity during profile operations
     123
     124---
     125
     126## Version 3.3.0 - 2025-12-13
     127
     128### NEW FEATURES
     129- **AI Image Generation:** Automatically generate featured images for articles using DALL-E 3
     130  - Works with OpenAI API
     131  - Generated images auto-saved to WordPress Media Library
     132  - Images set as featured images for articles
     133  - Non-blocking: Article generation continues even if image generation fails
     134
     135### IMPROVEMENTS
     136- Real-time model capability detection
     137- Visual indicators for image-capable models
     138- Better image generation error handling
     139
     140---
     141
     142## Version 3.2.9 - 2025-12-09
     143
     144### IMPROVEMENTS
     145- Enhanced schedule publishing with full template support
     146- Scheduled articles now use selected layout templates
     147- Better category handling in scheduled posts
     148
     149---
     150
     151## Version 3.2.7 - 2025-11-22
     152
     153### IMPROVEMENTS
     154- Production code cleanup
     155- Improved performance and code quality
     156
     157---
     158
     159## Version 3.2.6 - 2025-11-20
     160
     161### NEW FEATURES
     162- **Global Video System:** 2 video slots for adding videos to custom layouts
     163  - Support for YouTube, Vimeo, TikTok, X/Twitter, Instagram
     164  - Auto-embed conversion for proper display
     165  - Videos persist globally across profiles
     166
     167### BUG FIXES
     168- Fixed character encoding for international languages (Serbian Cyrillic, etc.)
     169- Improved UTF-8 handling across the plugin
     170
     171---
     172
     173## Version 3.2.5 - 2025-11-04
     174
     175### IMPROVEMENTS
     176- Enhanced web sources integration for better AI research
     177- Improved URL validation and feedback
     178- Better integration of sources into AI prompts
     179
     180---
     181
     182## Version 3.2.3 - 2025-10-16
     183
     184### BUG FIXES
     185- Fixed custom template layout persistence after login
     186- Improved canvas preview reliability across profile switches
     187
     188---
     189
     190## Version 3.2.2 - 2025-10-14
     191
     192### NEW FEATURES
     193- **Full Interface Localization:** Complete translations for 8 languages
     194  - Spanish, French, Serbian, Russian, German, Japanese, Chinese
     195  - Automatic language switching based on WordPress settings
     196  - Fallback to English for missing translations
     197
     198---
     199
     200## Version 3.2.1 - 2025-10-13
     201
     202### IMPROVEMENTS
     203- Enhanced template positioning and naming
     204
     205---
     206
     207## Version 3.2.0 - 2025-10-12
     208
     209### NEW FEATURES
     210- **Bulk Article Generation:** Generate multiple articles in one session
     211  - Batch processing (1-5 articles at a time)
     212  - Real-time queue management with Pause/Resume/Cancel
     213  - Live statistics and progress tracking
     214  - Intelligent delays to prevent API throttling
     215  - Error recovery and tracking
     216
     217### IMPROVEMENTS
     218- Enhanced queue visualization
     219- Better progress estimation
     220- Improved error handling for batch operations
     221
     222---
     223
     224## Version 3.1.1 - 2025-10-11
     225
     226### BUG FIXES
     227- Improved custom template canvas persistence
     228- Better async module initialization handling
     229
     230---
     231
     232## Version 3.1.0 - 2025-10-10
     233
     234### NEW FEATURES
     235- **Content Structure Builder:** Organize and structure AI-generated content
     236  - Custom structure naming
     237  - Writing guidelines editor for AI instructions
     238  - Web sources input with validation
     239  - Real-time structure preview
     240
     241### IMPROVEMENTS
     242- Enhanced AI content quality with improved token management
     243- Better Unicode character support for international languages
     244- Improved template persistence across sessions
     245
     246---
     247
     248## Version 3.0.0 - 2025-10-09
     249
     250### NEW FEATURES
     251- **Custom Builder (Template 6):** Revolutionary drag & drop canvas system
     252  - Create custom article layouts with multiple elements
     253  - Draggable components: AI Text, Photos, Custom Text, Videos, Embeds
     254  - Full canvas persistence in user profiles
     255  - Real-time preview and layout editing
     256
     257### IMPROVEMENTS
     258- Enhanced progress notifications during generation (7-step detailed feedback)
     259- Better layout template organization
     260- Improved visual feedback during content creation
     261
     262---
     263
     264## Version 2.7.1 - 2024-10-08
     265
     266### NEW FEATURES
     267- **Photo Links:** Make article images clickable with custom URLs
     268  - Images link to custom destinations
     269  - Automatic target="_blank" for new tab opening
     270  - Persistent across profile switches
     271
     272---
     273
     274## Version 2.6.1 - 2025-10-07
     275
     276### IMPROVEMENTS
     277- **Dynamic History Tab:** Fully AJAX-powered history management
     278  - No page reloads needed for any action
     279  - Auto-switch to History tab after article generation
     280  - Instant inline deletion with animations
     281  - Real-time list updates
     282
     283---
     284
     285## Version 2.6.0 - 2025-10-06
     286
     287### IMPROVEMENTS
     288- Robust HTML parsing for reliable image insertion
     289- Better photo position data handling
     290- Improved photo persistence across operations
     291
     292---
     293
     294## Version 2.5.0 - 2025-09-15
     295
     296### NEW FEATURES
     297- **Schedule Publishing:** Automated content generation and publishing
     298  - Schedule articles for future dates and times
     299  - Set content generation parameters in advance
     300  - Automated publishing at scheduled time
     301  - PRO/PREMIUM feature
     302
     303### IMPROVEMENTS
     304- Better scheduler statistics filtering
     305- Improved user-specific scheduling
     306
     307---
     308
     309## Version 2.4.2 - 2025-09-10
     310
     311### IMPROVEMENTS
     312- Enhanced user interface for content title input
     313- Improved visual feedback for generate button
     314
     315---
     316
     317## Version 2.4.0 - 2025-09-05
     318
     319### IMPROVEMENTS
     320- Simplified content generation logic
     321- Better data flow from profiles to generation
     322- Improved reliability and predictability
     323
     324---
     325
     326## Version 2.3.0 - 2025-08-28
     327
     328### NEW FEATURES
     329- **Default Tone Selector:** Set consistent writing tone for content
     330  - Available for all generation modes
     331  - Persists across articles
     332
     333### IMPROVEMENTS
     334- Better notification handling
     335- Enhanced dark mode support
     336- Visual refinements throughout
     337
     338---
     339
     340## Version 2.2.0 - 2025-08-20
     341
     342### IMPROVEMENTS
     343- Enhanced footer with real-time profile statistics
     344- Better output escaping for security
     345- Improved plugin check compliance
     346
     347---
     348
     349## Version 2.1.0 - 2025-08-15
     350
     351### IMPROVEMENTS
     352- Overhauled license validation system
     353- Unified nonce system across all AJAX calls
     354- Better error handling and initialization
     355
     356---
     357
     358## Version 2.0.0 - 2025-08-01
     359
     360### MAJOR REWRITE
     361- Complete plugin architecture modernization
     362- Modular design with separated concerns
     363- Multiple AI provider integration (OpenAI, Anthropic, Google, DeepSeek, Cohere)
     364- User profile system (6 profiles)
     365- Layout templates with media integration
     366- Content rules system
     367- Schedule publishing and bulk generation
     368- Dark mode support
     369- Comprehensive license system
     370- Enhanced security measures
     371
     372---
     373
     374## Version 1.0.0 - 2025-07-01
     375
     376### INITIAL RELEASE
    597377- Basic AI article generation
    598 - Simple profile saving
    599 - Basic layout and UI
     378- Simple profile management
     379- Basic layout and interface
  • technodrome-ai-content-assistant/trunk/dashboard/dashboard.css

    r3423160 r3444346  
    108108.taics-tabs-nav {
    109109    display: flex;
    110     background: var(--taics-bg-tertiary);
    111     border-bottom: none !important;
     110    background: linear-gradient(180deg, var(--taics-bg-tertiary) 0%, var(--taics-bg-secondary) 100%);
     111    border-bottom: 2px solid var(--taics-border);
     112    border-radius: 8px 8px 0 0;
    112113    margin: 0;
    113114    padding: 0;
    114115    flex-wrap: wrap;
     116    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    115117}
    116118
     
    140142
    141143.taics-tab-button.active {
     144    color: white;
     145    background: linear-gradient(135deg, var(--taics-primary) 0%, #667eea 100%);
     146    border-bottom-color: transparent;
     147    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
     148    font-weight: 700;
     149}
     150
     151/* Tab icon styling for better visibility */
     152.taics-tab-icon {
     153    font-size: 18px;
     154    display: inline-block;
     155    transition: var(--taics-transition);
     156}
     157
     158.taics-tab-button:hover .taics-tab-icon {
     159    transform: scale(1.1);
     160}
     161
     162.taics-tab-button.active .taics-tab-icon {
     163    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
     164}
     165
     166/* Bottom Tab Navigation (v3.5.4) */
     167.taics-tabs-nav-bottom {
     168    border-top: 2px solid var(--taics-border);
     169    margin-top: 0;
     170    padding: 12px 0;
     171    background: var(--taics-bg-secondary);
     172}
     173
     174.taics-tabs-nav-bottom .taics-tab-button {
     175    padding: 12px 20px;
     176    font-size: 13px;
     177    border-bottom: none;
     178    border-top: 3px solid transparent;
     179    color: var(--taics-text-secondary);
     180    transition: var(--taics-transition);
     181}
     182
     183.taics-tabs-nav-bottom .taics-tab-button:hover {
    142184    color: var(--taics-primary);
    143     background: var(--taics-bg-secondary);
    144     border-bottom-color: var(--taics-primary);
     185    background: rgba(102, 126, 234, 0.08);
     186    border-top-color: transparent;
     187}
     188
     189.taics-tabs-nav-bottom .taics-tab-button.active {
     190    color: white;
     191    background: linear-gradient(135deg, #667eea 0%, #5b73e8 100%);
     192    border-top-color: transparent;
     193    box-shadow: 0 -4px 12px rgba(102, 126, 234, 0.3);
    145194}
    146195
     
    151200    display: none;
    152201    padding: 30px;
     202    margin-bottom: 0;
    153203}
    154204   
  • technodrome-ai-content-assistant/trunk/dashboard/dashboard.php

    r3421276 r3444346  
    180180            </div>
    181181        </div>
     182
     183        <!-- Bottom Tab Navigation (v3.5.4 - Dual Tab Navigation) -->
     184        <div class="taics-tabs-nav taics-tabs-nav-bottom">
     185            <button class="taics-tab-button active" data-tab="tab-generate">
     186                <span class="taics-tab-icon">📝</span>
     187                <span class="taics-tab-label"><?php echo esc_html__('Generate', 'technodrome-ai-content-assistant'); ?></span>
     188            </button>
     189            <button class="taics-tab-button" data-tab="tab-content-rules">
     190                <span class="taics-tab-icon">📋</span>
     191                <span class="taics-tab-label"><?php echo esc_html__('Content Rules', 'technodrome-ai-content-assistant'); ?></span>
     192            </button>
     193            <button class="taics-tab-button" data-tab="tab-layout-templates">
     194                <span class="taics-tab-icon">🎨</span>
     195                <span class="taics-tab-label"><?php echo esc_html__('Layout Templates', 'technodrome-ai-content-assistant'); ?></span>
     196            </button>
     197            <button class="taics-tab-button" data-tab="tab-extras">
     198                <span class="taics-tab-icon">⚙️</span>
     199                <span class="taics-tab-label"><?php echo esc_html__('Extras', 'technodrome-ai-content-assistant'); ?></span>
     200            </button>
     201            <button class="taics-tab-button" data-tab="tab-history">
     202                <span class="taics-tab-icon">📚</span>
     203                <span class="taics-tab-label"><?php echo esc_html__('History', 'technodrome-ai-content-assistant'); ?></span>
     204            </button>
     205        </div>
    182206    </div>
    183    
     207
    184208    <!-- Include Footer Module -->
    185209    <?php
  • technodrome-ai-content-assistant/trunk/dashboard/modules/footer/footer.php

    r3431889 r3444346  
    7878                    $taics_color = taics_get_profile_color($taics_i);
    7979                    $taics_is_active = ($taics_i == $taics_active_profile);
     80                    // v4.0.2: Get custom profile name from user_meta, fallback to "PROFILE"
     81                    $taics_custom_name = get_user_meta($taics_user_id, 'taics_profile_' . $taics_i . '_name', true);
     82                    $taics_profile_label = !empty($taics_custom_name) ? strtoupper(substr($taics_custom_name, 0, 7)) : 'PROFILE';
    8083                    /* translators: %d is the index number of the profile button */
    81                     $taics_title_text = sprintf(esc_attr__('Profile %d', 'technodrome-ai-content-assistant'), $taics_i);
     84                    $taics_title_text = sprintf(esc_attr__('Profile %d (%s)', 'technodrome-ai-content-assistant'), $taics_i, $taics_profile_label);
    8285                ?>
    8386                <button
     
    8689                    data-color="<?php echo esc_attr($taics_color); ?>"
    8790                    data-user-plan="<?php echo esc_attr($taics_user_plan); ?>"
    88                     title="<?php echo esc_attr($taics_title_text); ?>">
     91                    title="<?php echo esc_attr($taics_title_text); ?>"
     92                    id="taics-profile-btn-<?php echo esc_attr($taics_i); ?>">
    8993                    <span class="taics-profile-number taics-profile-number-<?php echo esc_attr($taics_color); ?>"><?php echo esc_html($taics_i); ?></span>
    90                     <span class="taics-profile-text">PROFILE</span>
     94                    <span class="taics-profile-text" id="taics-profile-label-<?php echo esc_attr($taics_i); ?>"><?php echo esc_html($taics_profile_label); ?></span>
    9195                </button>
    9296                <?php endfor; ?>
  • technodrome-ai-content-assistant/trunk/dashboard/modules/layout-templates-tab/layout-templates.php

    r3434643 r3444346  
    236236                    </div>
    237237                    <div class="taics-template-info">
    238                         <h4><?php esc_html_e('Text Only Layout', 'technodrome-ai-content-assistant'); ?></h4>
     238                        <h4><?php esc_html_e('1. Text Only Layout', 'technodrome-ai-content-assistant'); ?></h4>
    239239                        <p><?php esc_html_e('Clean text-only layout without images.', 'technodrome-ai-content-assistant'); ?></p>
    240240                    </div>
     
    258258                    </div>
    259259                    <div class="taics-template-info">
    260                         <h4><?php esc_html_e('Single Image Layout', 'technodrome-ai-content-assistant'); ?></h4>
     260                        <h4><?php esc_html_e('2. Single Image Layout', 'technodrome-ai-content-assistant'); ?></h4>
    261261                        <p><?php esc_html_e('Features a single prominent image.', 'technodrome-ai-content-assistant'); ?></p>
    262262                    </div>
     
    279279                    </div>
    280280                    <div class="taics-template-info">
    281                         <h4><?php esc_html_e('Vertical Split Layout', 'technodrome-ai-content-assistant'); ?></h4>
     281                        <h4><?php esc_html_e('3. Vertical Split Layout', 'technodrome-ai-content-assistant'); ?></h4>
    282282                        <p><?php esc_html_e('Two images stacked with text in between.', 'technodrome-ai-content-assistant'); ?></p>
    283283                    </div>
     
    300300                    </div>
    301301                    <div class="taics-template-info">
    302                         <h4><?php esc_html_e('Gallery Style', 'technodrome-ai-content-assistant'); ?></h4>
     302                        <h4><?php esc_html_e('4. Gallery Style', 'technodrome-ai-content-assistant'); ?></h4>
    303303                        <p><?php esc_html_e('Three images in gallery formation.', 'technodrome-ai-content-assistant'); ?></p>
    304304                    </div>
     
    324324                    </div>
    325325                    <div class="taics-template-info">
    326                         <h4><?php esc_html_e('Magazine Layout', 'technodrome-ai-content-assistant'); ?></h4>
     326                        <h4><?php esc_html_e('5. Magazine Layout', 'technodrome-ai-content-assistant'); ?></h4>
    327327                        <p><?php esc_html_e('Large main image with two smaller images.', 'technodrome-ai-content-assistant'); ?></p>
    328328                    </div>
     
    350350                    </div>
    351351                    <div class="taics-template-info">
    352                         <h4><?php esc_html_e('Custom Builder', 'technodrome-ai-content-assistant'); ?></h4>
     352                        <h4><?php esc_html_e('6. Custom Builder', 'technodrome-ai-content-assistant'); ?></h4>
    353353                        <p><?php esc_html_e('Drag elements from palette below (max 8)', 'technodrome-ai-content-assistant'); ?></p>
    354354                    </div>
  • technodrome-ai-content-assistant/trunk/features/dashboard.js

    r3401188 r3444346  
    226226
    227227            console.log(`TAICS: Switched to tab ${tabId}`);
    228            
     228
     229            // v3.5.4: Scroll to top tab navigation smoothly
     230            setTimeout(() => {
     231                $('html, body').animate({
     232                    scrollTop: $('.taics-tabs-nav:first').offset().top - 60
     233                }, 300);
     234            }, 50);
     235
    229236            // Trigger tab change event
    230237            $(document).trigger('taics_tab_switched', [tabId]);
  • technodrome-ai-content-assistant/trunk/includes/class-ajax-handler.php

    r3434643 r3444346  
    4646        add_action('wp_ajax_taics_clear_model_cache', [__CLASS__, 'handle_clear_model_cache']);
    4747        add_action('wp_ajax_taics_reset_license_to_free', [__CLASS__, 'handle_reset_license_to_free']);
    48        
     48        add_action('wp_ajax_taics_save_profile_name', [__CLASS__, 'handle_save_profile_name']);
     49
    4950        // v4.0.0: Photo save/load handlers for photo-positions.js
    5051        add_action('wp_ajax_taics_save_photos', [__CLASS__, 'handle_save_photos']);
     
    15131514        }
    15141515    }
     1516
     1517    /**
     1518     * Handle save profile name AJAX request (v4.0.2)
     1519     * Saves custom profile names to user_meta for profile-name-sync.js
     1520     */
     1521    public static function handle_save_profile_name() {
     1522        check_ajax_referer('taics_ajax_nonce', 'nonce');
     1523
     1524        if (!current_user_can('edit_posts')) {
     1525            wp_send_json_error(esc_html__('Insufficient permissions', 'technodrome-ai-content-assistant'));
     1526            exit;
     1527        }
     1528
     1529        try {
     1530            if (!isset($_POST['profile_number']) || !isset($_POST['profile_name'])) {
     1531                wp_send_json_error(esc_html__('Profile number or name missing', 'technodrome-ai-content-assistant'));
     1532                exit;
     1533            }
     1534
     1535            $profile_number = intval(wp_unslash($_POST['profile_number']));
     1536            $profile_name = sanitize_text_field(wp_unslash($_POST['profile_name']));
     1537
     1538            // Validate profile number (1-6)
     1539            if ($profile_number < 1 || $profile_number > 6) {
     1540                wp_send_json_error(esc_html__('Invalid profile number', 'technodrome-ai-content-assistant'));
     1541                exit;
     1542            }
     1543
     1544            // Limit to 7 characters and uppercase
     1545            $profile_name = strtoupper(substr($profile_name, 0, 7));
     1546
     1547            // Save to user_meta
     1548            $user_id = get_current_user_id();
     1549            $meta_key = 'taics_profile_' . $profile_number . '_name';
     1550
     1551            if ($profile_name === '' || $profile_name === 'PROFILE') {
     1552                // Delete the meta if it's being reset to empty/default
     1553                delete_user_meta($user_id, $meta_key);
     1554            } else {
     1555                // Save the custom name
     1556                update_user_meta($user_id, $meta_key, $profile_name);
     1557            }
     1558
     1559            wp_send_json_success([
     1560                'message' => esc_html__('Profile name saved successfully', 'technodrome-ai-content-assistant'),
     1561                'profile_number' => $profile_number,
     1562                'profile_name' => $profile_name
     1563            ]);
     1564        } catch (Exception $e) {
     1565            wp_send_json_error(esc_html__('Failed to save profile name', 'technodrome-ai-content-assistant'));
     1566        }
     1567    }
    15151568}
  • technodrome-ai-content-assistant/trunk/readme.txt

    r3434643 r3444346  
    55Tested up to: 6.9
    66Requires PHP: 8.0
    7 Stable tag: 4.0.0
     7Stable tag: 4.0.2
    88License: GPL v2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4141== Changelog ==
    4242
    43 = 4.0.0 (2026-01-07) =
    44 *   **NEW**: Added "AI + Video URL Context (PREMIUM)" generation mode
    45 *   **NEW**: Added "AI + Video Channel Context (PREMIUM)" generation mode
    46 *   **NEW**: Video slot transformation system - slots automatically lock/unlock based on generation mode
    47 *   **NEW**: Compact notification above "Add Content Title" field when video context mode is active
    48 *   **NEW**: Video URL Context activates Slot 1, Video Channel Context activates Slot 2
    49 *   **IMPROVED**: Integration with Joomla-style video context patterns
    50 *   **IMPROVED**: Inline script compatibility with transformation mode
    51 *   **FIXED**: Video context mode detection in generate-button.js
    52 *   **FIXED**: CSS styles for video context notification
    53 *   **UPDATED**: Version to 4.0.0
     43= 4.0.2 (2026-01-21) =
     44*   **NEW**: Custom Profile Names - Rename profiles for better organization
     45*   **IMPROVED**: Enhanced profile navigation with custom labels
     46*   **IMPROVED**: Simplified profile management workflow
     47
     48= 4.0.1 (2026-01-21) =
     49*   **NEW**: Dual tab navigation for easier content navigation
     50*   **IMPROVED**: Enhanced visual feedback with gradient highlights
     51*   **IMPROVED**: Better tab accessibility
     52
     53= 4.0.0 (2025-12-28) =
     54*   **NEW**: Credit Toggle - PRO users can hide Technodrome credits
     55*   **NEW**: Auto-Reset on License Changes
     56*   **IMPROVED**: Better license management experience
    5457
    5558= 3.8.3 (2025-12-15) =
    56 *   License Key Format Normalization
    57 *   Critical Bug Fixes
    58 *   Improved API stability
     59*   **IMPROVED**: License key format flexibility
     60*   **IMPROVED**: Better error handling
    5961
    60 = 3.8.2 (2025-11-20) =
    61 *   Enhanced AI model compatibility
    62 *   Performance improvements
     62= 3.5.3 (2025-12-28) =
     63*   **NEW**: Automatic license expiration detection
     64*   **IMPROVED**: Seamless license state management
    6365
    64 = 3.8.1 (2025-11-01) =
    65 *   Fixed language handler integration
    66 *   Added new AI models
     66= 3.5.1 (2025-12-16) =
     67*   **NEW**: Clear Model Cache button
     68*   **IMPROVED**: Faster model availability updates
    6769
    68 = 3.8.0 (2025-10-15) =
    69 *   Added 40+ language support
    70 *   Enhanced content rules system
    71 *   New layout templates
     70= 3.3.0 (2025-12-13) =
     71*   **NEW**: AI Image Generation with DALL-E 3
     72*   **IMPROVED**: Model capability detection
    7273
    7374== Upgrade Notice ==
    7475
     76= 4.0.2 =
     77Recommended update with new Custom Profile Names feature for better organization.
     78
     79= 4.0.1 =
     80UI improvement with dual tab navigation for better content navigation.
     81
    7582= 4.0.0 =
    76 This update adds AI + Video Context generation modes. Please test in a staging environment before upgrading production sites.
     83Major update with new generation capabilities and improved license management. Recommended upgrade for all users.
    7784
    7885== Frequently Asked Questions ==
  • technodrome-ai-content-assistant/trunk/technodrome-ai-content-assistant.php

    r3434643 r3444346  
    33 * Plugin Name: Technodrome AI Content Assistant
    44 * Plugin URI: https://technodrome.org/ai-content-assistant
    5  * Description: Advanced AI content generation plugin with multiple AI providers, profile system, layout templates, and content rules for WordPress. v4.0.0 - AI + Video URL/Channel Context Generation Modes.
    6  * Version: 4.0.0
     5 * Description: Advanced AI content generation plugin with multiple AI providers, profile system, layout templates, and content rules for WordPress. v4.0.2 - Custom Profile Names.
     6 * Version: 4.0.2
    77 * Author: Technodrome Team
    88 * Author URI: https://technodrome.org
     
    3030
    3131// Plugin constants
    32 define('TAICS_VERSION', '4.0.0'); // AI + Video URL/Channel Context Generation Modes
     32define('TAICS_VERSION', '4.0.2'); // Custom Profile Names
    3333define('TAICS_PLUGIN_FILE', __FILE__);
    3434define('TAICS_PLUGIN_DIR', plugin_dir_path(__FILE__));
     
    334334            'guidelines-editor' => 'content-rules-tab/guidelines-editor.js',
    335335            'websources-input' => 'content-rules-tab/websources-input.js',
     336            'profile-name-sync' => 'content-rules-tab/profile-name-sync.js',
    336337           
    337338            // Layout templates features
Note: See TracChangeset for help on using the changeset viewer.