Jump to content

adrian

PW-Moderators
  • Posts

    11,261
  • Joined

  • Last visited

  • Days Won

    374

Everything posted by adrian

  1. or do you want them without the "$" at the start of the variable name?
  2. @bernhard - does this work? I can parse and provide the info from the phpdoc however you want, so if this still isn't correct, just let me know. PS, if it helps, I can also return the values for @return and @throws
  3. $testpage = $pages->get(1252); $tespage->of(false); $testpage->designers->add(1200); $testpage->save('designers');
  4. Hey @bernhard - nice work! Yes, the API Explorer does, eg: The "params" is what you're looking for. Those wrapped in <em></em> are optional. Now the catch is that I include the params key for the API explorer, but for the hook data for the Captain Hook panel, I am storing like this: which means you can't easily get those params/arguments as easily. I was going to suggest you could use the API Explorer data instead, but there are several hooks, eg $page->viewable which don't show up as hookable in the APIExplorer because of the way they are added in the PW core, which is partly why the Captain Hook panel uses different methods to get the PW core methods. So, I have played around with adding these to the hooks API data: Would that work for your needs? I could make a method in the TracyPwApiData class hookable so that when it is called, your module could be triggered.
  5. Not sure if this helps at all, but I just connected via VPN (Windscribe) through a German IP (185.189.112.92) and everything is loading fine.
  6. Frustrating that we are still dealing with this 2 years later, but this is what I am currently using (thanks to @Robin S? // hack to overcome this: https://github.com/processwire/processwire-issues/issues/550 // from: https://processwire.com/talk/topic/19913-solved-page-reference-field-unpublished-pages-not-visible-by-non-superuser-rolesusers/?do=findComment&comment=172593 $this->wire()->addHookAfter('ProcessPageSearch::findReady', function(HookEvent $event) { $selector = $event->arguments(0); if(strpos($selector, 'template=user') !== false && strpos($selector, 'name|first_name|last_name%=') !== false) { $selector .= ', check_access=0'; } $event->return = $selector; });
  7. Use the logout button on the user switcher panel and it should do what you want.
  8. Finally got back to investigating this. In case anyone else comes across this, it's due to the ukComment* methods that come with the PW "Regular" profile. The approval process when clicking the "Approve" link in the notification email doesn't work at all.
  9. Thanks @dynweb - for some reason I hadn't noticed that. I have committed your fix. Thanks again.
  10. For those who are interested, here is an explanation of why: https://www.php.net/manual/en/function.strtotime.php#92600 You need to add either the day or the year to the month to get it to work correctly. There are also some alternative fixes listed in this thread: https://stackoverflow.com/questions/3283550/convert-month-from-name-to-number
  11. Remember that version you are using not only has this fix, but lots of other changes for other bugs as well. Maybe it's time to post that version in its entirety somewhere - obviously with no support or warranty, but perhaps a repo that others could issue PRs against? Then again, I honestly think the entire storage and retrieval side of this module needs to be rebuilt from scratch. the inputfield is really pretty nice, but the rest is unfortunately very cumbersome and buggy. Of course, this is not an easy thing to get right, so I am not meaning to be too critical ?
  12. @Zeka - sorry, I am not sure - that Performance panel is not my own work - it comes from https://github.com/Zarganwar/PerformancePanel although it hasn't seen any updates in a long time. It would be great if you could figure out where the problem is coming from though if you have the time. @bernhard - thanks for the idea - but sounds like it's a no go afterall.
  13. Hi everyone, Having some weird stuff going on with comments - I think it's a new bug but would love someone to check for me to see if it's also happening elsewhere before I file a bug report. If I click the Approve link in the email notifying me of a new comment that needs approval, it looks like it has worked, but then when I visit the comments admin interface, it us still listed as Pending. Also, recently it seems, comments are just vanishing - their entries are missing from the database completely. Problems seems to exist from 3.0151 to 3.0153, but maybe earlier as well. Thanks for taking a look!
  14. Don't forget that Tracy's Module Disabler panel can quickly disable all autoload modules and includes a restore feature if those changes break things.
  15. From Tracy's Captain Hook panel:
  16. My best guess is that it's an htaccess issue - most likely an AllowOverride setting that isn't letting mod_rewrite kick in as needed. If you're not familiar with these settings in Plesk, it might be best to submit a support ticket. First thing I would try is to add some gibberish text to the top of the PW root .htaccess file to see if it's being loaded and go from there.
  17. Don't forget Tracy's Captain Hook panel ?
  18. The way other is to simply change the name of the page to match the ID is a hook in your ready.php // rename page to match its page ID $this->wire()->addHookAfter('Pages::added', function($event) { $p = $event->arguments[0]; if($p->template != 'basic-page') return; $p->setAndSave('name', $p->id); }); One thing to note in your module - you are hooking on "save", so it will rename it every time it is saved. If you need the other functionality of your module, perhaps you can change to Pages::added ?
  19. Then try the Hanna code approach and set up attributes for the video ID, and max width / height and wrap the iframe in a container. Google embed video responsively and you'll get tutorials on how the wrapping works. You might end up with a shortcode format like this that lets you insert that into the RTE with the video ID and a max width and the Hanna code takes care of inserting these into the wrapper and iframe HTML. [[video_embed id="" width="500"]]
  20. Are you embedded into a body of text that is wider than what you want the video to be? If the video is on its own, I would recommend checking the responsive checkbox and outputting this field inside a div with the max width you want. If not, then it might actually be easier to use the Hanna code module - then you can specify the url and width you want for each video separately, without the mess of trying to embed an iframe into an RTE field. Let us know if you decide to go this route and need help.
  21. Did you read the configuration notes in the module's description ? "You may want to update the max width and max height settings on the module configuration screen."
  22. For a video embed, use this module: http://modules.processwire.com/modules/textformatter-video-embed/ and select the responsive option. If you need to tweak more settings on the video, then also install this: http://modules.processwire.com/modules/textformatter-video-embed-options/
  23. @antpre - I've just committed a new version - field pairings will now work regardless of the "ignore first row" setting. Please try it out when you get a chance and let me know if you still have any problems.
  24. that's exactly what I don't want ? Just a quick comment - that is exactly what you are doing here anyway ? $channel->name = $this->sanitizer->pageName($title);
×
×
  • Create New...