Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


cb2004 last won the day on August 27 2018

cb2004 had the most liked content!

Community Reputation

163 Excellent

About cb2004

  • Rank
    Sr. Member
  • Birthday 04/20/1982

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3,210 profile views
  1. I have a scenario where I would like to lock down a PDF download, but still display an image of the PDF. I can display entries with check_access=0 but is there a way to use this on an image field?
  2. I am terribly bad at Ajax, I don't mind admitting it. Where would I start with picking a select in the form and then loading the children in another select on the form until there are no more children. @kongondo is this something https://processwireshop.pw/plugins/dynamic-selects/ can do? If yes sign me up.
  3. I wouldn't explore multi-site anymore. You could spit out a feed from site A and read it on site B. You could even import them into site B. I am on mobile right now, but we do this quite regularly so could post an example when I am in the office. RSS, XML, lots of options.
  4. Could this be related? This is an image field set to have just 1 file. Will try getUnformatted when I get a mo.
  5. So I have this working using: $session->redirect($page->file->url); However I tried using $http->sendfile and $files->send as I thought they would be better but they didn't work. Any thoughts?
  6. Hey @Macrura, so glad you are taking this on. Agree it is stable, just needs a little love. In the fork made by @gebeer this supports the regions US and EU, would be great if you could get this into your fork.
  7. I am coming up against a bug where I cant make use of the functionality 'Name format for children', and it doesn't seem like a hook is possible to save the name: $wire->addHookBefore('Pages::setupNew', function(HookEvent $e) { $page = $e->arguments(0); if($this->input->parent_id === '1') { $page->name = 'some-name'; } }); I have tried many solutions from the forums, nothing is achieving what I would like, even for example if I am trying it on the home page like the code above. Any help would be much appreciated.
  8. Yep, my bad. awesome job on that one. I just had to change 'template=user' to 'template=46' or 'template=members-detail' as my users are not within the normal section for this site.
  9. I think this is a bug so posted here: https://github.com/processwire/processwire-issues/issues/795
  10. Nice thinking Bernhard but no joy. In my case I may have to get users added through the frontend anyway. Creating a name for a user is an unnecessary step for me so people will be adding an email address for the name, and then when the user is added they will be adding the email address again to the email field. Off topic I know but just in case I revisit this thread in years to come. I will do that, cheers.
  11. Yep, that's why I was expecting it to work and banging my head against the table when it didn't. I tried hooking into Pages::added but: Method Page::addRole does not exist or is not callable in this context
  12. I am having a lot of fun with the users in different parents/templates: https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-templates-or-parents-for-users What I would like to do is when a user is added using my new user template it should automatically add the role, this field can then be hidden. I can get the hook to work in ready.php using 'saveReady' but not 'added'. Any ideas? $this->addHookAfter('Users::saveReady', function($event) { $user = $event->arguments(0); if($user->template->id === 46) { if($user->get('_is_saving')) return; $user->setQuietly('_is_saving', true); $user->addRole('member'); $user->save(); $user->setQuietly('_is_saving', false); } });
  13. So, I followed the steps here to have users in a different parent: https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-templates-or-parents-for-users This is working great, however when an editor adds a new user to '/members/', I don't want them to have to enter a 'Name'. This is completely irrelevant to the system I am building and will just require an email, so I was going to populate the name from the ID, or the email address entered havent decided yet as its not important, people will login on the frontend with their email. The trouble is, if I populate 'Name format for children' in the parent template nothing works when I go to add a new member, it goes to a 404. Is there any way to skip the adding of a name here? Cheers.
  • Create New...