Jump to content

adrian

PW-Moderators
  • Posts

    11,213
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. I have put it here for the moment: https://github.com/adrianbj/FieldtypeMapMarker/tree/add-address-components If more of you start wanting this, I guess I'll try to get Ryan's attention
  2. @joshuag Got some notices when installing that you might like to fix: Also, and much more importantly, on the UiKit theme, there are some big CSS issues: Also, I don't understand why the start date includes the time when "All Day" is checked. Maybe I am missing something, but I think that makes it quite a confusing UI. Is there a way around this? Another issue I am having is how to define an end date/time if it's not a recurring event. I was hoping I wouldn't need separate fields for recurring and non-recurring events. Do I? Thanks!
  3. Here's the relevant edition: https://shop.heise.de/katalog/kurzer-prozess-bad0b2 Looks readable in the preview version if you're keen.
  4. Hi @mel47 - contributions are very welcome!
  5. @lpa - for now I am going to attach the new version here. This adds support for the new "prohibited" property so now you can check if a page is protected and then also check if it's prohibited for the current user. I refactored a few things so don't want to commit the changes just yet. Can you please test this for your needs. I would also like to help you with Issue 1, but will might need some access to test that. As for Issue 3, did you try my suggestion? PageProtector.zip
  6. @lpa - just heading to bed here, but 1) I am not seeing any problems like that here - any chance this site is live and you could give me a login to check things out? 2) I'll need to confirm the role stuff in the morning - you might be onto something though - I might need protected vs prohibited? 3) The part I made hookable is just the message before the username/password fields. I think if you want custom classes around the login form you should just put them in your template file you as want - no need for a hook for that. Does that make sense?
  7. I am curious how you handled it in ready.php - did you create the additional component inputs, or was it extracting the components from the single combined address field? I have done something similar before, but the problem is that you can't guarantee how site editors will enter the address that way.
  8. Not sure if anyone is interested, but I just extended this to support address component fields. Now you can enter the various address components individually and it will automatically populate the final combined address field and geocode the address to lat/long. I wanted this so I could grab the individual components for displaying a business address in a specific format, rather than relying on what the site editor entered into the combined address field. You can of course call the components like this: $page->address->street $page->address->additional $page->address->city $page->address->state $page->address->postcode $page->address->country These are in addition to the existing: $page->address->address // the combined version $page->address->lat $page->address->lng $page->address->zoom Is anyone interested in this version? Not sure if @ryan would accept a PR or not?
  9. @lpa - I am not seeing the issues you are regarding access to the child. My thought is that you might have checking the "protect children" checkbox for Page 1. If you are separately protecting child pages, I think you don't want that checked. Can you try that and see if it works as expected? I have committed the change that makes that hook available. Please let me know how you go with that also.
  10. @lpa 1) I'll look at the hierarchy you described in a minute 2) You can check if a page is protected by checking $page->protected eg: if(!$page->protected) { //show in navigation } 3) I have just made the message function hookable, so you will be able to put this is your ready.php file: $this->addHookAfter("PageProtector::getMessage", function($event) { $event->return = 'My custom message'; }); I'll commit this once I look at your first issue.
  11. I expect you are changing the main default in the module settings. This populates the value on the Settings tab of the page that is being protected, but if a page has already been protected, you will need to change the value for that page. It allows for different messages for different pages. Does that make sense?
  12. @theo - you can always take the opposite approach:
  13. Sorry about the other notices - I have never dealt with templates without a title field before. Any chance you feel like putting together a PR for these as you find them? Sorry, I am not going to have much time for my PW modules for a while. Thanks!
  14. Thanks @kixe - they should both be fixed now.
  15. Maybe this module from @Robin S can help you achieve what you want" https://github.com/Toutouwai/VirtualParents
  16. @OllieMackJames and others - @Robin S was kind enough to enhance AdminActions to support RepeaterMatrix fields:
  17. It's kinda hacky, but this does work: $this->addHookAfter('Page::render', function($event) { if($this->process != 'ProcessPageEdit') return; $p = $this->process->getPage(); $headline = "My ID is $p->id"; $event->return = str_replace($p->title.'</h1>', '<strong><em>'.$headline.'</em></strong></h1>', $event->return); });
  18. Hi @Jon - thanks for the details, but I guess I am not sure what you are expecting to have happen. If you don't want the head.inc and foot.inc to be loaded, why not just use the standard (no login template) way of adding the login form. That's how it's designed to work. maybe if you could provide a mockup of how you expect it to look I might be able to get a better idea?
  19. Thanks @Robin S - looks like it is was much easier than I expected. I also added your request for a link to the module settings from the Process page. Really appreciate all the other tweaks and fixes - mucho appreciado! Thanks again!
  20. $firstItem = $feature->issue->first(); echo "<p class='iss uk-text-tiny bold caps'><a href='$firstItem->url'>$firstItem->title</a></p>";
  21. One tweak that I think is worth making is to use: $e->object->getPage() rather than $this->input->get('id') to get the page being edited. /** * modify headline in page edit interface */ $wire->addHookAfter('ProcessPageEdit::headline', function($e) { $pageBeeingEdited = $e->object->getPage(); if (!$pageBeeingEdited->id) return; $headline = "My ID is $pageBeeingEdited->id"; $this->wire('processHeadline', $headline); // no need to modify the return value ($e->return) });
  22. Just wanted to explain @kixe's excellent answer a little for those who might be wondering why that hook isn't listed in the Tracy Captain Hook panel or on the Captain Hook page: https://processwire.com/api/hooks/captain-hook/ What is going on is that ProcessPageEdit extends Process and Process has a ___headline() hookable method. If you're used the Tracy Captain Hook panel, it always pays to check the class that the current class extends: Now we're looking at the hooks for the Process class and we can see that headline is available. Hope that helps! The other useful tip is the to click the "Toggle All" button at the top and CTRL/CMD +F and look for "headline"
  23. Hi @OllieMackJames - I'm afraid I don't have the time to do this at the moment, but I am sure you can extend the "Copy Repeater Items to Other Page" action to support RepeaterMatrix fields - probably just a matter of another loop. If you make those changes, I'd really appreciate a PR Let me know if you have any questions.
  24. @Jon - just took a look and can't seem to reproduce. What version of the module are you running? Can you please details of the code in the template file, and your auto prepend/append settings please?
  25. @Jon on mobile right now, but just wondering if the chosen template file is actually connected to a PW template. It doesn't need to be and maybe that is the issue but I'll have to check when I'm back at my desk in the morning.
×
×
  • Create New...