Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by bernhard

  1. I haven't used it, but it looks great! Thx for sharing!
  2. https://processwire.com/api/ref/page/get-unformatted/ $timestamp = $page->getUnformatted('event_start');
  3. Disregard that. I thought Joomla had a standard way of defining module positions. But that seems to be different for every template. The backend would nevertheless have to know which positions are available to choose from for the frontend πŸ™‚
  4. I built it 2017, so that's totally possible that I had some Joomla UI in my head πŸ˜„ I get your point, but I guess that would get very complicated... We'd need a complete UI for widget management. At the moment those widgets in my setup are pages and I only need one inputfield to handle visibility. Imagine the other direction: We are on the frontpage and want to let the user choose the widgets there... Which widgets do exist? If the user sets the widget visible, what about child pages (eg on blog overview page, what about the detail pages?). How to add a new widget to the page? Hmm... Maybe a quite simple field would be enough: Widgets visible on this page: W1, W2, W3 Other available widgets: W4, W5, W6 The widgets could be links that open the widget edit screen in a panel. Simple enough. But thinking about that, the next step would be some way of defining WHERE the widget should live on that page. Including some way to define the position/sort order... That's quite how modules in Joomla worked (at least until 2014). I think, a Widget Management Module would make the most sense... But then we would need some kind of frontend companion. I guess that's not how PW works?! Or at least it does not shine in that regard as much as it does elsewhere...
  5. That's a good input, thx. That would mean we'd need some kind of "not visible on that page, but on at least one descendant"...
  6. Hi, there has been some discussion about widget systems using ProcessWire: https://www.google.com/search?q=site:processwire.com+widget+system When working with widgets, you'll need to define somewhere WHERE the widget is visible and where it is not. The first thought might be: Let's use a Page Reference field for that! But there is a problem: What, if you want to show the widget on all "blog" pages? That's not possible with that Inputfield. OK, second thought might be that we can do that using the Selector Inputfield: The problem: This would mean "template=blogitem|clubs|event, parent=/presse" which only shows 2 blogitems that live under /presse, which is not what I want, because I'd need an OR condition for all rows... Besides I think this Inputfield is too complicated for non-tech users. What I've done in 2017 is this: (https://processwire.com/talk/topic/8635-simple-example-for-widget-management/?do=findComment&comment=148216) This post got 3 likes - I'd like to get your feedback on that approach, because I might need something similar on a current project and I'm not sure if that 3 likes mean "useless" or "overengineering" or similar... I'm thinking if that's maybe also too much for a regular webmaster and I should just create a simple text Inputfield to write a custom selector into (done by superuser)?! How are you solving this? What do you think of the ui shown in the screencast? Is that inutitive? Worth putting it into a module?
  7. I just voted YES because of the backend part πŸ™‚ Thx in advance!
  8. Thx for the link @dragan. I don't know if there are any options that one could set for the export. Maybe there is a way to make it work properly with native export as well...
  9. Not sure if the native backup tools are really the best option... When restoring native backups on sites with a lot of data it took ages while it only took several seconds when using a regular mysql dump. I think the native tools add quite some bloat. It has been discussed somewhere, but I have no links at the moment, sorry. You might have this in mind πŸ˜‰
  10. Hi @gebeer, I think it would be better to name the title of the fieldtype "Image Reference" instead of "Image Reference Fieldtype": https://github.com/gebeer/FieldtypeImageReference/blob/2df486396ae58a5ff1687d30434cbfce6f913602/FieldtypeImageReference.module#L32 I guess this was due to a wrong field setup, but I also got these errors: Regarding your AJAX: I found it easier and safer to handle my ajax calls via hooking into ProcessPageView::pageNotFound: https://github.com/BernhardBaumrock/RockTabulator/blob/6670f2647fcbbb1f5ad4c5237ea9fd03b8899315/RockTabulator.module.php#L73 https://github.com/BernhardBaumrock/RockTabulator/blob/6670f2647fcbbb1f5ad4c5237ea9fd03b8899315/RockTabulator.module.php#L159-L188 I've taken a similar approch to yours on RockGrid and had some problems with it, because of scripts not being available when the field is collapsed and loaded via ajax or the like...
  11. It would be great to get a more detailed description of your problem and what you have so far and what you want to do and what and why the current solution is a problem. You can of course hook processInput and you can set any values there as you like. But it's hard to give an advice when you don't have the bigger picture πŸ™‚
  12. That sounds awesome! Thx for your great work πŸ™‚
  13. I think I don't understand what you are trying to do. Why do you need a readonly select? What is the difference to a locked field that just shows the value?
  14. Thx @adrian true. That would be a good option. Though not ideal imho. But the best option we have so far. Thx
  15. Can't you just set the inputfield collapsed to collapsedNoLocked ? https://processwire.com/api/ref/inputfield/#pwapi-methods-collapsed-constants
  16. @ryan SettingsFactory would be another example of how useful a file upload inputfield that is not connected to a pw page could be :
  17. Hi @Macrura, just tried your module and have some suggestions: This is the screen after installation: What do you think of adding this section in the instructions field? https://github.com/outflux3/SettingsFactory#instructions (or at least the link) You could even add a direct link to create a new page under ADMIN (.../page/add/?parent_id=2) or under SETUP (.../page/add/?parent_id=22). Maybe you also want to add this screenshot for anybody wanting to get a quick impression of how this module looks in action (using the kitchen-sink example file): Looks like I should start using your modules for my projects! πŸ™‚ Thx! How do you handle file uploads? Eg site logo, favicon, image placeholder, invoice template etc? Maybe we get a possibility soon: https://processwire.com/talk/topic/22815-new-post-weekly-update-for-27-dec-2019/?do=findComment&comment=195465
  18. I think the best would be to create a custom process module. You can assign a permission to that module so that only some of your users can view this pages in the backend. This page could be a 100% custom UI with a list of all pending users and a button for each of them that adds the role to that user when clicked. class Process extends Process { public static function getModuleInfo() { return [ 'title' => '', 'version' => '0.0.1', 'summary' => '', 'icon' => '', 'requires' => [], 'installs' => [], // name of permission required of users to execute this Process (optional) 'permission' => 'foo', // permissions that you want automatically installed/uninstalled with this module (name => description) 'permissions' => ['foo' => 'May run the foo module'], // page that you want created to execute this module 'page' => [ 'name' => 'helloworld', 'parent' => 'setup', 'title' => 'Hello World' ], // optional extra navigation that appears in admin // if you change this, you'll need to a Modules > Refresh to see changes 'nav' => [ [ 'url' => '', 'label' => 'Hello', 'icon' => 'smile-o', ],[ 'url' => 'something/', 'label' => 'Something', 'icon' => 'beer', ], ] ]; } public function init() { parent::init(); // always remember to call the parent init } /** * */ public function execute() { $this->headline('Manage users'); $this->browserTitle('Manage users'); /** @var InputfieldForm $form */ $form = $this->modules->get('InputfieldForm'); $form->add([ 'type' => 'markup', 'label' => 'foo', 'value' => $this->usersTable(), ]); return $form->render(); } /** * Render users table */ public function usersTable() { $users = $this->pages->find('...'); $out = '<table>'; foreach($users as $user) { $button = "<a href='./activateUser/?id=" . $user->id . "'>activate</a>"; $out .= "<tr><td>{$user->name}</td><td>$button</td></tr>"; } $out .= "</table>"; return $out; } /** * Activate user and redirect to overview */ public function executeActivateUser() { // get user $user = $this->pages->get($this->input->get('id', 'int')); // !!!! caution !!!! // check if user is really a user and if the current user is really allowed // to modify this user! if(!$access) throw new WireException("no access"); // otherwise add role to user $user->of(false); $user->addRole(...); $user->save(); // redirect to overview $this->session->redirect("./"); } }
  19. Pros of PW: You already have a solid and flexible backend (access control, fieldtypes and inputfields, ...) Great fit of frontend + backend (you might be able to build everything as one app) It's really easy to create custom admin pages as @elabx said (see link) All the great things we love about PW Cons: Backend Design/UI/UX/tec (it's not the most modern one, you are limited in styling (or at least it's not that easy, see https://processwire.com/talk/topic/20659-rockskinuikit-easily-and-quickly-skin-your-adminthemeuikit-backend/ as possible workaround)) Many logged in users at the same time? The PW backend might not be resource friendly - no experience with that! Bad Continuous Integration support (see https://processwire.com/talk/topic/21212-alpha-rockmigrations-easy-migrations-from-devstaging-to-live-server/ ) Very limited data listing tools (ListerPro is great for some Listings, but really not great for more complex and more visual ones...) Need a good mobile experience for your backend? You might not be that happy with PW... This list is neither complete nor the only truth πŸ™‚ I don't really have any experience with other frameworks - that was just some experiences I had over the last few years building more complex apps on PW. I'm happy to learn from different opinions πŸ™‚
  20. Hi Ryan, thx for the great news and happy holidays and a new year to you as well πŸ™‚ That sounds great. I've no idea how you plan to implement this, but I wonder if it could make sense to also have the backend in your mind for this Inputfield πŸ™‚ I've had several occasions where the admin file upload field was not ideal (mostly in ProcessModules and ModuleConfigs). And others had issues as well (eg @Robin S https://github.com/processwire/processwire-issues/issues/964 ). I think also @Gadgetto had problems with some kind of invoice upload field?! I have no specific example right now where and how this would make sense, but maybe others have one?
  21. bernhard

    Aaron Copland

    Nice one, thx for sharing πŸ™‚ The search is definitely interesting. I wonder what the menu items / colors stand for? I guess they have a meaning? Maybe you could add a description on hover of the icons (title tag)? Some suggestions: 1) Uikit does a great job regarding accessibility out of the box (these are the little details I like about Uikit πŸ™‚ ), but your design does not reflect them. You could tweak it with very little effort by adding some :focus and :active rules. 2) The search menu is not usable from the keyboard at all I think. When you type a search phrase, TAB completes the phrase and you cannot navigate through the list of results (because you'll only have the first result left and the others disappear). 3) Is it intentional that you have non-serif font for menu and some(!) headlines and a serif font for the rest? I'm no design/UI/UX expert, but for me, that looks a little weird/incomplete/unprofessional(?).
  22. What about ImageReference like the PageReference we already have? Thx for that preview. What came to my mind instantly was that it would be great to have an option to define a default. This would then be very similar to the "select image from page" option - so maybe these could be combined? Maybe that would be overengineering. Not sure πŸ™‚ Thx for your great work! I will definitely use your module a lot in the future.
  23. Sorry, obviously I missed that info πŸ™‚ I don't know how complex your field output is, but you could nonetheless use my hook and recreate the complete output. Maybe that could even improve your UI.. Just to throw in an idea without knowing your scenario.
  • Create New...