Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

84 Excellent

About webhoes

  • Rank
    Sr. Member

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, For a Dutch site with padloper a visitor can enter their email. Due to a lot of mis-typing they now also need to confirm their email. How do I change the word "Confirm" to something like "Bevestig email"?
  2. @Jan Romero, I got it working with your code. Thanks.
  3. @Jan Romero, thanks. I found the same issue. I renamed that div as I already use content for template strategy. I made this <div id="live-search"></div> Yes, I changed the % to ~, not sure it that is correct either. If using % it will also give me a lot of unrelated results as it searches in both title and body. Currently I trying to fix that the div with results does not grow downwards but upwards making that you can't see the results.
  4. @Jan Romero, I tried your code on a website. I do see the url change on typing in the searchbox, tracy also shows the search term. If I press enter I get to the search page with the correct results. I just miss the live search part. My setup is a _main.php with the search form and the javascript code. A search template with url /search/ with the code for the actual search. If have set it up on this test site. meibergen.webhoes.nl Do you have any clue why I don't have the live search?
  5. @flydev, thanks works perfectly!
  6. Hello, I want to add an item to the user navigation menu. In the picture below I added it (My studbooks) in the core files. It is hookable, but I can't get the hook to work. Ready.php // /* to figure out */ $this->addHookAfter('AdminThemeFramework::getUserNavArray', function(HookEvent $event) { // Get the object the event occurred on, if needed $AdminThemeFramework = $event->object; $AdminThemeFramework = $navArray(); // An 'after' hook can retrieve and/or modify the return value $return = $event->return; /* Your code here, perhaps modifying the return value */ $navArray[] = array( 'url' => '/my-studbooks/', 'title' => $this->_('My studbooks'), 'target' => '_top', 'icon' => 'eye', ); // Populate back return value, if you have modified it $event->return = $return; }); What should I change to get it working from ready.php
  7. @MarkE, Thanks! This is a total different I was looking at and mine doesn't work. I will play with this and see if I can get it to work in my setup.
  8. Interesting. Are you willing to share you module? I have not been able to get a secure setup myself. The pageload in my case is my security setup. I check for referenced users from a parent page or parent parent page. This is really time consuming.
  9. I made a similar something, but it increased the pageload by 3 seconds. This is too much. Do you give the user temporarily page-edits upon granted request of that page?
  10. @MarkE, did you get this working without giving user page-edit rights?
  11. Hello, I am working on a site where multiple users have one ore more pages (studbook). These pages can contain children (animal) and animal can have a child (transfer). I created an admin before the PW admin. Here users can see their the pages the have their users_created_id. I use the feel module for editing. But if someone right clicks the edit button, they end up in the PW admin and can see everything (not allowed). So I created a module to redirect everybody but superuser from the admin templates (except if page id == 10, the edit template). This sort of makes is secure, but if a user knows the id of the page they can still type /processwire/page/edit/?id=xxxx and see that page. I have been working some days around this, but no solid solution came up. I do have the formbuilder module available if this can help. I also thought of making a role for every studbook. That would mean 35 roles and 35 studbook templates. Also animal and transfer templates need to be duplicated per studbook otherwise a user will still be able to see others. What other options are there to make it so people can only see their studbook and their child pages? Nice to have would be that to or more selected users can see and or edit that studbook. Preferbly all without page-edit rights so I can block everyone from the PW admin.
  12. @renobird, have you re-considered releasing the code for your ticket system or partly. Basicly the part that creates new tickets from emails and sends updates is the most important and difficult.
  13. Thanks @jmartsch and @bernhard I have updated the module with your improvements. Works very smooth...
  14. Damnnn... Or you name your module properly instead of having .php as extension. I could not find it among the modules, but I was confused with some other hooks that are not modules (like in ready.php) that just do their thing. Luckily, it works now.
  15. Could not get something working with those changes. After some more searches I came up with this, close to the examples but also still not working. public function init() { // add a hook after the $pages->save, to issue a notice every time a page is saved $this->pages->addHookBefore('save', $this, 'updateProduct'); } /** * Example1 hooks into the pages->save method and displays a notice every time a page is saved * * @param HookEvent $event * */ public function updateProduct($event) { /** @var Page $page */ $page = $event->object; //$page = $event->arguments('page'); if($page->template != 'product') return; $fields = $page->fields; $price = $fields->get('pad_price'); $rrp = $fields->get('pad_rrp'); $discount = $rrp - $price; $percentage = $discount/$rrp * 100; $page->of(false); $page->set('pad_discount', $percentage); $this->message('test'); }
  • Create New...