Jump to content

bernhard

Members
  • Posts

    6,670
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. thank you robert. the demo does not work for me as expected. when i click on "blog" and then on "work" it fires the click and not the dropdown... looks nice, thank you you can try my menu on https://new.mentalestaerke.at/ as long as the page is there. would be nice to hear if it works for you or you have any problems. (you need the desktop version of the menu)
  2. i find it really intuitive. it looks a bit clumsy on my screencast because of the mouse but it feels different when you are touching and not pointing. i'll send you the link so you can try yourself
  3. hi, i had a really strange bug today! szenario: user can book an event user gets invoice via mail admin can create new invoices the problem: $page->created was empty on mail-invoices whereas it was properly filled on admin-creation difference between those two events from the code-perspective: nothing both are triggered via $page->createInvoice(); public function renderAddressSection($event) { $page = $event->object; $eventpage = $page->getEventPage(); if($page->template != "booking") return; // shows 0 $page->created; // shows 1462893271 wire('pages')->get($page->id)->created; any ideas what could cause this odd behaviour?? all other fields work well. of course in both cases the booking is already saved. that was my first guess, but in both cases there was a proper id for the page... a quick test if "created" was not available in hooks in general showed, that it SHOULD work as i expected: $this->addHookProperty('Page::test', $this, 'test'); public function test($event) { $page = $event->object; $event->return = $page->created; } $page = $pages->get(3505); $page->of(false); echo $page->created . ' ' . $page->test; // shows 1462893271 1462893271 thank you for your help!
  4. i'm currently porting a clients website from joomla to processwire (finally, it's a good week ) and we are using the old design for that. today i recognized that on tablets the menu doesn't work as expected, since the menu structure changed from joomla-chaos to pw-awesomeness the problem is the old multilevel problem when you have items and subitems and want to show the subitems on hover. on touch devices your clients will perform a "click" anstead of a "hover" and they will trigger a new pageload. i came up with a quick fix and would be interested in your opinions. seems to work really nice here: $(document).ready(function () { var menu = $('...'); menu.find('a').click(function(e) { console.log('clicked'); // early return if the parent has no hover-class if(!$('...').hasClass('...')) return; // prevent click when delay is too small var delay = Date.now() - $(this).data('hovered'); if(delay < 100) e.preventDefault(); }); menu.find('a').mouseover(function(e) { var time = Date.now(); $(this).data('hovered', time); }); });
  5. bernhard

    Vagrant

    update: i'm using laragon now and love it! see this post: !!! OUTDATED !!! i'm using vagrant on win10 for all my development too. i really like it once you have the hassle of setup done. i'm now using scotchbox - i don't use the repo gebeer linked to. here is my new one: https://gitlab.com/baumrock/vagrant-pw-lamp/tree/master sorry, no time for documentation right now, but the readme from the old repo should also have some useful informations (as already linked by gebeer): https://github.com/BernhardBaumrock/vagrant-pw-lamp on win8 i had to switch GUI mode to OFF otherwise it didn't work. on win10 it was the contrary ^^ i'm too busy right know to give more help. gebeer and i have been talking about vagrant and pw development quite for some time now but it all seems too experimental to really recommend our setups to someone else... but if you want to try and have some specific questions please let me know some nice things i like and why i am using it: have a linux sandbox setup projects with "real" hosts in seconds; my workflow is like this: create a folder on my host like "example" "git bash here" clone my repo https://gitlab.com/baumrock/vagrant-pw-lamp vagrant up then i have my machine ready and can access my linux server on example.dev mailcatcher will catch all emails, so i can also test all email stuff, even when i'm offline i can do "grabpw" and get a fresh install of PW to choose from master/dev/devns i can do "backup" at any time, that will backup files + db i can do "restore", so i can move projects from one device to another i can even do "push" or "pull" of the whole website from my live server to my vagrant box, but that's a bit experimental when i'm done with the project i do "vagrant destroy", it will backup everything and keep only 1 backup and destroy the machine. so i don't mess up my host system with lots of GB of VMs ps: sorry i just realized that my repo is private... i can't make it public atm but you can pm me if you are interested
  6. yesterday i found out a very nice feature of sublime called "code folding". maybe it's not new for some of you, but it was for me and makes working a lot more comfortable. you can fold your code depending on levels: CTRL + K, then CTRL + 2 will fold on level 2: when you have your cursor inside a method, it will stay expanded. you can then fold your method on level 3: CTRL + K, then CTRL + 3: that's really nice. you can also find it in the menu under edit > code folding another great feature of sublime is multicursor. i guess most of sublime users know that... so i thought i start a new topic where we can share nice tipps and tricks for sublime and the work with processwire do you have any? ps: https://processwire.com/talk/topic/4203-sublime-text-2-snippets-for-processwire/ https://processwire.com/talk/topic/1888-sublime-text-2-course/
  7. thank you robin, yes, they do have a template file, because its the same template i use on lots of other pages that have to be viewable on frontend. i fixed it quickly by putting this in my _main.php file: <?php if($page->closest('/tools')->id) throw new Wire404Exception(); pw is so awesome but i would prefer to understand whats going on and why viewable is called for every tab in the page editor ps: 700 posts... i'm getting old
  8. hi, i have some settings under a page called /tools (for example /tools/default-mail-data-for-events or the like). i want all pages under this parent be hidden on the frontend so i came up with this: $this->addHookAfter('Page::viewable', $this, 'hideToolPagesFromFrontend'); /** * hide all pages under /tools from frontend access **/ public function hideToolPagesFromFrontend($event) { $page = $event->object; bd($page->closest('/tools')->path); if($page->closest('/tools')->id) $event->return = false; } the tabs should look like this: the tabs look usually like this: but when the hook is active all tabs except "content" are hidden: the dump is like this: why is page viewable called on every tab? how can i just hide the "view" tab? on frontend the functionality is as supposed...
  9. Thank you for the insight and thank you for your work (both ryan and jan). Also a noticable boost here in austria the automatic failover is very interesting, though i'm curious what you do, when people post eg forum posts on the failover system while you are doing upgrades on the master system. or are you synching changes back somehow or are you just talking about file changes and synch back the whole database?
  10. yep, was also the best solution i found: <a href="//' . $config->httpHost . $booking->editUrl . '" target="_blank">
  11. don't know how your module is organized (deadline coming), but throwing in an idea: maybe we could have a "custom" folder, where we can put in our own code snippets and your module will make them visible for toggling on/off. for example: /custom/makeButtonsBigger.js would result in some custom code that makes admin buttons bigger and a checkbox in your module. that way we could build our own repository of admin tweaks, put them on github or the like and on every new pw-install we would just have to do a git clone and tick some checkboxes. what do you think? this is quite similar to admincustomfiles but i never found it really easy to use so i don't really use it a lot. maybe we could have some kind of syntax in thos files to restrict it to a selector and show some better descriptions in your module/panel /* custom admin tweak example * * #summary * this is a great summary * with lots of content * * #pageselector * id>10 * * #editedpageselector * template=example */ $(document).ready(...); #editedpageselector would refer to the currently edited page in processpageedit, whereas #pageselector would refer to the current admin page any thoughts on this?
  12. in this case i would prefer them to be rendered beside in one row (inline)
  13. what i've also came across several times is when on mobile and you have a pagetable and you want to scroll down, if you tap on a pagetable item it will trigger the pagetable sort. it would be great to disable table sorting on mobile. or show just a sort symbol and allow sorting only on this icon.
  14. very cool tpr! feature request: an option to show the save options instantly on button hover. i find it really annoying to have to click on this little chevron to show the popup and then have to click again on the right option. i'm still missing the very quick "save+new" and "save+close" from joomla offtopic: also thanks for the hint to netteforms - my project needs more time than i thought but it is getting more and more awesome
  15. ah, you are right - that was my mistake! still new to all this OOP and namespacing but i'm making progress
  16. hi soma, as this is a very popular post i think it should be mentioned, that there's a best practise for adding pages stated by ryan here: https://processwire.com/blog/posts/processwire-2.6.21-upgrades-comments-more-on-pw-3.x/#more-updates-on-processwire-3.0 $page = $this->wire(new Page()); maybe you can update your post? could save lots of troubles when using multiple instances of pw3 and i think all of us should take care of such things as soon as possible as they are working also in earlier versions
  17. Hi Robin, thanks for the module! just installed it without problems on 2.7.3 2 suggestions: 1) you are using wire(...) some times. for pw 3 i think it would be better using $this->wire(...); see here: https://processwire.com/blog/posts/processwire-2.6.21-upgrades-comments-more-on-pw-3.x/#more-updates-on-processwire-3.0 2) why does one have to add the field manually? i think the field could be added to every template automatically. it would even be better to not see the field in the template editor. don't know how or where you would save the value then... maybe that's the reason for your approach? PS: any ideas why my field looks like this?
  18. i dont need any because i'm rendering it for a PDF; but would be a valid point i don't understand your question. what do you mean? thanks for the hint and link
  19. i'm sure this is nothing fancy for all the pros here, but at least i did that a lot more inconvenient for a long time and maybe it will help someone else... $lines = array(); $lines[] = $page->company; $lines[] = $page->forename . ' ' . $page->surname; $lines[] = $page->address; $lines[] = $page->zip . ' ' . $page->city; $lines[] = $page->country; echo implode("<br>", array_filter($lines)); // or like this $lines = array( $page->company, implode(" ", array_filter(array( $page->prefix, $page->forename, $page->surname, $page->suffix ))), $page->address, $page->zip . ' ' . $page->city, $page->country ); echo implode("<br>", array_filter($lines)); it will skip all empty lines automatically (for example if there is no "company" or no country) and it's a whole more readable then with lots of IFS and ECHOS
  20. i started a new post in the wishlist section regarding this topic: https://processwire.com/talk/topic/13374-allowed-templates-on-a-page-basis/
  21. there's already this moduly by bitpoet for allowed parent pages: https://processwire.com/talk/topic/12793-template-parents/ i think it would be awesome to be able to select the allowed children on a per page basis. for example one could create a page "tools" on the tree. that page could be of template "item", like many other pages (just a title field). now it would be great to have the possibility to configure the allowed child templates somehow. - tools (item) - tools A (item) - foo X (foo) - foo Y (foo) - foo Z (foo) - tools B (item) - bar 1 (bar) - bar 2 (bar) - bar 3 (bar) at the moment this would need a template setup like this: - tools (items) -> allowing foos and bars - tools A (foos) - foo X (foo) - foo Y (foo) - foo Z (foo) - tools B (bars) - bar 1 (bar) - bar 2 (bar) - bar 3 (bar) i would be interested to hear your thoughts on this
  22. i'm using a sandbox-page for some api testing in my root-folder with bootstrapped api. the file only contains: <?php include('index.php'); // quick way to test api i'm using 1.5.7 on pw 2.7.3
  23. hi szabesz, of course i meant this panel to appear only for logged in users (clients). i guess it would be VERY good feeling for the client if she is working on the site and has a support or help badge on every site. something like a toggle on the right of every page. when clicking on the panel, there could be something like "ihr ansprechpartner" on this site: https://www.maletschek.at/boote/phobos-dalpol/phobos-21/ do you get what i mean? i think that would build trust and satisfaction for the client (not the website visitor). the most important thing of this panel should be a message box with a button "send comment" something like this: i meant a panel for admins/devs, where they can filter all submitted comments. an example: client comments: - comment 1, page A, url /page-a, template event - comment 2, page B, url /page-b, template guestbook - comment 3, page C, url /page-c, template event - comment 4, page A, url /page-a, template event when fixing comment 1, it would be nice to have a button "show all messages related to this page". also it would be good to see comment 3 as it is related to the same template. clients would of course not need to do anything, as processwire knows all this from the referred page i think such a feature would be great, but i'm not sure if tracydebugger would be the right place. maybe a dedicated support module would fit better? ps: i really like the idea of logging errors on the client side as stated in the link in my posting above. don't know how hard that would be, but think of a comment like "XY does not show up on this page" and you could inspect a log of the clients console like "undefined variable xy..."
  24. jep, that is correct. ok i think a comment feature with notification via email would be great! i always have to educate my clients to post the url where they are referencing to into the support mail. often they forget it. when they are able to comment directly on that page and not even have to open their mailclient it would be very handy! maybe also put name + email + phone on that panel? like "how can i help you?" leave your question directly here on the page or write me a mail or give me a phone call for more complex questions: xyz@example.com, +123 456 789 maybe that would make screenshots unnecessary in 90% of the cases, you could be right here PS: maybe a support-panel, showing messages with kind of filter functionality: show messages related to: this page | this template | this website show messages depending on priority: high | medium | low show messages depending on type: bug | request | comment
  25. ok, so here is my letter to santa claus https://usersnap.com/features/feedback-widget-bug-tracking but my clients are even too lazy to use greenshot for screenshots... so i don't know how much they would use such a tool... oh, and of course: enjoy your vacation!
×
×
  • Create New...