Jump to content

dotnetic

Members
  • Posts

    1,078
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by dotnetic

  1. I just released the beta version on github. Updated my first post with the download URL. A new video is coming soon, as many features have changed. For example panels are only being used for a module's settings. All other actions are executed via AJAX and show a notification on success. Happy testing, and have fun with it.
  2. I think my answer solves the problem, that the topic poster wanted to solve. Sometimes you have to think outside the box, and I think he just wanted to know how to not show pages that have a publish date in the future. What first comes into mind is: Leave the page unpublished until the date is actual. That you can tackle this problem differently may not be obvious. But you are right @teppo that there might be other use cases, for example if the page url should not be reachable at all, then the published or unpublished status would be the right thing to do.
  3. Hey Bernhard, labels above or in front of the fields would be a great UX enhancement and make it obvious what field is what.
  4. You could also do this with a simple page selector, which would be the simplest solution: So all your pages have the status Published, but will not be shown, because the event_start field is lower than the today date. $events = $pages->find("template=event, sort=event_start, event_start>=today"); The hook from @elabx is really overkill and modifies the page, which is not needed.
  5. Install from URL is implemented and almost working. Sadly the module can not be installed after the download, because I can't get the name of the module from the zip file. Maybe I can find a way, but later. Preview
  6. I worked hard on the module the last days, and rewrote much of the core logic and added some more features. I wanted to record a screencast yesterday, but my recording software ignored my mic. So I show you some annotated screenshots instead. Since then, many things changed again. Right now I am working on downloading and installing a module via a URL, and also making a transition to modal dialogs instead of panels, if applicable. I moved the whole button logic from the PHP script to a vue component. So I am flexible how to display the buttons, and I can reuse them in the cards and in the table layout: I added a reduced card layout, which moves the description of a module into the "more information" accordion: Updated TODOs with much more features to come. I will work on the module in the next 2 days and hope to make so much progress, that I can finally release the first version on github.
  7. A page autocomplete field would be even more userfriendly. As the selected value you have to get the ID, but the title and ID could be displayed in the input/select. Nice work anyways ?
  8. Did the same some time ago, as PW 3 was released. Replaced the wire folder, and that was it.
  9. One disadvantage of Klaro: Custom styling is possible, but takes some effort, and also overhead because the default styles are embedded in the script. It would be better if the default CSS is optional. You can override the custom styles if you apply a data-attribute to the klaro script. Here is what I did. Cloned the git repo and removed including the SCSS file in the script. Then compiled the SCSS with my customizing as a separate file.
  10. Hey @gerritvanaaken, did you come up with a solution yet? I want to accomplish exactly the same, and this is how I implemented it: It's a Page Reference field, displayed as checkboxes. Now I try to use a similar code like @MoritzLost posted above, in my Smarty template.
  11. Yes it is good and in use on the site https://www.p-jentschura.com/ I added this directly in the HTML so it has nothing to do with ProcessWire in general, but I am thinking about developing a module for it to set the options. But thats only for the far future and next website project.
  12. It would also be nice, if I could add panels as an array of arrays (or objects) like $panels->add([ [ 'panel' => 'number', 'title' => 'Neue Seiten', 'data' => [ 'number' => 484, 'detail' => '100 mehr als im vorigen Monat', 'trend' => 'up', ] ], [ 'panel' => 'page-list', 'title' => 'zuletzt bearbeitete Seiten', 'data' => [ 'collection' => 'template=basic-page, limit=10', 'sortable' => true, ], ] ]); Right now, it seems, that I have to use $panels->add for every single panel, is that correct?
  13. Anyways, this is a really nice module. Thank you for releasing it.
  14. It would also be nice, if you provide a complete copy and paste solution for the admin.php, so one could directly see a working example. This requires of course to install all submodules.
  15. I found the solution, I have to include the hook before the require in admin.php
  16. I just installed the latest release from github and get the same "Your dashboard is empty" error as zoeck I have not installed multilanguage and it is a fresh install of the latest ProcessWire 1.0.148 To site/template/admin.php I added after the require $config->paths->adminTemplates . 'controller.php'; wire()->addHookAfter('Dashboard::getPanels', function ($event) { /* Get list of panels */ $panels = $event->return; /* Add panels */ $panels->add([ 'panel' => 'collection', 'title' => 'News items', 'data' => [ 'collection' => 'template=basic-page, limit=10', 'sortable' => true, ], ]); }); but the "Your dashboard is empty" message still appears. I did not set the dashboard as the entry point.
  17. 1: I don't know the answer to this, maybe the icon appears if you enable trash for non-superusers (see point 3) 2: Take a look at 3 3: Please take https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all
  18. Hey guys I wanted to share this little snippet with you, which can be run as a .bat file, and backups all of your databases into a separate file: K:\laragon\bin\mysql\mysql-5.7.19-winx64\bin\mysql.exe -uroot -s -N -e "SHOW DATABASES" | for /F "usebackq" %%D in (`findstr /V "information_schema performance_schema"`) do K:\laragon\bin\mysql\mysql-5.7.19-winx64\bin\mysqldump.exe %%D -uroot > P:\htdocs\database-backups\%%D.sql of course you have to change the paths to your mysql/mysqldump.exe files and the destination directory, and the username, if you have to provide another than root. This task can be executed daily via task scheduling in Windows.
  19. @teppo for front-end uploads you could also take a look at this example which utilizes TusPHP (resumable uploads) and Uppy (a nice uploader widget)
  20. Note for PHPStorm users: In my case the AutoTemplateStubs directory was automatically marked as excluded (don't know from which setting this comes from) and I had to mark the directory as "not excluded" to make autocompletition work.
  21. If you don't need to support old browsers like IE, than it is also better to use "let" to define javascript variables.
  22. As the content of the panel is a totally different document (Iframe), than in the opening document your function has to be modified. $('.DeleteDiscountButton').on('click', function(e) { e.preventDefault(); var a_href = $(this).attr('href'); ProcessWire.confirm( discountActionStrings.confirm_delete_discount, function() { // dialogue OK click window.parent.document.location.href = a_href; } ); }); The key is using window.parent.document, which refers to the document that opened the panel.
  23. I would go with Smarty or Twig. Used both. Smarty allows to use PHP functions in it's template strings, Twig does not (only with custom extensions), and Twig throws errors if something is not programmed 100% clean. That nagged me about it, also disliked the double delimiters. In terms of speed Twig and Smarty are almost even, sometimes Smarty is quicker, sometimes Twig.
  24. I can only repeat what @bernhard said. For me the admin area is outdated and does not feel fast enough. However you are free to create an own custom admin area (not only theme, but you could do it as a vuejs application). One bottleneck is the PageFinder which is very slow compared to Laravel or RockFinder, as it fetches many relations for each page. RockTabulator in conjunction with RockFinder is better for some sort of listings than ListerPro but requires more initial work, and has not all the filter possibilities that ListerPro has. I think ListerPro would be a good match for you. I built some applications where I use both RockTabulator AND ListerPro, for different tasks/views. One disadvantage of ListerPro is, that you can't use it on custom module pages, but you can do it with RockTabulator. One superior feature of the PW admin is the conditional dependency of fields (show field only if value x is in another field), which I haven't seen in other tools yet, or not yet to that extend. Regarding your original question: It is possible with PW, and it might be the perfect fit for this type of application, but only if you use the right tools/modules. Else I would look into Laravel in conjunction with AdminLTE or Laravel Nova, but thats just my preference.
×
×
  • Create New...