Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/13/2022 in all areas

  1. Thx for sharing @zoeck It's always a little disturbing to read comments on such posts... So many wrong assumptions and judgements... It's such a shame... ProcessWire is such a brilliant and powerful tool. I've been working with PW extensively for several years now and still sometimes get the feeling that I'm just scratching the surface... And with all that power and complexity (beauty) behind the scenes ProcessWire still looks like something that even an intern can read and understand at first sight. How genius is that? And how wrong is this guy with his judgement?! But I can't blame him. I was in the same situation 8 years ago... I think that is a quite common reaction. And I wonder if we could do something about that. Or if we should? I don't know ?
    3 points
  2. Hi @kongondo, that is really very simple. Sometimes I can't see the forest for the trees ? Thank you very much!
    1 point
  3. 1 point
  4. Yeah I was just wondering if "we" could/should change something in "our" communication... Maybe something like this: ?
    1 point
  5. Yes .... 1) It is very hard to compare PW with other cms systems and 2) It takes a lot of PW use to begin to see the appliance potential of it ..... and 3) because most reviewers simply do not spend time with 1) and 2) their reviews are based on habitual thinking they have grown with other cms systems ....
    1 point
  6. Another German Processwire „Review“ “When web development has to be quick“: https://www.golem.de/news/processwire-wenn-webentwicklung-schnell-gehen-muss-2209-167784.html
    1 point
  7. Yeah, but maybe not quite. From the thread I linked to, I see that there was an issue about saving things. My guess is that this is still happening, somehow. My theory is that something in ProcessWire 3.0.204 is preventing Padloper from saving the process module settings and maybe other stuff during the install process. Because nothing is saved, Padloper redirects back to the configuration page, and round and round we go...
    1 point
  8. Look at this example. Its made with the old version of RestAPI first made by @thomasaull years ago. To get the context, you can navigate to https://kingspark.fr and https://valideur.mykingspark.fr . I am speaking about a system which give the possibility to some of our client use their mobile or a barcode scanner device to give "free of charge parking" of their customer. Its composed with custom hardware, software and devices or mobile apps (you see it on GooglePlay). Image #1: List of Parkings // Image #2: The custom made SAGAS Terminal // Image 3: A configured User / Device available for registration and use. On the first picture, you can see a list of "Parkings", and some can have the "Valideur" functionality. We can configure attached devices and some users with specific role to get access for registration. And then, imagine the following. A customer land on the parking, grab a ticket and go to their rendezvous At the end, the guy in the office use his "Barcode Scanner" to "validate" the ticket of the customer; This mean that the customer will not pay anything when landing on the terminal to exit the parking, and when he will present the ticket on the barcode-reader installed on the terminal (the "black hole" you can see on the center in the picture), it will be recognized by another software and thought a call on ProcessWire Rest API backend. I made you two screencasts, the first is the software which once installed and registered, get the quota (number of validation available) from the user assigned to the license-code, and the second is my mobile which get notification sent from ProcessWire (by this module) from a monitoring system to get real-time information on registration. If you have any question, do not hesitate. There a more example, but you should get the whole idea ?
    1 point
  9. Check this one out: Processwire on the web with wirekit - - - https://bestofphp.com/repo/kreativan-wirekit-core https://github.com/kreativan/wirekit-core https://start.wirekit.dev/core/wirekit/ui/
    1 point
  10. Another nice one from today: Imagine you are on a blog overview page and you want to provide a link for your clients to directly add a new blog post (if they are allowed to): <a n:if="$page->addable()" href="{$pages->get(2)->url}page/add/?parent_id={$page}" > Add new blog-item </a>
    1 point
  11. In regards to dev vs live htaccess, you can also use htaccess's "if" conditional for blocks of code you want to selectively enable/disable depending on the site being loaded. By doing so, you don't need two separate htaccess files to maintain. When using ProCache combined with it's htaccess recommendations at the top, I wrap it inside a conditional like this: ################################################################################################# # ProcessWire ProCache recommended .htaccess tweaks for expires and gzip performance settings. # PWPC-3.0 Keep this line here for ProCache identification purposes. ################################################################################################# <If "%{HTTP_HOST} == 'my-live-website.com'"> ...the code here... </If>
    1 point
  12. Hi LAPS, based on the error message it appears the file your function lives in is not namespaced. So your type-hint Page $item is telling PHP that you expect an object of the class Page in the global namespace. All ProcessWire classes are in the Processwire namespace (check out the namespace declaration at the top of any given core PHP file). So you need to type-hint against the class in that namespace: function functionName(\Processwire\Page $item) { //... } Alternatively, you can alias the Page class for the file with your function, or put that file in the Processwire namespace itself. At the top of the PHP file, add one of those: // importing the Page class, this tells PHP that `Page` should be interpretated as `\Processwire\Page` <?php use \Processwire\Page; // namespacing the file itself, so ´Page´ will resolve to ´\Processwire\Page´ <?php namespace Processwire; Hope this works for you. Cheers!
    1 point
  13. This probably needs to happen inside an autoload module's constructor as module init / init.php is likely too late. Wire() is already available at that time. Here's a little PoC snippet: public function __construct() { $this->addHookBefore("Session::init", function(HookEvent $event) { // fill the data backpack with whatever you extract from the // external session: $this->wire('dataBackpack', ["some" => "thing"]); }); $this->addHookAfter("Session::init", function(HookEvent $event) { foreach($this->wire('dataBackpack') as $k => $v) { // set the retrieved data as session properties: $event->object->set($k, $v); } }); }
    1 point
×
×
  • Create New...