Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/06/2020 in all areas

  1. New version v2.1.0 is available on github. New features: Images in folders can now be uploaded and deleted from within the input. I am pretty excited about this feature. It gives you an image field that holds images independent of a page where images can be edited (upload/delete) and outputs PageImage objects in the frontend that can be cropped and resized. EDIT: forgot to mention that the module install 2 permissions imagereference-folder-upload and imagereference-folder-delte. Any non-superuser role needs those. Short preview edit-folder-images.mp4 Also now you can have the folder under either site/templates/ or site/assets/. The module will find it in both locations. If you have folders with same name in both locations, it will pick the one in site/templates/ The module is almost ready to go. One major thing, I need to fix, though, is getting it to work inside RepeaterMatrix fields. It is working fine inside normal repeaters. But eventually I will get there. Feel free to grab a copy and do some tests. Your feedback is much appreciated.
    5 points
  2. Hi everyone, While enjoying every day with ProcessWire - not building websites - but native apps and API. Just to say that I have a desire for a few months that is to teach you how to build an RestAPI and a cross-platform native application for iOS, MacOS, Android, Windows and maybe Linux in some weeks by coding in Delphi (Pascal) and using our awesome CMF ProcessWire as a backend. Why Delphi ? Embarcadero released a free edition of their IDE/Compiler (the FREE Delphi Community Edition) and everyone can enjoy building real native apps. It also give me now the opportunity to share this experience with you, as the license without the free edition was starting at ~1500$ for the Pro Edition. Also, Delphi is easy to learn, in particularly the FireMonkey frameworks which will be used to build those apps. At least I think ! When I personally begun to write code in Delphi, I had years of experience of the internal Windows API and C/C++ coding background. Still, it's just a desire, and i don't know if there are people interested by this - so let's vote !
    3 points
  3. Thanks for the update @flydev ?? but please don't forget about the notice caused by the undefined $zipFilename on this line: https://github.com/flydev-fr/Duplicator/blob/475318d2893e07ab225c89d738efd59d06277546/Duplicator.module#L44
    3 points
  4. I just pushed the new master version 1.3.13. You can upgrade the module through ProcessWireUpgrade.
    3 points
  5. It's not documented but you can use two curly braces to achieve de-emphasised text:
    3 points
  6. Today we have a new master version released, version 3.0.148! The last master version was 3.0.123, so there are 25 new versions worth of upgrades, fixes and optimizations in this new master version, relative to the previous. In this post we’ll take a closer look at what’s new, how to upgrade, and more— https://processwire.com/blog/posts/pw-3.0.148-master/
    2 points
  7. The RestAPI part in particular would be very interesting. I know there are some modules/site profiles already. But since you seem to do that quite frequently, you sure have some nice tips/concepts to share.
    2 points
  8. Want to save the col and row info in the db so i can use it for css grid in the frontend. This will allow the client to add content that spans the first row, has two on the send that goes across half the grid, has 4 on the third row and has 2 with a gap in the middle on the fourth.... basically given them power to making interesting layout with whitespace. Ideally your right I would have the grid power the input of the PW fields and hide the col and row inputs but this is what i have so far. admin.php $config->scripts->add($config->urls->templates . "admin.js"); $config->styles->add($config->urls->templates . "admin.css"); admin.cs .table-grid{ display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; } .grid-item{ /* border: 1px solid £; */ padding: 0.5em; } .activeGridName{ background: rgb(197, 219, 226) !important; } admin.js $(function(){ // custom grid script for pages with applicable table // name of input field var inputFieldName = "#wrap_Inputfield_featured_grid"; if($(inputFieldName)){ // table found var table = "<br><div class='table-grid-container'><label class='uk-form-label'>Frontend representation</label><div class='table-grid Inputfield'>"; // setup table var rows = $(inputFieldName+" .InputfieldContent table tbody tr"); // UI has 1 hidden row for (var i = 1; i < rows.length; i++) { var director = $(rows).eq(i).find(".InputfieldPageAutocomplete input.ui-autocomplete-input"); var tds = $(rows).eq(i).find("td"); var colStart = $(tds).eq(2).find('input'); var colStartValue = $(colStart).attr("value"); var rowStart = $(tds).eq(3).find('input'); var rowStartValue = $(rowStart).attr("value"); var colEnd = $(tds).eq(4).find('input'); var colEndValue = $(colEnd).attr("value"); var rowEnd = $(tds).eq(5).find('input'); var rowEndValue = $(rowEnd).attr("value"); var name = $(director).attr("value"); $(colStart).addClass('table-value-input') .attr('data-table-type','colStart') .attr('data-name-data',name); $(rowStart).addClass('table-value-input') .attr('data-table-type','rowStart') .attr('data-name-data',name); $(colEnd).addClass('table-value-input') .attr('data-table-type','colEnd') .attr('data-name-data',name) $(rowEnd).addClass('table-value-input') .attr('data-table-type','rowEnd') .attr('data-name-data',name) $(rows).eq(i).attr("data-name",name); // console.log(colStart + " - " + rowStart + " - " + colEnd + " - " + rowEnd); var styles = "grid-row-start: "+rowStartValue+"; grid-column-start: "+colStartValue+"; grid-row-end: "+rowEndValue+"; grid-column-end: "+colEndValue+";"; table += "<div class='grid-item Inputfield' style='"+styles+"' data-name='"+name+"'>"+name+"</div>"; } table += "</div></div>"; // add table to UI $(inputFieldName+" .InputfieldContent").append(table) // value changes and event listening $(document).on("change", "input.table-value-input", function(){ var name = $(this).attr("data-name-data"); var data = $(this).attr("value"); var type = $(this).attr('data-table-type'); console.log(data); console.log(type); console.log(name); switch (type) { case "colStart": $(".grid-item[data-name='"+name+"']").css("grid-column-start", data); break; case "rowStart": $(".grid-item[data-name='"+name+"']").css("grid-row-start", data); break; case "colEnd": $(".grid-item[data-name='"+name+"']").css("grid-column-end", data); break; case "rowEnd": $(".grid-item[data-name='"+name+"']").css("grid-row-end", data); break; default: break; } }); $(document).on("mouseover", "[data-name]", function(){ var data = $(this).attr("data-name"); $("[data-name='"+data+"']").addClass("activeGridName"); }); $(document).on("mouseout", "[data-name]", function(){ var data = $(this).attr("data-name"); $("[data-name='"+data+"']").removeClass("activeGridName"); }); } }); Main problem at the moment is it isn't very portable–you have to know the field name for it to work.
    2 points
  9. Ok, I'm getting there ? @flydev - there is still one more notice in 1.3.13 - line #44 should be: $this->log("Logging {$logName}\n"); $logName, rather than $zipFilename which isn't defined. Regarding the mysql gone away error, it seems that has been fixed by doing this: //DUP_Util::setMemoryLimit(self::DUP_PHP_MAX_MEMORY); //DUP_Util::setMaxExecutionTime(self::DUP_PHP_EXECUTION_TIME); set_time_limit(0); ini_set('memory_limit', '-1'); I know this is not ideal, but it's time to move on so will have to do for now.
    2 points
  10. strange, the link should lead you to the last post on page 14, which contains the update. Not sure why it points to the first page. Tricked myself, the up arrow links to the correct post. Duplicator-ATO1.3.13.zip
    2 points
  11. @adrian, if you use the duplicator.module 1.3.13 from this post, it should remove those issues: No idea regarding the mysql issues, I don't have that large databases.
    2 points
  12. You're right about the actions column — I pushed a release that hides the table sort arrows. Also, I added a readme section on how to set custom icons per shortcut: 'shortcuts' => [ 'Updates' => 1020, // Override title 'Updates' => [1020, 'gear'], // Override title + icon ], Support for IE is definitely not planned. I'm happy to take pull requests, though, if you find a way to pull it off ?
    2 points
  13. ProcessWire Dashboard Download You can find the latest release on Github. Documentation Check out the documentation to get started. This is where you'll find information about included panel types and configuration options. Custom Panels The goal was to make it simple to create custom panels. The easiest way to do that is to use the panel type template and have it render a file in your templates folder. This might be enough for 80% of all use cases. For anything more complex (FormBuilder submissions? Comments? Live chat?), you can add new panel types by creating modules that extend the DashboardPanel base class. Check out the documentation on custom panels or take a look at the HelloWorld panel to get started. I'm happy to merge any user-created modules into the main repo if they might be useful to more than a few people. Roadmap Panel types Google Analytics Draft At a glance / Page counter 404s Layout options Render multiple tabs per panel Chart panel load chart data from JS file (currently passed as PHP array)
    1 point
  14. That as well. I fixed that later on. Somehow I broke the entire setup at different parts now - beside the issue mentioned above - and plan a complete rebuild. But that's fine actually as it was more or less a playground.
    1 point
  15. As noted, this is also part of Pro Fields, and it's been around for quite some time. On second thought, maybe that's not ideal, considering all the other options you have. I don't know why you keep repeating this. Use an _init.php that you prepend everywhere. In that file, grab those global field values from that one specific page you've set up for just that reason, and you're set. You'll be able to use these vars from anywhere. You don't even need a physical template file for such a "settings" page, since you don't need a frontend view for that.
    1 point
  16. To keep you all in the mood...
    1 point
  17. Seemed (loosely) relevant: ... and since @wbmnfktr mentioned synthwave earlier, I have to throw a bunch of actual favourites in: Scandroid, Zombie Hyperdrive, and Carpenter Brut. All synthwave music, but each band has its unique approach or "theme". Synthwave in general is a great fit with programming ?
    1 point
  18. Heya! Just wanted to drop in to mention that this was a difficult one: I'm interested in this topic in general, but you kind of lost me at Delphi (Pascal). Although, that being said, the Embarcadero website makes their platform look interesting (and looking around a bit, I see folks advocating for it), so might still come around. Anyway, just wanted to clarify why I voted for "not really interested". Wish there was a "mildly interested" or "could be persuaded" option ?
    1 point
  19. @benbyf Thanks a lot for sharing! That makes sense. This should be possible with gridstack.js, as suggested by @szabesz If someone wanted to wrap this into a portable inputfield module, they could create an module which extend InputfieldTable class and add the logic there. ?
    1 point
  20. Thanks @Autofahrn ???? @adrian About the issue "MySQL server gone away". Its quite hard to determine from where come this issue - and just saying - I still not found the way to track down this issue. FYI I also got this issue on a new MariaDB server on Windows (a boosted server where the PW setup contain more than 1.5 millions pages), and also sometime on my local MAMP setup. (The issue does not concern only Duplicator). I remember also two weeks ago, I got this issue on a shared server (another setup with about 260k pages). ATM the only two hints which come to my mind is that the issue mostly appear when using the API - which can lead us to another hint: a server memory issue Thing to test: Disabled TracyDebugger Other thing to check: I mostly work with InnoDB databases and I remember that adjusting some MariaDB parameters helped. Parameters to check : max_allowed_packet innodb_log_file_size innodb_buffer_pool_size innodb_log_buffer_size PS: To adjust the settings, check this reply : What say the MySQL devs : Let me know - thanks guys ??
    1 point
  21. That's a quite short time, timeout should be 120 resp. 600 seconds from what I see in the code. The backup is effectively performed using a regular WireDatabaseBackup. Could this be a security issue with cron running from a different user? Sorry, no real idea.
    1 point
  22. Thanks @Autofahrn - that new version does fix those notices. Unfortunately I am getting MySQL gone away errors again when running via cronjob. I don't expect that is to do with the new version, but rather that it's a bit random and the tests after I changed the max_allowed_packet setting didn't actually fix it. The weird thing is that the error is being triggerd ~6 seconds into the duplicator process so it's not a timeout issue.
    1 point
  23. Thanks @Autofahrn but that is the version I am using. Sorry, I take that back - I am using 1.3.12. Where do I find 1.3.13?
    1 point
  24. @flydev - sorry, just noticed something new. Even those the Duplicate Process module page shows a valid package created from the cronjob, I am seeing these logged notices that suggest the package was not built correctly. Any ideas?
    1 point
  25. @flydev - a couple of bugs and questions for you. Firstly, I am getting these notices with the current dev branch: Would be great if those could be cleaned up please. The other question is a weird one. With both the master and dev versions I have been getting "mysql gone away errors" lately on one site/server, but only from the cronjob (run from the system cron). If I do a Backup Now from the Duplicator Process module page it works fine. So it seems like there is some strange difference when run via CLI with the cronjob. The database size recently went over 128MB which is the size of my max_allowed_packet setting. I bumped it up and now it works from the command without the error. The weird thing though is that I have another server which has been working fine with a max_allowed_packet of 16M and the database is over 250MB. Both servers are Digital Ocean VPS. The one with the errors is running the latest version of Debian and the one without errors is on UBUNTU. The Debian server shows: Ver 15.1 Distrib 10.3.18-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 while the UBUNTU one shows: Ver 14.14 Distrib 5.7.28, for Linux (x86_64) using EditLine wrapper So I am wondering if it's a MariaDB vs MySQL issue, or the version difference or something else. Anyway, wondering if you (or anyone else) might have come across this recently. Thanks!
    1 point
  26. I am totally fine with paying money for that extra functionality. PW has so many great features already in the core. And I am happy to support Ryan with a ProFields subscription. Looking at how many great tools you get in that bundle, the price is more than fair.
    1 point
  27. https://processwire.com/blog/posts/pw-3.0.133/#new-page-gt-meta-method <-- the new kid on the block
    1 point
  28. Exactly. That's the preferred "PW way" to do such stuff. It may seem weird at first glance, but once you realize that in PW everything is a page (not just what you render as "page" in the frontend), you can do all kinds of stuff. Think of a PW-page as basically a container than can contain any kind of content, and can be cross-referenced and queried. Don't have time right now to point you to docs/more tutorials, sorry. I always create a dummy template "empty" (naming is up to you; it doesn't need a physical .php file, because it doesn't need to be viewable in the frontend) just for this reason: it has only a title field and nothing else. And you can re-use it as many times as you need, without creating more templates than needed. Just create a new parent page as container for every new category / attribute or whatever you're using it for, so you can reference it in your page reference selector. And with setups like that, if you rename a category, you don't have to update all instances manually (avoid redundancy etc.etc.)
    1 point
  29. OH MY GOODNESS !! This thing is a beauty !!! Well done sir.
    1 point
  30. Hey @Robin S, I thought this module was handy so I modified the AddImageUrls module and adapted it to work for file fields. I attached the new "AddFileUrls" module. Feel free to upload it to your github or publish these to the module directory. It seems to work well in my testing. Hope that helps AddFileUrls.zip
    1 point
  31. OK. It was time to update the wiki ? I've uploaded a new DataSet version (0.9.5) to GitHub. It contains many improvements for data type conversions, page reference handling and several bug fixes. It also has a new profiler to optimize the import routines. Tasker is also updated.
    1 point
  32. I've uploaded a new version (0.9.5) to GitHub. It tries to handle DB connection loss errors and it has a basic profiler to optimize your import routines. See the wiki for more details. Note: TaskerAdmin needs some fixes in its JS-based task executor. Don't use this feature atm. (Cron is always the preferred task execution method.)
    1 point
  33. New v2.0.0 is out on github. I renamed the module to ImageReference (as suggested by @bernhard) to avoid the naming conflict with @theo's module ImagePicker. Version was bumped to 2.0.0 because it introduces breaking changes due to renaming. So if you have an older version installed, you need to first uninstall it and then install v2.0.0. Sorry for the inconvenience. The new version also adds a new option. You can now choose images from any page on your site (similar behavior to choosing images when inserting into CKEditor). Please give it a try and let me know if you run into any problems. After some more revision, I will add this fieldtype to the modules directory. I would like to thank everybody who contributed their ideas to this module and wish everyone a good transition into the new year.
    1 point
  34. Hey folks! I've been a bit quiet here, but that's mostly because I've been busy building stuff with ProcessWire and Wireframe ? Just wanted to give a quick heads-up for a new feature called components that I'm currently testing (it's in the dev branch of the module already), in case anyone wants to comment on it before it gets merged to the master branch. Wireframe components are classes extending an abstract base class (\Wireframe\Component), and they can either render output directly by implementing the render() method, or they can be rendered using a separate Component View file. This is probably a familiar concept to most, but the general idea is that while partials ("dumb" files with no way to process params, and no clean way to separate code from markup) are enough if you just have some relatively static snippet that you need repeatedly, components add an extra layer where you can a) specify which params they accept, b) process those params, and c) include any additional "business logic" that should be triggered when the component is rendered. Here's a simplified example of how this comes together: /site/templates/components/Card.php (class for the Card component) <?php namespace Wireframe\Component; /** * Card component */ class Card extends \Wireframe\Component { /** * Constructor method * * @param \ProcessWire\Page $item Page related to current Card. */ public function __construct(\ProcessWire\Page $item) { // Pass properties to view $this->title = $item->title; $this->summary = $item->summary; $this->image = $item->get('image|hero_image'); } } /site/templates/components/Card/default.php (default view for the Card component) <?php namespace ProcessWire; ?> <div class="card"> <?php if ($image): ?> <img src="<?= $image->size(640, 480)->url ?>" alt="<?= $image->description ?>"> <?php endif; ?> <h3><?= $title ?></h3> <?php if ($summary): ?> <p><?= $summary ?></p> <?php endif; ?> </div> ... and for fetching and rendering the component, there's a little static helper in the Wireframe module class: <?php foreach ($cards as item): ?> <?= Wireframe::component('Card', [$item]) ?> <?php endforeach; ?> Note that Wireframe::component() actually returns an instance of the component class, not a string, but since \Wireframe\Component::__toString() calls \Wireframe\Component::render(), what we're doing here is essentially the same as echoing out the result of (new \Wireframe\Component\Card($card))->render() ? So, anyway, that's basically what I've been working on here. I'd be happy to hear if you have any comments on this addition – I haven't yet merged it to master since I'm still experimenting with it, and I'd like to avoid as many breaking changes in the master branch as I can. So far this has worked great for me, but to be honest my requirements have been pretty basic. Thoughts?
    1 point
  35. ryan had helped me a few weeks ago via PN. sorry that i didn't write the solution in the forum before. i hope it's no problem that i write the private message here.
    1 point
  36. There is kind of built in support for this; - Edit the admin template and add a text field with the name "page_icon" - Go to the admin page tree, search for your lister pages to edit: – Add the fontawesome icon name without the fa- part… Voila: Thanks to @ryan for pointing me to this solution in a support request… ?
    1 point
×
×
  • Create New...