Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/21/2020 in all areas

  1. Although you can't create a global field, you can access fields from any page on any template, so you could create a settings 'page' that isn't visible on the site, but holds any fields that you want to use globally, and then access them in every template eg: $global = $pages->get('name=settings'); echo $global->myfield; Remember that in Processwire, everything is a 'page', but it doesn't have to be an actual visible page on your site.
    4 points
  2. If we check the reviewer website (https://dougmcarthur.net/) then we understand why he sees the Processwire environment so difficult and complicated, even for Wordpress standards this website is very simple: a theme template and a couple of posts. Additionally for that plain homepage in the "recommended" Wordpress it needs: Fully Loaded Time: 9.4s Total Page Size: 5.68MB Requests: 52
    2 points
  3. UPDATE 2020-01-19 This is a follow-up to my last post! The question was asked when v3 of the cart system will be implemented in SnipWire. The following features are still missing in Snipcart v3: Digital goods Google Analytics integration Inventory management Deferred payments Multi-currency Recurring subscriptions with Stripe Authorize.net support Some of the listed features are required by SnipWire as they are essential and would require a lot of code rewrites to exclude them. So SnipWire will be changed to use v3 of the cart system when the following features are available in Snipcart: Inventory management Deferred payments Multi-currency
    2 points
  4. Compared with v2, Snipcart v3 is still not feature complete. Some parts are missing as far as I know. At the moment I don’t know exactly what’s still missing but as soon as v3 is complete, I’ll definitely implement this - or even make it configurable to switch between versions.
    2 points
  5. You might want to also validate the date when the page is saved as @BitPoet suggests, but it is possible to limit the datepicker to only future dates with some custom admin JS. The relevant option is minDate. The core sets the datepicker options on focus, so to ensure the custom option doesn't get overwritten I've found that the most reliable way to apply it is by using a beforeShow function. For a Datetime field named "crondate": $(function() { $('#Inputfield_crondate').on('focus', function() { $(this).datepicker('option', 'beforeShow', function() { return { minDate: 0 }; }); }); }); Edit: just noticed you want a minimum time also. Try this: $(function() { $('#Inputfield_crondate').on('focus', function() { $(this).datepicker('option', 'beforeShow', function() { return { minDate: 0, minDateTime: new Date(new Date().getTime() + 30 * 60000) }; }); }); });
    2 points
  6. I needed the same thing so i used Selectize inputfield single for the master select and then a select multiple on the dependent select, then i initialized the 2nd one using Selectize JS; the JS is not so hard, but you do need to have a custom select multiple that has a data-parent attribute on each option; those are filtered to match the selected option in the 'parent' select. Eventually this will make it into InputfieldSelectize somehow, but for now it's just done by adding JS, courtesy of AdminCustomFiles.. In the screen capture, you will see the left select, which may or may not have child pages; if it does, then the right one shows the children:
    2 points
  7. That's why I said I'm lucky. All my PW sites are "in the house" and my "clients" are my colleagues at work and they do what I say :-) I see. My "customers" are 95% from Slovenia so I don't have to worry about that, luckily. I haven't implemented webp on my sites so I didn't think about that because I just recently upgraded to PW that has webp support. On my sites images are rarely inserted into RTE. If this is the case then you may be better of using .htaccess strategy.
    1 point
  8. Yes. I think you should go with webp using strategy 3 (using <picture>). Be aware that, based on my testing, webp image is not always smaller so I had to set quality to 80. On my sites, I don't use Autosmush because my editors prepare/optimize images before uploading them to PW and I serve them as original, I don't resize/optimize them. I consider myself very lucky in that regard as I know it can't be that easy with other clients. My opinion on optimizing assets (js/css/images/html) has changed lately. I used to be very pedantic on every byte I could shave off. But now? Do I care much if my css is 30% larger/smaller (in term of download speed)? Not really. Do I care if my image is 500k or 300k? No. We are in 2020. Free WiFi everywhere (at least here in Slovenia) and fast enough. WiFi 6 on the way. LTE/4G everywhere and fast enough (and practically free). 5G on the go. Web servers gzip content. Browsers use cache. What I do hate is javascript slowing down my web browsing experience, making the content reflow, serving me ads. So I browse with no js most of the time. I went off topic, sorry...
    1 point
  9. Well, maybe "breakpoint" is not the right word, i.e. the code won't stop to process like in JS dev tools. But you can dump all kinds of stuff with d($doc) inside the template. Then you'll quickly see e.g. if a var doesn't contain what you thought it should etc. (null, 0 results, nullpage etc.). I'm sure you used it a million ways... What's perhaps a bit misleading in Tracy, is that addBreakpoint() is meant to only be used with the performance panel. So yeah, not exactly the same as adding JS breakpoints in frontend-land ?
    1 point
  10. Damn it! It was just a problem with the email account! I only got access to the mail account with a webmailer and the mail was just flagged as "deleted" but really removed from the server. Now roundcube deleted it ... and everything is working!
    1 point
  11. How does that work with Tracy? ?
    1 point
  12. @Robin S This is terrible. I don’t know how I overlooked it, сause I've looked at this part so many times Thanks!
    1 point
  13. This maybe? if(!isset($options['findAll'])) $options['findAll'] = true; https://processwire.com/api/ref/pages/find/ findAll (boolean): Find all pages with no exclusions, same as "include=all" option (default=false).
    1 point
  14. @felted This module is not installed by default. Go to Module-> Core and install it.
    1 point
  15. Great so see the comments field get an update. Would it be possible to add some modern needs (options? hooks?) for the comments form to be able to include a mandatory GDPR checkbox with some legal text decide which fields from the form are mandatory and which not saving or not saving the IP address with a setting how long to keep those make it easier go apply UIKIT3 to the layout There are existing workarounds in this forum (by modifying a field clone in /site/) but that is a bit hacky i.m.h.o. for those common needs. Also the documentation linked to from the field admin feels a bit dated for all the extra stuff available...
    1 point
  16. You can add your own validation with a small hook in site/ready.php. wire()->addHookAfter("InputfieldDatetime::processInput", null, "validateFuture"); function validateFuture(HookEvent $event) { $field = $event->object; // Make sure to enter the correct name of your field here: if($field->name == "crondate") { // Compare field with current time plus 30s * 1000ms: if($field->value < time() + 30000) { $field->error("Date is not in the future!"); } } } Adapting the datetimepicker isn't easy if possible at all.
    1 point
  17. @tires - sorry this module really isn't seeing much love these days. Pete is long gone and I have never needed to use it so it's hard for me to continue supporting it, especially given that it really needs a new mail library among other things. To get your site working again, I think you probably just need to delete the email with the arabic characters in the subject that is causing the problem. If that's not available, I think you should be ok. It probably shouldn't be too hard to fix the bug though either but we'd need to know what $message['headers']['subject'] is returning - actually, dumping $arr just after line 536 would be best.
    1 point
  18. Definately looking forward for WEBP support :-)
    1 point
  19. @bernhard, many thanks for trying out the module, and for your suggestions and feedback! I will see about implementing the suggestions, especially linking to the Github and Forum topics for anyone who installs it, so that it is easier to grasp how to use it. I'm also hoping to test out the ImageReference field within this and then post example screenshots showing an even more kitchen sink setup, with images etc. Not directly related to your post, but responding more to the general consensus on where and how to create settings pages: I found this module to be most useful in the past couple of years for things like: - Site Schema for a person or business (the fields basically follow the schema.org items; See screenshots below) - Settings for various custom implementations - e.g. api keys, urls, enable/disable features, etc. -- on one site we use this to enable the site manager to choose which comment system to use (Disqus, Facebook etc), and then put in various settings if using Disqus (user id etc) - Theme settings, like you might find on a WordPress theme, stuff like colors, what type of global footer to use, logo selections (using page refs), site title, slogan. It is also a good way to have settings for any custom code you are doing without having to write a module...
    1 point
  20. This is already integrated. Each country (most countries!) has its own locale data (currency symbol, tax rate, provincial/territorial taxes if applicable, tax names, decimal symbol, etc). Tax rates can be overridden per country (and per territory if applicable). This is a frontend issue which you will need to integrate yourself using ProcessWire $language API and your method of detecting customers location (taking into account the various pros and cons of each). This is about shipping zones. It is already built in but you will have to set up the zones yourself including: The shipping countries (and territories if applicable) Shipping rates in that zone, whether they are flat- or price- or quantity- or weight-based Whether you are using shipping classes (e.g. light goods, fragile products, hazardous, bulky, etc) As well as shipping methods (e.g. normal, express, next day, Post Office, etc). Specifying a maximum shipping fee (if you wish) as well as shipping handling fee (optional) Etc The above allow a lot of control straight out of the box. This is about a 3rd-party software. You will have to do the integration yourself using Padloper 2 API (for inventory). Probably not practical in your case, but please note that in Padloper 2 you can manually create an order (or using the API).
    1 point
  21. @ryan, would you consider adding the ability for PW to split database connections for read and write? I think it will be really useful, especially for high-traffic sites. Something like this (https://laravel.com/docs/master/database#using-multiple-database-connections) or WordPress HyperDB (https://wordpress.org/plugins/hyperdb/) Thanks Rudy
    1 point
  22. The way I was able to solve it, is you have to create 2 different api's. One for the front end, where you set restrictions to your domain name. And then another for this module where you set the restriction to your server's ip address. Also, make sure that geocoding api is enabled in google console. Hope this helps.
    1 point
×
×
  • Create New...