Jump to content

maximus

Members
  • Posts

    112
  • Joined

  • Days Won

    30

Everything posted by maximus

  1. Hint (temporary solution), open Chrome browser or Safari, add keywords: Brave and Firefox to Allowed User-Agents (Bots Whitelist) section
  2. Quick question: you are use Firefox?
  3. Hi everyone, I’m excited to share a new module I’ve been working on: GrokImagine. It integrates the x.ai (Grok) API directly into the admin interface, allowing you to generate AI images on the fly for your Pageimage fields. Instead of leaving the CMS to generate assets, you can now do it right where you need them. Key Features: Progressive Loading: Unlike many AI modules that make you wait for the whole batch, this one loads images one-by-one as soon as they are ready. Batch & Variety: Generate up to 4 variations. The module intelligently tweaks prompts for batch requests to ensure you get different angles and compositions rather than duplicates. Aspect Ratio Control: Built-in selector for 16:9, 1:1, 9:16, and 4:3. Model/Resolution Settings: Support for both grok-imagine-image-pro and standard models, plus 1k/2k resolution toggles. Seamless Integration: Enable it only for specific image fields via the module settings. How it works: Enter your API Key from console.x.ai in the module config. Go to any page with an enabled image field. Type a prompt, hit "Generate," and watch the "skeletons" fill up with images. Click the ones you like (blue checkmark) and save the pageβ€”the module handles the WireHttp download and adds them to your field automatically. GitHub Repository: https://github.com/mxmsmnv/GrokImagine Installation: Download or clone into /site/modules/GrokImagine. Install via the Admin Modules dashboard. I’d love to hear your feedback or any suggestions for future features! πŸ€
  4. Export your ProcessWire site structure as comprehensive, AI-optimized documentation for ChatGPT, Claude, Copilot, and other AI coding assistants. What It Does Context automatically generates complete documentation of your ProcessWire site in formats specifically optimized for working with AI: πŸ“Š Site Structure Complete page hierarchy exported as JSON, TOON, and ASCII tree Shows all relationships, templates, URLs, and metadata Smart collapsing for large page lists πŸ“‹ Templates & Fields All template definitions with complete field configurations Field types, options, requirements, default values Special handling for Repeater, Matrix, Table fields πŸ“¦ Content Samples Real page examples exported for each template Shows actual data formats and field usage Helps AI understand your content patterns πŸ’Ύ Code Snippets Customized selector patterns for your site type Helper functions and utility code API implementation examples πŸ€– AI Prompts Ready-to-use project context file Template creation prompts Debugging assistance prompts Session continuity templates πŸ–₯️ CLI Commands Export from command line for AI agents Query templates, fields, and pages directly Perfect for Claude Code, Cursor, Windsurf integration Dual Format Export (The Game Changer!) Context exports in two formats simultaneously: JSON Format Standard format for development tools, APIs, and compatibility TOON Format (AI-Optimized) ✨ Token-Oriented Object Notation designed specifically for AI prompts: 30-60% fewer tokens than JSON Significantly reduces API costs Same data, more compact representation No external dependencies - pure PHP Real Savings Example For a typical ProcessWire site with 50 templates: structure.json (15,000 tokens) β†’ structure.toon (8,500 tokens) = 43% savings templates.json (8,000 tokens) β†’ templates.toon (4,000 tokens) = 50% savings samples/*.json (12,000 tokens) β†’ samples/*.toon (6,500 tokens) = 46% savings Cost Impact (Claude Sonnet pricing): JSON export: $0.105 per AI interaction TOON export: $0.057 per AI interaction Save ~$5/month if you use AI assistants 100 times/month Installation cd /site/modules/ git clone https://github.com/mxmsmnv/Context.git Then in admin: Modules β†’ Refresh β†’ Install Or download from ProcessWire Modules Directory Quick Start Web Interface Setup β†’ Modules β†’ Context β†’ Configure Choose your site type (Blog, E-commerce, Business, Catalog, Generic) βœ… Enable "Export TOON Format" (recommended for AI work!) Enable optional features: βœ… Export Content Samples βœ… Create Code Snippets βœ… Create AI Prompts βœ… Generate SKILL.md for AI Agents Click "Export Context for AI" Files appear in /site/assets/cache/context/ CLI Interface # Full export php index.php --context-export # Export TOON format only (fastest, smallest) php index.php --context-export --toon-only # Query specific data php index.php --context-query templates php index.php --context-query fields php index.php --context-query pages "template=product, limit=10" # Quick stats php index.php --context-stats # Help php index.php --context-help Perfect for AI coding agents like Claude Code, Cursor, and Windsurf! Generated Files /site/assets/cache/context/ β”œβ”€β”€ README.md # Complete documentation β”œβ”€β”€ SKILL.md # AI agent skill definition β”œβ”€β”€ structure.json / .toon # Page hierarchy β”œβ”€β”€ structure.txt # ASCII tree β”œβ”€β”€ templates.json / .toon # All templates & fields β”œβ”€β”€ templates.csv # Templates in CSV β”œβ”€β”€ tree.json / .toon # Combined structure β”œβ”€β”€ config.json / .toon # Site configuration β”œβ”€β”€ modules.json / .toon # Installed modules β”œβ”€β”€ classes.json / .toon # Custom Page classes β”‚ β”œβ”€β”€ samples/ # Real content examples β”‚ β”œβ”€β”€ product-samples.json β”‚ └── product-samples.toon # 46% smaller! β”‚ β”œβ”€β”€ snippets/ # Code patterns β”‚ β”œβ”€β”€ selectors.php # Customized for your site type β”‚ β”œβ”€β”€ helpers.php # Utility functions β”‚ └── api-examples.php # REST API examples β”‚ └── prompts/ # AI instructions β”œβ”€β”€ project-context.md # Complete project overview β”œβ”€β”€ create-template.md # Template creation guide β”œβ”€β”€ create-api.md # API creation guide β”œβ”€β”€ debug-issue.md # Debugging helper └── project-summary.md # Session continuity template Using with AI Assistants Web Interface Upload Upload TOON files to save tokens and costs: πŸ“Ž structure.toon πŸ“Ž templates.toon πŸ“Ž prompts/project-context.md Then ask your AI assistant: "Help me create a blog post template with title, body, author, categories, and featured image. Follow the existing patterns from templates.toon" AI Coding Agents (Claude Code, Cursor, Windsurf) 1. Tell your agent to read the docs: Read /site/modules/Context/AGENTS.md 2. Agent can now export context: php index.php --context-export --toon-only 3. Agent queries specific data: php index.php --context-query templates 4. Agent reads exported files: Read SKILL.md, then structure.toon and templates.toon The AI has complete context of your site and can generate code that follows your exact patterns! Site Type Customization Code snippets automatically adapt to your site type: Blog / News / Magazine Post listings, author archives, category filtering Recent posts, popular content, related articles E-commerce / Online Store Product listings, cart logic, order processing Inventory management, payment integration Business / Portfolio / Agency Service pages, team members, case studies Testimonials, project galleries Catalog / Directory / Listings Brand hierarchies, category filters Advanced search, sorting, pagination Generic / Mixed Content General purpose patterns for any site type Features Overview Always Exported (Core) βœ… Complete page tree structure βœ… All templates with field definitions βœ… Site configuration and settings βœ… Installed modules list βœ… Custom Page classes βœ… README with complete documentation βœ… SKILL.md for AI agents Optional (Configurable) βš™οΈ Content samples (1-10 per template) βš™οΈ API JSON schemas βš™οΈ URL routing structure βš™οΈ Performance metrics βš™οΈ Code snippets library βš™οΈ AI prompt templates βš™οΈ Field definitions metadata Advanced Settings Auto-update on template/field changes Custom export path (supports absolute paths) Maximum tree depth (3-20 levels) JSON children limit (prevent huge files) Compact mode for large lists Custom AI instructions CSS framework detection (or manual override) Why TOON Format? TOON is specifically designed for AI prompts. Here's the difference: JSON (verbose): { "products": [ {"id": 1, "title": "Dark Chocolate", "price": 12.99}, {"id": 2, "title": "Milk Chocolate", "price": 9.99} ] } TOON (compact): products[2]{id,title,price}: 1,Dark Chocolate,12.99 2,Milk Chocolate,9.99 Same data, 50% fewer tokens! Use Cases πŸ€– AI-Assisted Development Upload your site context to Claude/ChatGPT and get code that follows your exact patterns πŸ€– AI Coding Agents Claude Code, Cursor, Windsurf can export and query your site via CLI πŸ“š Developer Onboarding New team members get complete site documentation instantly πŸ”„ Site Migration Export complete site structure for documentation or migration planning πŸ“– Code Standards Maintain consistency across your team with AI that knows your patterns πŸ’° Cost Optimization Reduce AI API costs by 30-60% with TOON format πŸ” Session Continuity Maintain context between AI coding sessions with project-summary.md API Variable In your ProcessWire code: // Get Context module instance $context = wire('context'); // Programmatic export $context->executeExport(); // Get export path $path = $context->getContextPath(); Links GitHub: https://github.com/mxmsmnv/Context TOON Format Spec: https://toonformat.dev Screenshots Example Workflow Export your site Click one button or run php index.php --context-export Upload to AI Upload .toon files to Claude/ChatGPT for maximum efficiency Build features faster AI knows your exact site structure, templates, and patterns Save money Use 30-60% fewer tokens on every AI interaction Perfect for ProcessWire developers who use AI coding assistants! The TOON format support makes it significantly more cost-effective to work with Claude, ChatGPT, and similar tools. Now with CLI support for seamless AI agent integration! Questions? Suggestions? Let me know! πŸš€
  5. https://github.com/mxmsmnv/Context/commit/1d94aaaf87869b869aff5ec9f7d1f1dea5872437 Adding support .toon files @Peter Knight you may try
  6. I don’t know how it will work in real work, as I never use AI assistants, as I prefer more flexible control, but I made a module with AI for AI. https://github.com/mxmsmnv/Context If there is an opportunity to test and give feedback, I will be glad!
  7. i use claude web with 20$ plan and create step-by-step templates and use my file for building backend and frontend and make copy-paste to Nova App. when i exceeded session/daily limit, i open another free claude account for continue or use another platforms.
  8. Hello, Peter. Thanks for the updates β€” it's clear that you're moving fast and in the right direction. Lots of screenshots, lots of details, it already looks solid. Good luck with the improvements. Take your time, but also don't delay β€” the potential of the thing is good.
  9. maximus

    AiWire

    Yeah, yours feels more like an admin-focused tool for one-shot operations, while mine went in a slightly different direction. Same tree trunk, just one has deeper roots and the other has wilder branches πŸ˜„ Honestly, it all started because they gave me $50 in credits for Claude Opus 4.6 and I wanted to test what it could actually build. My very first prompt to it was roughly: β€œCreate a plugin that connects AI to a ProcessWire website, something like the TeleWire you made for Telegram. Use the standard approach, add support for Anthropic, xAI, OpenAI, OpenRouter β€” so you can add multiple API keys and it clearly shows whether each one is working or not.” …and then, well β€” Β«And then Ostap was offΒ» πŸ˜‚ (That famous line from Ilf & Petrov’s The Twelve Chairs when Ostap Bender gets carried away and can’t stop spinning taller and taller tales.) From that one simple request it just snowballed into the full AiWire module you see now.
  10. maximus

    AiWire

    Hi everyone! I've built AiWire β€” a module that connects ProcessWire to AI providers (Anthropic, OpenAI, Google, xAI, OpenRouter). GitHub: https://github.com/mxmsmnv/AiWire What it does $ai = $modules->get('AiWire'); // Simple call echo $ai->chat('What is ProcessWire?'); // Generate multiple fields at once $ai->generate($page, [ ['field' => 'ai_overview', 'prompt' => "Write overview..."], ['field' => 'ai_seo_meta', 'prompt' => "Generate meta..."], ], ['cache' => 'W']); // Auto-fallback if provider fails $result = $ai->askWithFallback('Translate this...', [ 'provider' => 'anthropic', 'fallbackProviders' => ['openai', 'google'], ]); Main features Multiple API keys per provider with auto-failover Connection testing from admin Interactive Test Chat with parameter controls File cache with TTL (day/week/month/year) Save AI responses to page fields Multi-turn conversations Full docs with 25 real-world examples Requirements PHP 8.1+, ProcessWire 3.0.210+, cURL, and at least one API key. If you try it out, I'd love to hear your feedback β€” whether the API makes sense, if the docs are clear, or if you run into any issues. Thanks! πŸ™
  11. Today I updated the information about Processwire on the wiki. If you have anything to add, you know where to find the page. https://en.wikipedia.org/wiki/ProcessWire
  12. @adrian You're absolutely right, poor choice of words. I should have said "universally available and free" rather than "already installed". The point was about accessibility vs paid solutions, but I'll fix the wording. Thanks! @Gideon So πŸ˜„ Fair enough! Though getting them to install a free app is still easier than explaining monthly SMS fees to the client!
  13. Hi ProcessWire community! πŸ‘‹ I'm excited to share a new module I've been working on: TeleWire - a Telegram notifications module that brings instant messaging capabilities to your ProcessWire sites. The Problem with Current Notification Solutions After running several e-commerce sites and experimenting with different notification systems, I've encountered these recurring issues: πŸ“§ Email (SMTP/WireMail): Requires SMTP server configuration (WireMailSMTP) Google App Passwords setup complexity Emails constantly landing in spam folders Delayed delivery (sometimes 5-10 minutes) No guarantee the recipient will see it quickly πŸ“± SMS (Twilio, etc): Monthly fees just to keep a phone number active (~$1-15/month) Per-message charges (can add up quickly) US compliance requirements (verification, regulations) Not everyone wants to share their phone number πŸ’¬ WhatsApp Business API: Requires business verification Complex setup process API fees and restrictions Limited to business accounts πŸ”” Push services (Pushover, etc): Requires purchasing apps ($5-10 per platform) Recipient needs to install and configure the app Additional barrier to entry Why Telegram? πŸ†“ Completely free - No monthly fees, no per-message charges, no app purchases 🌍 Widely available - Free to download on any platform, 900+ million users worldwide ⚑ Instant delivery - Messages arrive in 1-2 seconds, not minutes 🎯 Low barrier to entry - Just "install the free app and start a chat with the bot" vs "pay $5" or "give me your phone number" πŸ”’ Reliable - No spam filters, no deliverability issues, no carrier restrictions πŸ“± Multi-platform - iOS, Android, Web, Desktop - works everywhere 🎨 Rich features - HTML formatting, emojis, photos, documents, links Key Features πŸš€ Send text notifications with HTML/Markdown formatting πŸ“Έ Send photos and documents πŸ‘₯ Support for multiple recipients (users and groups) πŸ”§ Simple admin interface with test button πŸ“Š Optional logging and debug mode ⚑ Optimized performance with configurable timeouts 🎯 Easy to integrate with hooks Real-World Use Cases E-commerce order notifications: $wire->addHookAfter('FormBuilderProcessor::processInputDone', function($event) { $form = $event->object; if($form->name === 'order-form') { $telewire = $this->modules->get('TeleWire'); $message = 'πŸ›’ <b>New Order</b>' . "\n\n"; $message .= 'πŸ‘€ Customer: ' . $form->get('customer_name')->value . "\n"; $message .= 'πŸ’° Total: $' . $form->get('total')->value; $telewire->send($message); } }); Failed login attempts monitoring: $wire->addHookAfter('Session::loginFailed', function($event) { $telewire = $this->modules->get('TeleWire'); $name = $event->arguments(0); $message = '⚠️ <b>Failed Login Attempt</b>' . "\n\n"; $message .= 'Username: ' . $name . "\n"; $message .= 'IP: ' . $this->session->getIP(); $telewire->send($message); }); Content updates: $wire->addHookAfter('Pages::saved', function($event) { $page = $event->arguments(0); if($page->template == 'article' && !$page->isNew()) { $telewire = $this->modules->get('TeleWire'); $message = 'πŸ“ <b>Article Updated</b>' . "\n"; $message .= 'Title: ' . $page->title . "\n"; $message .= 'By: ' . $this->user->name; $telewire->send($message); } }); Send photos with captions: $telewire = $modules->get('TeleWire'); // Product photo when new product added $telewire->sendPhoto( $page->images->first()->httpUrl, "New product: {$page->title} - \${$page->price}" ); Send documents (invoices, reports): $telewire = $modules->get('TeleWire'); // Send generated PDF invoice $telewire->sendDocument( '/site/assets/invoices/invoice-123.pdf', 'Invoice #123 for Order #456' ); Installation Get a bot token from @BotFather on Telegram (takes 30 seconds) Install the module from GitHub Configure your bot token and chat IDs Click "Send Test Message" to verify everything works Requirements: PHP 8.2+ and ProcessWire 3.0.210+ Admin Interface Features The configuration page includes: βœ… Real-time connection status indicator πŸ§ͺ One-click test message button (AJAX, no page reload) βš™οΈ Configurable parse mode (HTML/Markdown/MarkdownV2) πŸ“ Optional logging with debug mode for troubleshooting ⏱️ Adjustable API timeouts πŸ”‡ Silent mode option (no notification sound) πŸ“Š Message length handling (auto-split long messages) Production Ready This module is currently running on several production sites: 🍫 E-commerce shop - order notifications, stock alerts 🍷 Wine/liquor business - order confirmations, delivery updates πŸ“° News portal - content publishing notifications Average response time: ~150-300ms per notification Getting Your Chat ID Find @userinfobot in Telegram Send any message - it will reply with your Chat ID Important: Start conversation with your bot by sending /start Enter the Chat ID in module configuration For groups: Add the bot to your group, make it admin, and use the negative Chat ID API Documentation // Get module instance $telewire = $modules->get('TeleWire'); // Simple text message $telewire->send('Hello from ProcessWire!'); // HTML formatted message $message = '<b>Bold</b> <i>italic</i> <code>code</code>'; $telewire->send($message); // Send with custom options $telewire->send('Silent notification', [ 'disable_notification' => true, 'parse_mode' => 'Markdown' ]); // Send photo $telewire->sendPhoto('/path/to/photo.jpg', 'Optional caption'); // Send document $telewire->sendDocument('/path/to/file.pdf', 'Document caption'); Feedback Welcome! I'd love to hear your thoughts, use cases, and suggestions. If you've been frustrated with email deliverability or SMS costs for notifications, give this a try! GitHub: https://github.com/mxmsmnv/TeleWire Thanks to the ProcessWire community for the inspiration and all the great modules that helped me learn the PW module system!
  14. i use infomaniak.ch for couple projects
  15. Thank you @bernhard for sharing your modules and for your open source contribution to the ProcessWire community! When I was developing modules, I initially thought of each one as a potential source of income. But over time I realized that the real value lies in something greater than money β€” the support from users, their questions, the connections made, and the ability to contribute to this amazing community. That's what makes it truly worthwhile. Your decision to open source your modules is inspiring and will benefit many developers. Wishing you all the best! πŸ™
  16. I made a similar file a long time ago, which I upload to the server. Then I select the archive I need, and it download and unpacks it automatically. Important: you can prepare a ready-made archive with ready-made profiles (skeleton) to make it easier to get started. pw.php
  17. Hi everyone! πŸ‘‹ I'd like to share SquareImages - a simple module that creates perfect square images from any source format. Born from a real-world need: displaying vertical product images (like Coca-Cola bottles) uniformly in galleries and grids without distortion or awkward sizing. The Problem // Traditional methods don't work well for mixed aspect ratios: $image->width(300); // Too narrow for vertical images $image->height(300); // Too wide $image->size(300, 300); // Distorted The Solution // One simple method - smart cropping, perfect squares: $square = $image->square(300); Key Features 🎯 Smart Cropping - Automatically centers on longer dimension πŸ“¦ Format Preservation - Maintains original format (JPG/PNG/GIF) 🌐 WebP Support - Chain with ->webp() for compression ⚑ Performance - Fast URL generation πŸ’Ύ Automatic Caching - Built on PW's image engine Quick Example <div class="product-grid"> <?php foreach ($page->products as $product): ?> <?php $thumb = $product->photo->square(300); ?> <img src="<?= $thumb->url ?>" alt="<?= $product->title ?>"> <?php endforeach; ?> </div> Perfect uniform squares, regardless of source dimensions! API Methods $image->square(400); // Main method $image->squareWidth(500); // Based on width $image->squareHeight(600); // Based on height $image->getSquareURL(300); // Direct URL (faster) // WebP conversion $image->square(500)->webp(); // 25-65% smaller files Installation GitHub: https://github.com/mxmsmnv/SquareImages cd site/modules/ git clone https://github.com/mxmsmnv/SquareImages.git Or download ZIP and extract to /site/modules/SquareImages/ Then refresh modules in admin and install. Use Cases E-commerce product galleries Team member avatars Blog thumbnails Social media previews Instagram-style grids
      • 7
      • Like
      • Thanks
  18. wirewall periodically intercepts scanning of .env files, be safe
  19. It will be difficult to do all this even if you use AI to create what you need. First of all, you need to understand how it all works in ProcessWire and have skills in working with ProFields, Repeater, Repeater Matrix, Selector, and other basic modules. There is nothing complicated about it, but the time you spend creating a solution from scratch is better spent finding a ready-made solution and removing what you don't need. To understand how these systems work, I suggest you start by studying https://processwire.com/modules/site-invoices/
  20. if possible, can you fix underline for new theme?
  21. i try update to new version use Upgrades module and receive this message:
  22. I’d like to bring attention to a long-standing organizational issue that affects projects with many template files. As projects grow, the /site/templates/ directory becomes cluttered with dozens (or even hundreds) of PHP files, making it difficult to maintain and navigate. The Problem Currently, ProcessWire doesn’t natively support organizing template files into subdirectories. For example, if you want to organize templates like this: /site/templates/ β”œβ”€β”€ warehouse/ β”‚ β”œβ”€β”€ dashboard.php β”‚ β”œβ”€β”€ packing.php β”‚ └── packages.php β”œβ”€β”€ customer/ β”‚ β”œβ”€β”€ dashboard.php β”‚ └── packages.php └── sso/ β”œβ”€β”€ login.php └── callback.php You currently face several challenges: Alternate Template Filename field is unreliable - The admin interface often strips or resets the path when saving, especially if the file doesn’t exist at that exact moment No automatic discovery - You must manually configure each template’s file path Hooks don’t work as expected - Attempts to hook TemplateFile::getFilename or Template::getFilename don’t fire reliably Current Workarounds The existing workarounds are less than ideal: 1. Bridge files as suggested by @LostKobrakai // site/templates/warehouse-dashboard.php <?php namespace ProcessWire; include(__DIR__ . '/warehouse/dashboard.php'); This creates file duplication and maintenance overhead. 2. Manual Alternate Template Filename for each template: - Requires clicking through every template - Path validation often fails - No bulk operations Previous Discussions This has been requested multiple times over the years: Does PW support organizing Template files in sub Dirs? (2016) Template file in other folder than /site/template (2017) How do I organize a lot of templates? (2017) Proposed Solution I’ve opened a GitHub feature request with detailed suggestions: https://github.com/processwire/processwire-requests/issues/575 The core ideas: 1. Path persistence - The Alternate Template Filename field should reliably save paths like folder/filename.php 2. Automatic discovery - If a template named warehouse-dashboard isn’t found, check for /warehouse/dashboard.php 3. Template grouping in admin - Visual organization in Setup β†’ Templates based on folder structure Why This Matters Large projects - Sites with 50+ templates become unmanageable Team development - Clear organization helps multiple developers Module development - Modules could bundle template files cleanly Modern standards - Most frameworks support organized file structures Use Cases This would benefit: Multi-role applications (admin, customer, warehouse staff interfaces) Projects with many page types Module developers who want to bundle templates Anyone with SSO/OAuth files, API endpoints, or admin tools What Can You Do? If you’ve faced this issue or would like this feature: 1. πŸ‘ React to the GitHub issue 2. Share your use cases below 3. Suggest implementation approaches @ryan - Would love to hear your thoughts on this! Is this something that could be considered for a future release? Thanks for reading, and I hope this resonates with others who’ve felt this pain!
Γ—
Γ—
  • Create New...