Jump to content

bernhard

Members
  • Posts

    6,648
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by bernhard

  1. looks cool thanks for sharing dave! i think i have to try that
  2. great adrian, that did it and i can also see the panel now, it was related to my browser.
  3. hi adrian, PHP Version 5.4.45 and tracy 0.5.4 the error came when i tried to reach the admin in a different browser where i was NOT logged in. in the browser where i installed tracy it seemed that everything worked but i could not see the debug panel. don't know if that's somehow related so my laptop or if i did not setup it correctly? i checked both checkboxes (frontend + backend)
  4. ok last time it was not critical but now it was, so i implemented this little hook to check unsaved changes via javascript when clicking on the button defined at line var buttons = '#button_example_id'; when the user clicks the button the confirm-dialog appears code: /** * show warning message on button click if there are unsaved changes in the form **/ public function confirmUnsavedChanges($event) { $page = $event->object; // only add this to admin pages if($page->template != 'admin') return; ob_start(); ?> <script type="text/javascript"> $( document ).ready(function() { // buttons to observe var buttons = '#sendLoginLinkButton, #newInvoice'; $('body').on('click', buttons, function(e) { var msg = InputfieldFormBeforeUnloadEvent(true); if(typeof msg != "undefined" && msg.length) { if(!confirm(msg)) { e.preventDefault(); return false; } } }); }); </script> <?php $script = ob_get_clean(); $event->return = str_replace("</body>", $script."</body>", $event->return); }
  5. i just installed tracy and had some problems: im on 2.7.2 and installation went without problems. but i can't see the debug bar. neither on frontend nor on backend. i tried with a different browser because i have some problems with visibility sometimes on my laptop and got the following error on the pw-login screen: debug->true Fatal error: Cannot use object of type TracyDebugger as array in /var/www/.../site/modules/TracyDebugger/TracyDebugger.module on line 476 Error: Cannot use object of type TracyDebugger as array (line 476 of /var/www/.../site/modules/TracyDebugger/TracyDebugger.module) This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. debug->false Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Error has been logged. besides those errors: do i have to do some additional things to see the tracy bar? thanks for your help
  6. Hi can, Thank you for the module. It would be great to have a description of what the module does or a screenshot
  7. hi mrjasongorman, thanks for sharing! could you please also share some details on how you deciphered the code? thank you
  8. thank you reno, saved my life today after hours of messing around with regex when trying on my own... should have searched earlier
  9. update: v 2.0.0 - added support for ajax loaded fields including repeaters - added sanitization for the jquery selector
  10. does <?php echo $page->google_map->lat; ?> output anything?
  11. hi horst, thank you for your module. could be that i need it one day, though i have to say it was all new to me and your explanation in the other thread was helpful for me: https://processwire.com/talk/topic/11927-wirequeue-needs-testing/?p=111287 thank you also for the screencasts that helped me a lot understanding what it is all about. i think you mean "does not have to be done" as "must not be done" = "darf nicht innerhalb pw gemacht werden", right? could you please explain why you used TXT/SQLite for data storage? why not use a mysql table from within pw? thank you
  12. bernhard

    5 of a kind

    didn't have time to integrate a module... one of those sentences i love processwire for
  13. awesome! the search could maybe be a great help if it worked would also prefer a light theme i think...
  14. awesome! but i'm still excited how (and when) PW 3 will handle client side image resizing https://processwire.com/blog/posts/happy-new-year-heres-a-roadmap-for-processwire-in-2016/#what-else-is-coming-for-processwire-3.x-in-2016
  15. bernhard

    5 of a kind

    really great work
  16. hi marco, sounds like https://processwire.com/api/modules/multi-site-support/ option #2 would be worth a try. but it depends a lot on the setup of your sites. are they exactly the same or should they be different? i think pw 3.0 should also be able to grab data from other installations but i have no experience with it so far
  17. had an issue today when using a name like "example.com transfer profile" it showed up in the select box but after clicking on "continue" it said "no site profile found"
  18. thank you adrian - i know i wasn't dreaming! that's really strange because recently i discovered that i don't see some site elements that should be there. thats not related to processwire. don't know where this comes from, its only on my new laptop with touchscreen. i also do not see pagelistactions on hover... it only works on firefox, not on chrome and IE but thats offtopic here and i will investigate when i have more time...
  19. hmmm... i thought there was an option for this in the core recently but can't find where. or have i been dreaming?!
  20. Good idea. Would be good for images but in my case I have to do some php work on button click so it would have to be some complicated ajax...
  21. @lostkobrakai can you confirm that when clicking this button the page is NOT saved. so if you edit other fields the changes will get lost. any way to change this behaviour? the reason is i created a button "create invoice" for a client and if he changes some fields (address for example) and clicks the button "create invoice" without saving the page before this changes will get lost
  22. You would have to use OR instead of AND Glad it helped
  23. Thank you Adrian. Seems that the blog post came 3 months too early for me. I read it but didn't remember. Now it makes sense
  24. if you want to get access to eg $pages in modules you have to do something like $pages = wire('pages'); sometimes i see people using $this->wire('pages') like here for example: https://processwire.com/talk/topic/11939-make-dashboard-plugin-page-the-default-admin-page/?p=111017 is there any difference in those two methods? i also saw $this->user->name and i was not sure if that would work inside a module because i thought it should be wire('user')->name thank you in advance
  25. hi christophe, maybe this helps: put this in your /site/ready.php $wire->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event){ $process = $event->object; $page = $process->getPage(); $user = wire('user'); // example: limit code to one template if($page->template != 'basic-page') return; // example: limit it to user role if(!$user->hasRole("membres")) return; $config = wire('config'); $config->scripts->append($config->urls->templates . 'scripts/yourscript.js'); $config->styles->append($config->urls->templates . 'styles/yourstyle.css'); }); of course you will have to put your script or style-files in the appropriate folders (in the example above it would be the folder /site/templates/scripts or /site/templates/styles
×
×
  • Create New...