-
Posts
112 -
Joined
-
Days Won
30
Everything posted by maximus
-
Ok, I will try.
-
Hint (temporary solution), open Chrome browser or Safari, add keywords: Brave and Firefox to Allowed User-Agents (Bots Whitelist) section
-
Quick question: you are use Firefox?
-
-
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! π
-
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! π
- 24 replies
-
- 13
-
-
-
https://github.com/mxmsmnv/Context/commit/1d94aaaf87869b869aff5ec9f7d1f1dea5872437 Adding support .toon files @Peter Knight you may try
-
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!
-
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.
-
[WIP] Media Hub - the centralised hub for your PW media
maximus replied to Peter Knight's topic in Module/Plugin Development
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. -
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.
-
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! π
-
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
-
@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!
-
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!
-
i use infomaniak.ch for couple projects
-
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! π
-
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
-
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
-
-
-
-
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/
-
-
-
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!
- 1 reply
-
- 9
-