Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/08/2020 in all areas

  1. My module is going through quite a bit of evolution, almost on a daily basis, as I build more sites with it. It will probably be ready sometime this summer, including documentation and a website. It's quite complex, but very thorough. I've built about 10 sites with it so far, with each site providing various insights and feature ideas that make it into the module.
    5 points
  2. I was surprised to discover recently that a datetime inputfield using the jQuery UI datepicker will accept any old nonsense that an editor might put into it, allowing the page to be saved and often converting the input into strange unwanted values without warning. More info: https://github.com/processwire/processwire-issues/issues/1138 I think the core should be validating the input, but in the meantime here is some code that will check the input against the configured format (date only - I haven't tried time settings) and alert the user if the value is invalid. In the case of invalid input the previous value is restored. In /site/ready.php: // Datetime fields: load Vex to use for invalid date alerts $wire->addHookAfter("InputfieldDatetime::renderReadyHook", function(HookEvent $event) { $this->wire('modules')->get('JqueryUI')->use('vex'); }); In custom admin JS (loaded however you like - I use AdminOnSteroids) // Validate datetime inputfields $(document).on('focus', '.InputfieldDatetime input', function() { $(this).data('prev-value', $(this).val()); }); $(document).on('blur', '.InputfieldDatetime input', function() { var format = $(this).data('dateformat'); try { $.datepicker.parseDate(format, $(this).val()); } catch(e) { $(this).val($(this).data('prev-value')); var example_date = $.datepicker.formatDate(format, new Date('23 Oct 2014')); vex.dialog.alert('The date you entered is not in the valid format. Example of format: ' + example_date); } }); Result:
    4 points
  3. EDIT: Demo version download here: Hello I've been looking for a way to give "editors" a little bit more freedom regarding the layout, without having to care about CSS, Fields, Templates etc. After playing with PageTable(-Extended) and Bootstrap, this is the (intermediate) result: http://theowp.bplaced.net/upload/prev.html It is just a proof of concept atm. Does anything like this already exist for PW?
    1 point
  4. Not sure I'd honestly recommend using a theme that hasn't been updated in 3 years. Unfortunately, as great as PW is, it's theme-ing system is not just a styling skin and I think this limitation makes it unwise to use non-core themes unless you are willing to miss out on new functionality.
    1 point
  5. Hi @teppo. Thanks for addressing this. I'll give it a test drive later today or tomorrow on a current project.
    1 point
  6. I am looking at the Github https://github.com/Mangavj/WireMangaTheme/blob/master/WireMangaTheme.module and I see only 1 argument but another module here https://github.com/oliuz/WireManga/blob/master/WireManga.module accepts 3 arguments so it seems there is a mix up, anyway I can hit you up so I can look at the source code. but yeah a form of programming knowledge is required.
    1 point
  7. Oups, too newbie with Trello... but it do what I wanted!
    1 point
  8. Probably due to some plug in they believe they need. My own client never signed up to HubSpot in the end.
    1 point
  9. Also exciting stuff here: Seems @Jonathan Lahijani might be brewing something really big!
    1 point
  10. Thanks! Got it! Put it here if someone needed. const ADDED_BOARD = ''; //put here the id as previously described by MoritzLost $this->pages->addHookAfter('publishReady', function(HookEvent $event) { $processor = $event->object; $page = $event->arguments('page'); if($page->template != 'content') return; $TrelloWire = wire('modules')->get('TrelloWire'); $TrelloWireApi = $TrelloWire->api(); $card = $TrelloWire->buildCardData($page); if ($card->id) { $TrelloWireApi->moveCard($card->id, ADDED_BOARD); $page->message($this->_('Moved Trello card to "Added" Board')); } }); Mel
    1 point
  11. @KrlosHere's a great blog post about it by @Michael van Laar https://digitalardor.com/articles/basic-setup-for-content-blocks-in-processwire/ I just very recently, during this week, upon processwireficying my, previously static but now dynamic, Bootstrap based basic personal portfolio site, implemented a homecoocked DIY "page builder" into it: jonatanronsholdt.dk. It equeally to what you want features different customized flexible layouts per portfolio item / post. ? As it's only made for my own use it's not made super "user friendly" (cause too lazy to do so when it's only myself who'll see it ofc) but hey, it's working! I think in general the whole idea of more support for flexible layouts is super interesting in terms of PW! Aka pagebuilders. Maybe a future amazing core module hmm?.. PWs own Gutenberg(WP) ? Or maybe it doesn't fit with the PW filosophy of not dictating any part of the frontend markup.... Well I'm just a noob so.. Haha. Would love to see a new philosophical discussion on this "generating dynamic / flexible modular blocks page content using non fixed templates /page builders with column features etc" subject hough maybe featuring some of the PW forum stars such as above @bernhard and all the other amazing PW gurus alike. (CSS tricks different CMSs content blocks article) But mine is built using the PageTable field type. Basically it'd just be more intuitive and prettier, read better ui friendliness for editor, using the payed Pro fields Repeater Matrix ? But same basic concept: Pagesfield: (Image, paragraph , Image, columns, image, image, columns end, paragraph) And each "block type" is actually just a page (the PW everything as a page philosophy) with a template which only simply generates the html for the block = <img ... /> <p>... </p> <img ... /> <row> <col><img ... /> <img ... /> </col></row> <p>... </p> I'd be more than happy to share my sloppy homebrew with you if it could be of any help. (or you know.. Use Michael's recipe). Though if you're any sort of experienced as a php développer you'll probably come up with something far more pretty than my noob code haha. All the best, Jonatan Ps if you go with pagefieldtype (though the profiled repeater matrix is probably way better for editor userfriendliness) I found this useful
    1 point
  12. Thanks for the links. I haven't looked into sockets in quite some time, but I do have an upcoming project to use this with. Thank you!
    1 point
  13. ,@neophron, I think this module and the service behind it has nothing to do with what was called "quality loss" in the above posts. It is a good method to compress your (final) png image variations to get smaller filesizes. But maybe nowadays you can use WebP format directly in PWs core, instead to stick with png output, and than having to invoke a remote service?
    1 point
  14. Recently I discovered this plugin: https://github.com/BlowbackDesign/TinyPNG I found it on this website: https://tinypng.com I don't know, what and how they are doing, but the size reductions is sometimes more then 50%.
    1 point
  15. @GhostRider, FieldsetPage support is now included with module version 0.20.0. I didn't have much to test with, but it did seem to work as expected on my limited use case — let me know if you run into any issues and I'll be happy to take a closer look ?
    1 point
  16. Hi @houseofdeadleg, Seems to be an issue on the APIs end with the "account_type" field. There's an open bug report: https://developers.facebook.com/support/bugs/1127960260870980/ I've updated the module to remove this field for the time being. If you update, it should work for you. Cheers, Chris
    1 point
  17. You need to know the ID of the list you want to move the card to. To get all lists of a board, you need to know the ID of that board first. In general, you can check the Trello API docs and perform the query you need using the TrelloWireApi class included in the module. Take note that all the API methods are defined on the TrelloWireApi class, not TrelloWire itself. So you need to use $TrelloWire->api()->moveCard()! For this particular case, the TrelloWireApi class has a helper method to retrieve both boards and lists associated with your account: // get the module and the api helper class $TrelloWire = wire('modules')->get('TrelloWire'); $TrelloWireApi = $TrelloWire->api(); // this will return an array of boards (with name and id) $boards = $TrelloWireApi->boards(); // alternatively, you can use the target board defined through the module configuration $boardId = $TrelloWire->TargetBoard; // this returns an array of lists on the board $lists = $TrelloWireApi->lists($boardId); Once of you have the array of lists, take note of it's ID, this is what you need to move a card to it. You can do this dynamically by searching through the array and search for the correct name or whatever, but I'd just dump the array of lists, grab the ID you need and put it in a constant somewhere ? This also saves an API call each time, and those actually have a noticable impact on performance because of network overhead. $targetId = 'some-id'; // get this ID from the lists() method above! $TrelloWireApi->moveCard($card->id, $targetId); Let me know if something isn't working for you!
    1 point
  18. Thanks a lot for your quick response. It works ?
    1 point
  19. Your code can't work because interpolation for double quoted strings allows only variables or some variable expressions (like methods calls or object property access), see the documentation on string parsing. foreach loops are language constructs and can't be used inside strings. For this to work, move your foreach loop outside the echo statement and only echo the actual HTML code. Then it should work: foreach($item->repeater_logos_links as $logo) { echo "<img src='{$logo->single_image->url}' alt='{$logo->single_image->description}' width='400'>"; }
    1 point
  20. Oh my... I loved Textpattern so much back in the days. I used to use it for everything and it was a joy. Then... as projects became larger and more complex I found ProcessWire. I migrated all my sites over and it was pretty easy - at least in my case. First of all I migrated all the templates for sections and articles over. Rebuild the logic like posts per pages, custom article views, listings and those things. It took a while because ProcessWire was still new to me then. But after that it was pretty easy. I created custom templates to create CSV exports of all my content (maybe a total of 300 pages and 10 sections). Afterwards I imported everything from my CSV files, put everything in place, created lots of redirects and done. The one thing that was quite work intensive... image migration. I did it for each and every site manually. Wouldn't be a problem today but at that time I wasn't that good in handling files. ? ProcessWire modules I used: https://modules.processwire.com/modules/process-jumplinks/ https://modules.processwire.com/modules/import-pages-csv/
    1 point
  21. Not me. It sounds like a recipe for headache, frankly speaking. It really depends on lots of things... You should tell us more about your current site. What does it do? How complex is it? How many templates do you have now? How dynamic is it - or needs to be in the future? (for visitors and editors) How much functionality is there currently in terms of users interacting with the site (register, login, user profiles, voting / commenting....) ? Is it really just a "brochure" site (mostly static content for frontend-users, but manageable by editors) ? Or really more like a web-application? A redesign is not the same as porting content from CMS A to CMS B. If the site architecture will most likely remain, then I'd talk to the client and persuade them to allow budget to transfer the entire site in one go from Textpattern to PW (using the same frontend markup). In the long run, this would probably be more efficient. Once everything is running in PW, you could then later discuss about a redesign.
    1 point
  22. The site of Jörg Hempel was built back in 2013/2014 the first time with ProcessWire, (version 2.3+ or 2.4). Then, over the years, individual areas were repeatedly rebuilt, equipped with new features, etc. Once, more than 50000 original images had to be exchanged and replaced by larger ones. I still remember that I wrote two days on the scripts, with which all original images were automatically exchanged via SFTP and all variants were recreated. At that time, a local computer ran three days and nights continuously in four parallel tasks. The exchange ran smoothly and without a single minute downtime of the live page. Today, the images (incl. variants) occupy over 130 GB disk space. :-) But due to the different version changes, PW 2.4, 2.5, 2.6, 2.7, 2.8(!), all none namespaced, to the namespaced 3.0+, a lot of unsightly solutions were created, e.g. to adapt unmaintained third party modules etc. In the front end were some old libraries in use, too. Therefore Jörg Hempel decided to rework all areas. (design, frontend and backend). Jörg developed the design together with the design agency Quandel Staudt Design from Frankfurt, Germany. The front end was built as a HTML click dummy by Benedikt Seifert from Jena, Germany. I was left with the wiring of front end and back end, as well as the redesign of all server-side processes. The new site now runs on PW 3.0.148 and PHP 7.4, using ProCache, AOS and my image helpers (Pia, PageimageManipulator2, CroppableImage3). All images use lazyload, and infinite scrolling was dropped, so we don't have to use the m.domain for mobiles any more. The extensive filtering possibilities of the archive and the blog from the old site have been preserved. Url segments are used for the filters.
    1 point
  23. @bernhard I know about that and drew a lot of inspiration from it in some ways, but in other ways it doesn't play by ProcessWire's rules. It also doesn't have dynamic content loading yet (although YooTheme is working on it). Also, it's using WordPress's "old" customizer which will ultimately be replaced with Gutenberg. Also, YooTheme comes in as a THEME, not a plugin, which is somewhat strange. What I showed you on our call a few months ago has gone through a big transformation and evolving. Still lots to do before I make a peep about it.
    1 point
  24. Interesting. It looks exactly as if it was drawn using yEd ( https://www.yworks.com/yed-live/ or installable version for Windows) Regarding the Page Builder, as @elabx said, there's nothing plug and play at the moment. See https://www.google.com/search?q=site%3Aprocesswire.com+page+builder
    1 point
  25. Hello @SeriousUser depending on the website needs, it seems like a reasonable structure. Having said that I would allow myself to suggest those HTML containing fields to be replaced with one/a combination of other fields which would give you more flexibility during a theme building and most important - eliminates issues with the markup. To my experience, the markup is always better to be added to the templates which would then call for the field content. BTW, I like the diagram visualization. What have you used to construct it?
    1 point
  26. This looks like a reasonable approach! There is currently nothing like those tools you mention. What I've seen works for a lot of ProcessWire developers is to use the Repeater Matrix module to create content. Take a look here: https://processwire.com/store/pro-fields/repeater-matrix/
    1 point
  27. A sneak preview of a new page builder concept that I'm close to completing. I'll write more about this in coming weeks, but this video demonstrates a lot of unique things going on:
    1 point
  28. Take your time. Maybe release it as a commercial profile/module in the future. I wouldn't mind to pay for it, at a reasonable price Cool! Swiss graphic design kind of invented the idea of a grid system ?
    1 point
  29. This looks very nice! I was working on a similar thing using the css grid specification with page table extended as a pagebuilder. But your approach is way superior because it supports inline editing, resize and better drag and drop (thought, this could still be improved, as it sometimes don't work as expected). I think this could be a very nice addition to PW, and something a would use a lot. Anyway it would be super awesome if you could release this as a module at some point! I would offer to adapt this for css grid, as I think that would be a nice option for some people and has more possibilities than bootstrap. Iam a frontend developer and designer so this might be out of my abilities, but I would try ?
    1 point
  30. Time for a little update. ? There are many changes again. Most visible: More Ajax, more Drag&Drop, more Wysiwyg. Real containers (Tree hierarchy) instead of "nested groups". Rows are also containers now. In this little video, I will show you how to layout a responsive page from scratch without writing a line of code. http://theowp.bplaced.net/upload/reptile.html This system is not for absolute noobs. You need to have an idea about how responsive web pages and Bootstrap work. But then one can be really fast I think. Still a long way to go, but I hope you like the idea. Thank you.
    1 point
  31. following this, very interested in a visual pagebuilder Good work guys!
    1 point
  32. You could use Repeater Matrix to accomplish this. Or you could take a look at this new module: There are also several site-profiles using frameworks like Bootstrap or Foundation out there...
    1 point
  33. Hi @theo, WOW. Surely will give it a try. Nice job. By the way, why not update the first post so that others can find the package easier?? Gideon
    1 point
  34. Hi @theo, Nice work. Glad to see some progress. Gideon
    1 point
  35. Hi theo, I was also thinking about how such a PageBuilder could be approached in the last days. No solution yet. I think the challenge is to make it reusable. And I guess it will be hard (impossible) do have a solution that works across multiple css frameworks. I'm thinking of building something like that for Uikit. I'm building all my sites based on it, so that would be a timesaver for me. ATM I have a Matrix-based setup. I've not tried PageTableExtended yet. But I'm also not convinced of the Matrix setup... So I would be happy to hear your thoughts and considerations on this topic.
    1 point
  36. The idea of PageTableExtented is brilliant itself. But your work takes a step further and makes Processwire even more attractive to non developers i.e. editors. In my humble opinion this function surely will take Processwire to the next level. Keep up the good work. I am eager to see how this concept inspires other awesome developers here we have In this wonderful community. Gideon
    1 point
  37. Hi @theo, This is really impressive. Any update on this project??? Gideon
    1 point
  38. @gmclelland You don't need my tool for this. You can do this with normal PageTables or probably Repeater Matrix. If you want to force the "editor" to choose between fixed 2 column or 3 column or whatever layout, then this is the wrong tool ("Full width" or not). This tool is about some freedom for the "editor". Thank you.
    1 point
  39. Today's update: More "wysiywig" for the backend Visual resizing. "Snap to grid". http://theowp.bplaced.net/upload/prev1.html Thank you.
    1 point
  40. Got it working. Here's my working code in case anybody is interesting (suggestions on improving it are welcome as I'm a ProcessWire newbie): $page_id = (int) $input->post->select_product; // page ID // Set a temporary upload folder where the files are stored during form processing // RC: precede temp dir with a period to ensure it remains non-web accessible //$upload_path = $config->paths->assets . "files/.temp/"; $upload_path = "/Applications/MAMP/htdocs/ProcessWire/site/assets/files/.temp/"; // RC: create temp path if it isn't there already if(!is_dir($upload_path)) { if(!wireMkdir($upload_path)) throw new WireException("No upload path"); } // show empty form if ($page_id) { $p = $pages->get($page_id); $template = $p->template->name; // this is the template where we will get the fields from // make a form $form = $modules->get('InputfieldForm'); $form->method = 'post'; $form->action = './'; $form->attr("id+name",'aanvraag-form'); // add the page's fields to the form $fields = $p->fieldgroup; foreach ($fields as $field) { $inputfield = $fields->{$field->name}->getInputfield($p); $form->append($inputfield); } // add template name field to the form $field = $modules->get("InputfieldHidden"); $field->attr('id', 'Inputfield_template_name'); $field->attr('name', 'template_name'); $field->value = $template; $form->append($field); // append the field // add select_product to the form $field = $modules->get("InputfieldHidden"); $field->attr('id', 'select_product'); $field->attr('name', 'select_product'); $field->value = $page_id; $form->append($field); // append the field // add a submit button to the form $submit = $modules->get('InputfieldSubmit'); $submit->name = 'save_new_aanvraag'; $submit->attr("value", "Go"); $form->append($submit); // only show the form if it was not just submitted/processed if (!$input->post->save_new_aanvraag) echo $form->render(); } // process the form if it was submitted if ($input->post->save_new_aanvraag) { // new wire upload $u = new WireUpload('images'); $u->setMaxFiles(2); $u->setMaxFileSize(200*1024); // tell it to rename rather than overwrite existing files $u->setOverwrite(false); $u->setDestinationPath($upload_path); $u->setValidExtensions(array('jpg', 'jpeg', 'gif', 'png')); // execute upload and check for errors $files = $u->execute(); if(!$u->getErrors()) { // now we assume the form has been submitted. // tell the form to process input from the post vars. $form->processInput($input->post); // validation $email = $form->get("email"); if ($email && (strpos($email->value,'@hotmail') !== FALSE)) { // attach an error and it will get displayed along the field $email->error("Sorry we don't accept hotmail addresses for now."); } // see if any errors occurred if (count( $form->getErrors() )) { // re-render the form, it will include the error messages echo $form->render(); } else { // successful form submission $np = new Page(); // create new page object $np->template = $form->get("template_name")->value; // set template $np->parent = $pages->get('/aanvraag/'); // set the parent $np->of(false); // turn off output formatting before setting values $np->save(); foreach ($np->fields as $f) { // do not sanitize or set Image and File fields here, because that will happen at the next step which will break if we do not skip images and files here if ($f->type == 'FieldtypeImage' || $f->type == 'FieldtypeFile') continue; echo $inputval = $form->get($f->name)->value; // sanitize fields if ($f->type == 'FieldtypePageTitle') { $sanitizer->text($inputval); // also set page name based on title $np->set('name', $sanitizer->pageName($inputval, true)); } if ($f->type == 'FieldtypeEmail') $sanitizer->email($inputval); if ($f->type == 'FieldtypeText') $sanitizer->text($inputval); if ($f->type == 'FieldtypeTextarea') $sanitizer->textarea($inputval); if ($f->type == 'FieldtypeInteger') $inputval = (int) $inputval; // attach fields to page $np->set($f->name, $inputval); } // add images upload foreach($files as $filename) { $np->images = $upload_path . $filename; } $np->save(); //create the page // remove all tmp files uploaded foreach($files as $filename) unlink($upload_path . $filename); echo "<p>Page saved.</p>"; } } else { // remove files foreach($files as $filename) unlink($upload_path . $filename); // get the errors foreach($u->getErrors() as $error) echo "<p class='error'>$error</p>"; } } else { //echo $form->render(); }
    0 points
×
×
  • Create New...