Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


clsource last won the day on August 26 2020

clsource had the most liked content!

1 Follower

About clsource

  • Birthday 10/18/1989

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

8,032 profile views

clsource's Achievements

Sr. Member

Sr. Member (5/6)




Community Answers

  1. Thanks, although my approach to the manifest was just reading the json file after webpack ends processing the files. Then using the json create a new PHP file named templates/_mix.php that contains those values and helper functions. The module approach is fine too ๐Ÿ™‚
  2. I think PHP 7.4 is fine for now. I tested PHP 8 and PHPMyAdmin have issues running there. So I think is better to stick with the 7.x version until PHP8 is well tested. Maybe that would be a major version of ProcessWire since @Sephiroth pointed out module compatibility issues.
  3. I will go to the PW channel on libera ๐Ÿ™‚
  4. I loved Svelte too. For the routing part I mostly use Laravel and now ProcessWire (With the Inertia Module) with the https://inertiajs.com/ Inertia adapters. That simplify greatly the flow and you got the best of backend and frontend ๐Ÿ™‚
  5. Inertia Adapter ProcessWire Module Hello! Long time no see. I created this module so you can use Inertia.js (https://inertiajs.com/) with ProcessWire. Description Inertia allows you to create fully client-side rendered, single-page apps, without much of the complexity that comes with modern SPAs. It does this by leveraging existing server-side frameworks. Inertia isnโ€™t a framework, nor is it a replacement to your existing server-side or client-side frameworks. Rather, itโ€™s designed to work with them. Think of Inertia as glue that connects the two. Inertia comes with three official client-side adapters (React, Vue, and Svelte). This is an adapter for ProcessWire. Inertia replaces PHP views altogether by returning JavaScript components from controller actions. Those components can be built with your frontend framework of choice. Links - https://github.com/joyofpw/inertia - https://github.com/joyofpw/inertia-svelte-mix-pw - https://inertiajs.com/ Screenshots
  6. Thanks this is a nice improvement ๐Ÿ™‚ Now it's lazy loaded and the thumbnails are 200x200 px ๐Ÿ™‚
  7. https://processwire.com/api/ref/languages/get-default/ $wire->addHookBefore("Pages::saveReady", function(HookEvent $event) { $page = $event->arguments(0); if($page->template->name != 'mytemplate') return; if(count(wire("languages")) > 1) { $defaultLang = wire("languages")->getDefault(); $page->title->setLanguageValue($defaultLang, "New Value"); } else { $page->title = "New value"; } $event->arguments(0, $page); });
  8. May be this can work? https://processwire.com/api/ref/pages-type/save-ready/ $wire->addHookBefore("Pages::saveReady", function(HookEvent $event) { $page = $event->arguments(0); if($page->template->name != 'mytemplate') return; $defaultLang = wire("languages")->get("default"); $page->title->setLanguageValue($defaultLang, "New Value"); $event->arguments(0, $page); });
  9. $defaultLang = wire("languages")->get("default"); $page->title->setLanguageValue($defaultLang, "New Value");
  10. Maybe is your internet provider configuration. https://watchmysys.com/blog/2015/01/unitymedia-is-blocking-vpn-connections/ Please try using another Internet provider maybe using 4G. Or similar network. Thanks.
  11. check if you are using https ๐Ÿ™‚ https://aves.ninjas.cl/
  12. Hello, I finished this toy project. A simple API to show data for Chilean Birds. Used to flex my PW and React muscles, since a lot of time has passed since making something with those techs. Code: https://github.com/NinjasCL/chileanbirds-api Frontend (React): https://aves.ninjas.cl Backend (PW): https://aves.ninjas.cl/api Hope you like it ๐Ÿ™‚ Thanks.
  13. I didnยดt mean to say which approach is better. I think RockMigrations is a good tool. SolidWire is not a replacement of any migration strategy or tool. It's just an idea to ease the communication and prototyping between developers and other people. It's in the same area of https://plantuml.com/ Just a tool to improving an eagle view of the system. The JSON output is just an idea similar to https://doc.mapeditor.org/en/stable/manual/introduction/ Any other proper migration tool could use it to generate a proper output. But is not mandatory :).
  14. Ok I have been toying around with this lib https://mudgen.github.io/webscript/docs/ And make a somewhat implementation of SolidWire using Javascript. import builder from "webscript/src/webscript.js"; import createElement from "webscript/src/createObjectElement.js"; const { wire, templates, template, fields, field, pages, page } = builder( createElement ); const core = { fields: { textarea: field.class("FieldtypeTextarea"), }, }; const site = {}; site.fields = { body: core.fields.textarea.name("body"), about: core.fields.textarea.name("about").max(100), }; site.templates = { home: template .name("home") .root(true) .fields(site.fields.body.label("Content")(), site.fields.about()), }; site.pages = { home: page.title("Home").template(site.templates.home()), }; const render = (data) => Object.values(data).map((item) => item()); const solid = wire( templates(render(site.templates)), fields(render(site.fields)), pages(render(site.pages)) ); console.log(JSON.stringify(solid, null, 2)); executing that code brings this result in json { "tagName": "wire", "children": [ { "tagName": "templates", "children": [ { "tagName": "template", "children": [], "value": "", "__isElement": true, "name": "home", "root": true, "fields": [ { "tagName": "field", "children": [], "value": "", "__isElement": true, "class": "FieldtypeTextarea", "name": "body", "label": "Content" }, { "tagName": "field", "children": [], "value": "", "__isElement": true, "class": "FieldtypeTextarea", "name": "about", "max": 100 } ] } ], "value": "", "__isElement": true }, { "tagName": "fields", "children": [ { "tagName": "field", "children": [], "value": "", "__isElement": true, "class": "FieldtypeTextarea", "name": "body" }, { "tagName": "field", "children": [], "value": "", "__isElement": true, "class": "FieldtypeTextarea", "name": "about", "max": 100 } ], "value": "", "__isElement": true }, { "tagName": "pages", "children": [ { "tagName": "page", "children": [], "value": "", "__isElement": true, "title": "Home", "template": { "tagName": "template", "children": [], "value": "", "__isElement": true, "name": "home", "root": true, "fields": [ { "tagName": "field", "children": [], "value": "", "__isElement": true, "class": "FieldtypeTextarea", "name": "body", "label": "Content" }, { "tagName": "field", "children": [], "value": "", "__isElement": true, "class": "FieldtypeTextarea", "name": "about", "max": 100 } ] } } ], "value": "", "__isElement": true } ], "value": "", "__isElement": true } @bernhard maybe some JSON like that could be used in RockMigrations. So you have the best of both worlds. A simpler syntax and an output that could be used to define migrations using JSON ๐Ÿ™‚
  15. Althought Laragon is a great choice. You can also use Docker if you want ๐Ÿ™‚ Here I made a simple config for PW https://github.com/joyofpw/docker ๐Ÿ™‚
  • Create New...