Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. Sometimes as gists... Go steal it !
  2. Actually I do think that notifyByRole is run as constructor. So it's acts as a __construct and it is fired before any hook is attached. http://php.net/manual/en/oop4.constructor.php
  3. I doubt that wire('users')->find("roles=rfp-user") will work at all. Roles is a PageArray, thus you have to search it as usual. // searching a sigle role, 1234 ID of the role wire('users')->find("roles=1234, include=all") ps, I'm not sure about the include all, you have to try it yourself.
  4. The only way see is with a get variable or put variables in a session.
  5. @Nukro, here's a little mindset: The PW back-end is build on top of the API. The PW front-end is build on top of the API. In fact, you don't need the back-end at all to run ProcessWire. The backend is full of access checking and stuff, but when you do create, read, update & delete stuff on front-end you need to do that access stuff yourself. The back-end is full with JS and CSS stuff that is needed for proper functioning, ajax request etc. etc. And again if you want that on front-end, you need to include that if possible or create it your self. For user access & permissions I gladly point you to http://processwire.com/api/user-access/ to get the insight of the role based access control system.
  6. Looks like saving the Page 'quietly' is sufficient. <?php // 'quiet' => boolean - When true, modified date and modified_users_id won't be updated $pages->save($your_page, array(quiet => true));
  7. Fields in ProcessWire as in '$fields' are $Field objects. It is not where you find your data. The data in ProcessWire is saved together with the page ID. So to get data from a field you have to ask the 'page' for it, like $page->title or equivalent $page->get('title').
  8. @adrianmak, Consider https://www.padloper.pw/ as it is beautiful and cheap
  9. Place something alike in your init and user with role 'your-role' won't see Pages $this->addHookAfter('Page::viewable', function($event) { // 3 is the ID of Pages if ($event->object->id === 3 && $this->user->hasRole('your-role')) { $event->return = false; } }); ps, code is not tested...
  10. You could build upon https://github.com/Da-Fecto/CustomHomeRedirect. You could select a page in the configurable interface to redirect to. There's no support for that module however.
  11. The reason I mention structured data is because in ProcessWire it's fairly simple to use that to import pages.
  12. Depend on how you have your data. When you have your data structured some how, you could write a script to do it for you. side note: It's scary to have no avatar, someone will come up with one when you aren't quick enough:-)
  13. Could you try: AllowOverride All Options Indexes MultiViews FollowSymLinks Require all granted Happy to hear it's working !
  14. Oke... Could you open your .htaccess and type: agfagergwtuh8rh at the top (or something). When that results in a 500 your .htaccess is working at least.
  15. It looks like a permissions issue. Are /site/assets/logs/ & /site/assets/sessions/ empty ? If so php can't write, but it need to. Probably better when others join this discussion, because I'm far from expert in permissions.
  16. Is the .htaccess in place? Second question: Are the other site profiles still in there? When the second question is Yes, PHP is probably not allowed to write. More information about permissions: https://processwire.com/docs/security/file-permissions/
  17. Field is a field object, to get the value of the fields of the page you need to get the name of the field. $page->get($field->name);
  18. The LIIP installer is based on the work of Marc Liyanage. I think i'm running those from MacOS 10.1 or 10.2 till now, I never really used other solutions.
  19. I want to note, that the default PHP on macs is really default. I always feel better when PHP is installed with the installer from: http://php-osx.liip.ch/
  20. Actually I do that all the time... Put all available options in my code even the default. Then I know what to configure, later on I remove all the options I don't need to set. (solves personal memory issues )
  21. @cssabc123 There are more bananas sold with paper stickers then without. Are bananas with stickers better then bananas without?
  22. Hi cssabc123 Real knowledge comes from experience it yourself, I suggest playing with the module and having fun. Having great times is probably the most important thing in life . Enjoy it!
  23. Probably you have to make /site/assets/cache/ directory writeable for PHP.
×
×
  • Create New...