Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/27/2024 in all areas

  1. This module allows you to add Cloudflare's Turnstile CAPTCHA to your website, providing a user-friendly alternative to Google's reCAPTCHA. It is based on MarkupGoogleRecaptcha, allowing for easy switching between the two CAPTCHA systems. If MarkupGoogleRecaptcha is installed, some of its settings are used to configure Turnstile. https://github.com/nbcommunication/MarkupCloudflareTurnstile We've used reCAPTCHA for many years now but have found that it isn't as effective as it should be in reducing spam. It is also pretty annoying. We've recently switched a couple of our 'bigger' sites to use Turnstile (using this module) as the sites were on Cloudflare already. It is definitely a much friendlier captcha for users, still to determine whether it is better at preventing spam, but I expect it will be. Cheers, Chris
    5 points
  2. Meta are disabling the Instagram Basic Display API on December 4th, 2024. After this point, the InstagramBasicDisplayApi module will no longer function. Meta do provide an API that can be used to access Instagram media, Instagram API with Instagram Login. Using this API I've been able to refactor InstagramBasicDisplayApi as a new module called InstagramMediaDisplay: https://github.com/nbcommunication/InstagramMediaDisplay The main caveat with using this module (and API) is that personal and/or private accounts cannot be used. If you try to generate an access token for a personal account, IG will prompt you to upgrade to a business account. As far as I'm aware this is still a free account, and the main limitation is that you cannot use licensed music in the same way you can on a personal account. I have access to various IG accounts, some personal, some business, and I've never noticed a difference. This new module is built to supersede InstagramBasicDisplayApi and its implementation is practically identical. Upgrading should simply be a case of installing, configuring your new Meta app, authorising the same account(s), and updating the call to the previous module to call this one: <?php // $instagram = $modules->get('InstagramBasicDisplayApi'); $instagram = $modules->get('InstagramMediaDisplay'); Cheers, Chris
    3 points
  3. Thx @wbmnfktr for taking on ProcessWire Recipes and the time for caring and asking this questions! To be honest.. Yes, I would expect (and maybe even demand😇) that ProcessWire related projects like this are built with ProcessWire itself. Especially for sites with structured and tagged content like on ProcessWire Recipes, PW is predestined, I think.😉🙋‍♂️
    3 points
  4. Two things I would try and check: double check your page reference field allows the creation of new pages and all settings are correct - including parent and template settings try to save after the tag was added. Either with $page->save(); or $page->save('your_field_name')
    2 points
  5. Any particular reason for this curly brackets syntax? I’m far from a PHP pro but I’ve never seen that and $assetPage->content_tags->add($tagPage) should suffice. I might look at your code again later when I’m on desktop. Also, might be obvious, but make sure you save the tagPages before adding them 😅
    2 points
  6. These videos are so much work 🙈 I have tried a different software and a different technique. What do you think?
    2 points
  7. So... I just used this module in ProcessWire 3.0.241 and it works just perfect. Yet the above statement seems to be not correct anymore. Opened up some pages and I find a truck load of new empty directories in /site/assets/files/ again. Is it because the image field of those pages has a fallback image defined or did the default behaviour in ProcessWire change in those regards in the last 12 years? Wouldn't consider this as a bug. Just curious.
    1 point
  8. Using those aliases for DDEV, Git, RockShell makes the first 2.5 minutes kind of... blurry or a blackbox or something. Even though I know how to install ProcessWire with a custom site profile I had to watch it a few times to understand whats happening. While I use DDEV, I use way different aliases, i don't use RockShell, and so on. It felt a bit like installing Laravel or CraftCMS to me - so many different moving bits and I don't know or can't really follow as I don't have or use the tools and can't see what really happens. As mentioned elsewhere: I love the fact ProcessWire has still ZIP files and don't relies on composer to install something. It would have been nice to see a slide with the full DDEV command, a screen with the Github page and URL to see where I can get the profile as ZIP. After that I would have preferred to see a full clean install with unzipping a site profile, dragging it into the docroot, and go from there. If I were new to ProcessWire this would have freaked me out in terms of: that's a lot of hoops I have to jump through.
    1 point
  9. I'm still personally having trouble properly understanding the vision of where the problem is. SIA has seen the car example (at least one of them, there are a few). I understand that there are potential hierarchies of some sort of data, but how that data relates to individual plants/pages, to other levels within the hierarchy, and how SIA is envisioning the page tree to look, it's hard to make any recommendations. 😞 Maybe the first hierarchical level in the page tree is the CATALOG (version/periodical?). These are individual entries that are the (only?) allowed children of HOME. Allowed children of CATALOG would then be GROUPs (though I'm not sure what this is a group of or how it relates to CATALOG or CATEGORY). CATEGORY is next, so it's the only allowed child of GROUP. Since we're talking about PLANTS, I'm not sure what "Category" relates to within GROUP or how it is defined. I would think make genus, or species, or type of plant as defined by the organization (Annual, Perennial... Perhaps the hardiness zone? Seed or Bulb?) That's a lot of clicking to get to specific (plants?) items within the site, but it does limit the amount of difficulty in finding specific items within a page tree containing 10,000 items under a single node. ... There are ways that the above defined data hierarchy could be architected within ProcessWire so that it is not as rigid as mentioned. Fields used as attributes (ex: tagging) can go a long way here, along with what @Ivan Gretsky mentions in the Listers to offer secondary predefined navigation options to supplement the page tree. There's also the very powerful admin live search which can even be customized. That is extremely quick, assuming an item's title is already known. I would like to make clear that if you're more confident in your use of WordPress and already understand how you would build that site out using that tool, then it may be a better option for you. I'm trying to understand the more nuanced parts of this particular job request in order to give some possible suggestions of how ProcessWire could be used to mimic what you'd get out of WordPress as they can be, for most scenarios, used interchangeably (with the limitation on custom plugins and/or themes).
    1 point
  10. Adding all pages and then saving is the way to go. ProcessWire’s arrays have change tracking so they’ll know which items were added or removed. You can dump the field before saving and you should see a property called "added" or some such that lists them. Try TracyDebugger’s bd() method (recommended!) or just var_dump().
    1 point
  11. It seems that you're seeing the main problem in those plants' pages presentation in admin. You do not want to see all those 10 thousand pages in a tree. I can relate to that. One possible solution would be to use Page Lister. This way you would see all those pages in a list no matter where they are in a tree. You would be able to search those pages by any their fields. Basic version is included in the core (see the screenshot below). A more powerful Pro version is a cool thing to have though and 100% worth its money. You can still have the pages in the tree hierarchy, or have all the plants under one common parent and linked to categories via page reference fields.
    1 point
  12. Thanks for this. It probably shouldn't be too hard to adapt Ryan's InputfiledFormBuilderRecaptcha to use Cloudflare as well. I just read an article today stating that bots can now defeat pretty much all of those visual captchas that ask to identify what squares contain a given object, so this is quite timely.
    1 point
  13. Just added docs to https://www.baumrock.com/en/processwire/modules/rockcolorpicker/docs/ with lots of examples and added some minor improvements 🙂
    1 point
  14. If the question was never asked, I wouldn't have wondered. I do agree that if I discovered that a competing, comparable product was used instead of PW (such as WordPress) I'd be dismayed, but when the technical demands are different and a familiar tool seems like a better fit - no, I think that a lot of the decisions with ProcessWire is that simpler is often better and not to overcomplicate things: use the tool that you're familiar with that fits the solution best. If server costs were a concern and your home internet is stable enough, you could run a Raspberry Pi (5) as a webserver to run PW and MySQL inside of a Docker container and merge the backend with the frontend as flydev suggested. That seems like overkill simply to involve PW though? If there was a technical reason to use PW in the mix beyond what is currently offered, then that would be the time to do so!
    1 point
  15. I didn't touch them at all. Those are available through Astro: View Transitions You can however take a look at the source code - the CSS is inlined there. Look for: data-astro-transition-scope
    1 point
  16. The page transitions are very cool. Do you have any details about how you built those?
    1 point
  17. Updated the post to be clear it's an example and varies depending on which modules are used.
    1 point
  18. This <?php echo $map->render($page, 'YOUR MARKER FIELD'); ?> would be this {$map->render($page, 'YOUR MARKER FIELD')} Your error message means, that $map is NULL. That means $map is not available in your latte file for whatever reason. That means you are not struggling with latte syntax, you are struggling with PHP 😉 😛 You can easily debug this via TracyDebugger: {bd($map)} {bd($page)} To help you with your specific problem I'd need more info in where you are trying to use this markup...
    1 point
  19. For such cases, even more readability: $wire->addHookAfter('Pages::saveReady(template=news)', function($event) { // [...] } This way, the hook doesn't even get called if template isn't news. Also, I think you can even get rid of the second guard clause like this: $wire->addHookAfter('Pages::saveReady(template=news,day!=)', function($event) { // [...] } If the page doesn't have a day field, the selector doesn't match and the hook isn't called. This is untested though 😊
    1 point
  20. oh my, it was just a human error, I mixed up the logged-in accounts 🙈 Maybe I need to retire… or just need a vacation 😃
    1 point
  21. Ah, sorry, didn't read carefully enough! Hope it was helpful nonetheless 🙂
    1 point
  22. I hear you. I like it since everything is in one place. At a glance I can see what's going on and decide whether to dig in or not. I have interests in other techs and tools outside PHP and it gives me a nice curated list about those topics. But I agree, it can still be overwhelming 🙂.
    1 point
  23. Thanks Francis, Works wonderfully. I noticed the flat amount is without tax. I would expect it to be included with tax. Both for the end user and the customer. Right now if I set 10,- off, it will actually be 12,1 off. Is this intended behavior?
    1 point
  24. I think for mine what I'll need to do is a diff between the last unaltered source code I have and my code to play "spot the difference" then I can write it in a doc and send it to you. Some were improvements that might be beneficial to all, others were workarounds for very specific things... and others still were files written for you but only for my project so sounds like a bit of a nightmare to update without losing anything (hence why I've been putting it off if I'm honest). I'll need to get it done this month at any rate so I'll let you know. At least when I have the doc I'll also know what to check for on each update.
    1 point
  25. quite biased message Just my two cent's here. I tend to say - yes - just because I see third-party app/websites as a nice showcase on how pw can handle things and how versatile it is. I must admit that on my side I am using pw as second choice for a simple reason, I write websites in pascal (I can remember @LostKobrakai switching to Elixir). But, it's only depending on client needs and profile, and maintainablity. If a client absolutly require a setup based on php to be used with a standard web hosting, then pw come back as the first choice with no doubt. This piece of software is solid and deserve to power thoses tools made for processwire. I would have felt disappointed if weekly.pw was made as static website or worst, on wordpress, imagine. The real decison maker is I think, money. Domain names are more expensives then ever. About hosting, there is a lot of solid companies providing such web hosting, generaly you got 100MB free for ever on OVH or Alwaysdata (the second provide ssh access). For the domains fee's, the community could make some donations. It could be made using built-in page json feature with or without inertiajs and consumed from AstroJS, keeping ci github flow without any problem to let the community collaborte on it. You will won the right to add on the footer "powered by processwire" 🫡😄
    1 point
  26. Wasn't there a module that surfaced this information in the admin? Anyone remember what it was called? I can't find it. Edit: TracyDebugger can do it.
    1 point
  27. Hi, I want to share an easy way to use Stripe Payment Links in processwire website: 1) Upload folder 'stripe-php' in site/templates (attached) 2) Upload file init.php in site/templates (attached) 3) Use variables in template 'product': $xxx = $page->prezzo_interno; $session->set(prod, "$page->title"); $session->set(price, $xxx); 4) Insert a form in the template 'product' 5) Copy ApiKey in Stripe Account 5) Create a template 'checkout' and copy Apikey <?php //include './stripe-php/init.php'; include 'init.php'; //require 'vendor/autoload.php'; Stripe\Stripe::setApiKey('xxxxxxxxxxxxxxxxxxxxxxxxxxxx'); header('Content-Type: application/json'); $YOUR_DOMAIN = 'https://www.dominio.it/'; $checkout_session = \Stripe\Checkout\Session::create([ 'shipping_address_collection' => [ 'allowed_countries' => ['IT'], ], 'shipping_options' => [ [ 'shipping_rate_data' => [ 'type' => 'fixed_amount', 'fixed_amount' => [ 'amount' => 500, 'currency' => 'eur', ], 'display_name' => 'Standard', // Delivers between 5-7 business days 'delivery_estimate' => [ 'minimum' => [ 'unit' => 'business_day', 'value' => 5, ], 'maximum' => [ 'unit' => 'business_day', 'value' => 7, ], ] ] ], [ 'shipping_rate_data' => [ 'type' => 'fixed_amount', 'fixed_amount' => [ 'amount' => 800, 'currency' => 'eur', ], 'display_name' => 'Celere', // Delivers in exactly 1 business day 'delivery_estimate' => [ 'minimum' => [ 'unit' => 'business_day', 'value' => 1, ], 'maximum' => [ 'unit' => 'business_day', 'value' => 3, ], ] ] ], ], 'line_items' => [[ # Provide the exact Price ID (e.g. pr_1234) of the product you want to sell 'name' => $session->get(prod), 'amount' => $session->get(price), 'currency' => 'eur', 'quantity' => 1 ]], 'mode' => 'payment', 'discounts' => [[ 'coupon' => '1', ]], 'success_url' => $YOUR_DOMAIN . 'grazie/', 'cancel_url' => $YOUR_DOMAIN . 'pagamento-rifiutato/', ]); header("HTTP/1.1 303 See Other"); header("Location: " . $checkout_session->url); .. and that's it! I hope it could be useful for everybody here! Bye Archivio.zip
    1 point
  28. Here's a small new module that started as a spinoff of a memcache proof-of-concept. Cache your strings and partials in-memory using Redis as a backend. CacheRedis All you need is a running Redis database. The module supports connection through regular TCP, over TLS and via unix domain sockets. Host and port are configurable, and authentication is supported too. Here's a screenshot of the module configuration options: I'll not go into too many details about the usage, you can see everything explained in the README on GitHub, and just highlight the most important points. When the module is active, you'll have a wired $redis variable, which means you can reach the module as $redis, wire("redis") or within Wire classes / modules as $this->redis. CacheRedis is strongly influenced by WireCache, and its usage is (hopefully) straight forward. // Store an entry in the cache under the given key name with the given value: $redis->store("cached_value_number_one", $expire, $value); // Retrieve a value from the cache $value = $redis->fetch($key); // Delete a cache entry $redis->delete("my_other_cached_value"); // Clear the whole cache $redis->flush(); // Retrieve a value from the cache, and if not found, create it through the given function // and store it with a lifetime of 5 minutes (300 seconds) $value = $redis->fetch($key, 300, function() use($page) { return "Page last changed on " . strftime('%m/%d/%Y %H:%M', $page->modified | $page->created); }); // Render a file using wireRenderFile and store it in the cache. // We'll pass a selector as the expiry value so this cache gets // emptied every time a page matching the selector is saved. $news = $redis->renderFile("partials/news.php", 'template=blog-post', ["page" => $page]); The module is still very crude work in progress, but I hope some of you feel daring, try it out and let me know in case anything breaks. Have fun!
    1 point
  29. Does anybody else feel like the login screen could use a revamp? While it might not be the most important thing in the world, first impressions count. On large(r) screens the login form seems to get lost in the upper third. The rest of the admin looks a lot cleaner and more deliberate. A few tweaks would go a long way in making the login screen work on all device sizes. Those are two custom styles I've been adding to my sites lately, one PW-branded and one not. No markup changes needed, just CSS. This second one borrows heavily from Twill's login screen. The floating environment label has turned out to be really useful to see at a glance if one is editing on staging or live. Not sure if there's a way to make this 100% core compatible.
    1 point
×
×
  • Create New...