-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
Sometimes as gists... Go steal it !
-
Building a module - Stuck on getting users
Martijn Geerts replied to FuturShoc's topic in Module/Plugin Development
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 -
Building a module - Stuck on getting users
Martijn Geerts replied to FuturShoc's topic in Module/Plugin Development
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. -
Hello Process Module pass argument to function
Martijn Geerts replied to Spica's topic in Module/Plugin Development
What about session? -
Hello Process Module pass argument to function
Martijn Geerts replied to Spica's topic in Module/Plugin Development
The only way see is with a get variable or put variables in a session. -
@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.
-
Prevent field from updating page edit timestamp
Martijn Geerts replied to statestreet's topic in General Support
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));- 2 replies
-
- 6
-
-
- fields
- timestamps
-
(and 1 more)
Tagged with:
-
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').
-
does the apeisa's shopping module support pw 2.5 or even 2.6 ?
Martijn Geerts replied to adrianmak's topic in General Support
@adrianmak, Consider https://www.padloper.pw/ as it is beautiful and cheap -
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...
-
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.
-
The reason I mention structured data is because in ProcessWire it's fairly simple to use that to import pages.
-
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:-)
-
Setup a ProcessWire environment on a fresh MacOS X install
Martijn Geerts replied to Martijn Geerts's topic in Tutorials
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. -
Setup a ProcessWire environment on a fresh MacOS X install
Martijn Geerts replied to Martijn Geerts's topic in Tutorials
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/ -
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 )
-
@cssabc123 There are more bananas sold with paper stickers then without. Are bananas with stickers better then bananas without?
-
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!
-
Probably you have to make /site/assets/cache/ directory writeable for PHP.