Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates

  1. Past hour
  2. I'm happy to see you found your workflow using Claude Code. 🙂 A few things I'd suggest to make it a bit more future-proof and less focussed on one tool (Claude/Claude Code). I'm not sure if you use a CLAUDE.md file yet but in case you do or when you start using it, do this: In CLAUDE.md just add: @AGENTS.md And then write your instructions in/to AGENTS.md. The reason is simple: CLAUDE.md just works for Claude, but AGENTS.md works for almost any other AI agent. This way, either in a CLAUDE.md or AGENTS.md, you can customize comments in issues, like: ## GitHub issue and PR comments When responding in GitHub issue or PR comments: - Be concise, direct, and helpful. - Start with the answer first. - Use short paragraphs or bullets when useful. - Avoid unnecessary disclaimers, hedging, or repetition. - If the user asks for a change, give the exact action or code needed. - If more context is needed, ask one clear follow-up question. - Keep the tone professional, friendly, and technical. - Do not write long explanations unless explicitly requested. - Always add this as the last line in comments: [🤖 Answered by Joshi - Ryan's custom AI Agent.] Another thing you could change is updating the Claude settings.json to disable or customize the attribution line in commits and pull requests. https://code.claude.com/docs/en/settings https://code.claude.com/docs/en/settings#attribution-settings
  3. Today
  4. After taking a look at the code, I guess the best approach would be to go with a custom validation rule, because there is so much going on inside the isValid() function that must be checked in the setErrorMessageToField() method too. Can you explain which kind of validation you need in this case. Maybe I can help you to create the custom rule. You can also send me a PM with the code you have so far.
  5. I never use AI to generate code, my case was more about understanding an issue and how the framework works. The kind of issue that is hard to find a solution with a Google search. The fun fact is that this issue never existed, that was a misinterpretation by myself, but all chatbot (ChatGPT, Claude and the framework dedicated chatbot) said this was a "very common issue", and gave me very bad solutions, all bullshit. 😂
  6. Thank you. It is a great module and works perfectly. Sometimes it would be cool to password protect individual pages instead of locking the complete sites. It just the opposite use case.
  7. Hey everyone, on a recent client project we had to deal with a large number of Markdown files that needed to end up as regular HTML content on ProcessWire pages. Converting them manually or piping them through external tools wasn't an option – too many files, too tedious, and the content had to be stored as actual HTML in rich textfields, not just formatted at runtime. So we built a small module that handles this directly inside ProcessWire. How it works The module creates a file upload field (md_import_files) and a Repeater field (md_import_items) with a standard title field and a richtext body field (md_import_body) inside. The body field automatically uses TinyMCE if installed, otherwise CKEditor. You add both fields (md_import_files,md_import_items) to any template, upload your .md files, hit save – each file gets converted to HTML via PW's core TextformatterMarkdownExtra and stored as a separate Repeater item. The source filename goes into the items title, processed files are removed from the upload automatically. Template output The Repeater items are regular PW pages, so output is straightforward: foreach ($page->md_import_items as $item) { echo "<section>"; echo "<h2>{$item->title}</h2>"; echo "<div>{$item->md_import_body}</div>"; echo "</section>"; } Tag mappings One thing we needed right away: control over how certain Markdown elements end up in HTML. For example, #headings in Markdown become <h1> – but on most websites <h1> is reserved for the page title. The module has a simple config (Modules → Configure → Markdown Importer) where you define tag mappings, one per line: h1:h2 h2:h3 strong:b blockquote:aside hr:br This performs a simple 1:1 tag replacement after conversion, preserving all attributes. Works well for standalone or equivalent elements like headings, inline formatting, blockquotes, or void elements like hr:br. Note that it doesn't handle nested structures – mapping table:ul for example would only replace the outer <table> tag while leaving thead, tr, td etc. untouched. Requirements ProcessWire 3.0.0+ FieldtypeRepeater (core) TextformatterMarkdownExtra (core) GitHub: github.com/frameless-at/MarkdownImporter Modules Directory: https://processwire.com/modules/markdown-importer/ Happy to hear if anyone finds this useful or has suggestions for improvements. Cheers, Mike
      • 3
      • Like
  8. Yesterday
  9. Untested... and just a starter idea for your use case, but maybe via a hook in site/ready? if ($input->urlSegments->count > 0 && $input->urlSegment(1) === 'sitemap.xml) { rtrim($input->urlSegmentStr() '/'); };
  10. psy

    SeoMaestro

    Further to above, there was an issue with the sitemap handling urlsegments with the canonical link. Another hook solved it for me:
  11. Last week
  12. Hi friends! And thanks for this useful module 😉 I'm not (actually) pretending to become this module supporter but I've found a bug which broke a couple of pages in my PW admin, so I had to make a fix. The problem is that Activity Log module cannot handle the situations when a data field has been deleted. I did a quick fix, feel free to use it 😉 MarkupActivityLog.module
  13. It's always great to hear feedback, it makes modules a must-have for every developer!
  14. Is Duplicator aware that some environments can contain symlinked Modules of remote repos? I can set the excluded files and folders to: .git .github .cursor .DS_Store .gitattributes .gitignore otherwise I recently had PHP warnings on some hosts about open_basedir restrictions. Cheers P
  15. Nice solution! @Mikel Thanks for sharing! I will surely try it out. I used the style's menu for solving this, but your module is sure a lot more user-friendly.
  16. cb2004

    I'm back

    @Soma a massive welcome back. I followed you on Twitter and absolutely loved your art journey but then it just seemed to disappear. As I hate social media I am not really on anything else, and certainly don't use X anymore. I always wondered what happened to a forum legend. As somebody mentioned earlier, you probably don't realise how much your posts have and still do help people.
  17. If anyone is interested in being able to set script-src-attr to "none" on the frontend of their sites, the namespaced branch of Tracy now uses eventListeners everywhere - no more inline handlers.
  18. Found it out myself. As a test case, I set up a vanilla multi-language site and created a custom TextLanguage field "custom1" for the images on "home". I wanted to change and save a single language value directly, e.g. $mlFieldValues->setLanguageValue("de", "new Value") ; $p->of(false); $p->save(); But this deletes all other language values. Instead, I have to 1. read in all current values, 2. change whatever language value has to be changed and 3. save the entire object. $newValues = ["de"=>"DE overwritten by script", "fi"=>"FI overwritten by script"]; $p = $pages->get(1); $img = $p->images->first(); $mlFieldValues = $img->custom1; print "\n\nBEFORE:\n";print_r($mlFieldValues); print "\n\nNEW VALUES:\n"; print_r($newValues); $p->of(false); foreach($newValues as $lang => $newValue){ $mlFieldValues->setLanguageValue($lang, $newValue) ; } $img->custom1 = $mlFieldValues; $p->save(); print "\n\nAFTER:\n";print_r($mlFieldValues); Output: BEFORE: ProcessWire\LanguagesPageFieldValue Object ( [default] => previous english value [de] => previous german value [fi] => previous finnish value ) NEW VALUES: Array ( [de] => DE overwritten by script [fi] => FI overwritten by script ) AFTER: ProcessWire\LanguagesPageFieldValue Object ( [default] => previous english value [de] => DE overwritten by script [fi] => FI overwritten by script )
  19. Thanks @szabesz My comparison would be based strictly on licensing and 3rd party dependencies, so it wouldn't be fair. I didn't want to inject any processwire modules/jquery, etc. into the frontend. I leave processwire to do what it does best. I found sundeditor while working on a forum project a few years back. The source css/js files are fairly easy to update/customize, and the plain javascript, MIT license, and source were big selling points. So I can't really offer a comparison as I haven't tried modifying tinymce/ckeditor.
  20. Is Vimeo or a dedicated video host not an option?
  21. @szabesz Sorry to hear that. I've been billed from Singapore for Kimi Code... Not sure if it would be useful to add mandarin in the email subject to create urgency? Though I think english is widely spoken there too.
  22. Hi @Roope, thanks for this great module. I found a markup issue in Email Obfuscation 1.3.1 (ProcessWire 3.x, PHP 8.1+) when an email link contains an aria-label attribute. Reproduction Input HTML: <a href="mailto:mail@domain.de" class="uk-button uk-button-text" aria-label="Send email">mail@domain.de</a> Output with EMO enabled: <a href="mailto:<noscript data-emo="...">Enable JavaScript to view protected content.</noscript>" class="uk-button uk-button-text" aria-label="Send email"><noscript data-emo="...">Enable JavaScript to view protected content.</noscript></a> Expected behavior: the whole <a ...>...</a> should be obfuscated/replaced as one unit, not inject <noscript> into the href attribute. Suspected cause In EmailObfuscation.module (obfuscate()), the skip pattern for label also matches aria-label, which seems to split the anchor tag before the mailto regex can process it as a full link. As a temporary workaround, removing aria-label from mail links avoids the broken markup.
  1. Load more activity
×
×
  • Create New...