Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/27/2019 in all areas

  1. as discussed yesterday this wasn't the last Wireabend-Bier (perfect wording @marcus!) in Berlin. I am looking forward to meet more of you in the future with another beer ?
    2 points
  2. Just add a checkbox to the pages that should be shown (or should not be shown, whatever makes more sense) and exclude/include those pages in all your selectors $selector = [ 'template' => 'blogpost', // and so on ]; if($config->httpHost == 'yourdomain.de') { $selector['show_de'] = true; } $pages->find($selector);
    2 points
  3. I don't know yet. I've had a glance at firebase for maybe 3 minutes. From what I've seen documents have several fields just like pw pages have several fields. Only difference is that pw has a defined set of fields (defined in templates) whereas firebase documents can hold any kind of key-value-pairs. That's what makes firebase complicated to use (what they told me - maybe there are already ways to handle this better and they/we just don't know about it yet). I guess this would be firebase because they integrate everything with it (mobile app, other services etc). But I thought of even not storing data in PW at all. The more I do in the backend the more I'm using ProcessModules for many things. I think it should be quite easy to write an own process module that just provides an interface for the input (several fields) that sends that data to firebase on submit (via processInput, error handling built in).
    2 points
  4. You could employ PHP's flock function both in the code that updates your JSON file and the lazy cron script, though you have to at least consider how it will affect execution time for concurrent requests that have to wait until existing locks have been released. Rule of thumb: lock late, release early, i.e. try to perform all processing before you lock the file, then lock, update, release.
    2 points
  5. Building lots of process modules? This snippet might be something for you (hit ctrl+shift+p and type "snippets" and create/edit php.json): And one for creating the execute methods. I'm almost always rendering forms in those methods, no standard html, so this makes me more efficient:
    2 points
  6. My normal take on this is adding a normal checkbox field to the template (even though I guess it's an overkill ). That way on Pages::saved I can check for the value and reset it to unchecked saving only the field. Probably adding the field through an "after" hook on ProcessPageEdit::buildForm (or buildFormContent) as it returns the object that has the form fields so you can go through them and add other stuff you might need. Though I wouldn't know on which other hook I could catch it to process the input. (for example, I don't know if the data from this fake field would reach Pages::saved or even create an error).
    1 point
  7. I also ended up using Windows + Laragon. For even more convenience I edited the index.php file in the www folder. When clicking on the Web button in the Laragon interface it shows me all websites and shops I am working on in a nice organized table.
    1 point
  8. Is the school perhaps using Microsoft Office365? Then it is possible that the emails get blocked by Microsoft's spam-filter.
    1 point
  9. I've just noticed this: https://devilbox.readthedocs.io/en/latest/examples/setup-processwire.html The ProcessWire recipe is missing here: https://docs.lando.dev/config/recipes.html#supported-recipes
    1 point
  10. How would you map the Firebase data? Each collections / document would represent a page in pw? So you would need some kind of sync tasks which are triggerd on save / trash / publish and maybe a full sync job x times. And what should be the single source of truth? Firebase or ProcessWire?
    1 point
  11. You see that there is an error in strings.php: The view variable is not set, and you try to modify a property of an object that isn't there. The view variable is available after the TemplateEngineFactory module is loaded. And make sure that in the settings of TemplateEngineFactory "API variable to interact with the view" is set to "view". So maybe you have to change the load order when strings.php is included.
    1 point
  12. define "bloat". In your CSS or HTML? Because this surely looks ugly to me: <a href="#" class="no-underline text-black flex items-center cursor-pointer font-mono bg-blue-grey-50 block p-1 pl-2 rounded-tl rounded-tr border border-blue-100 border-b"><span class="inline-block text-lg font-bold mr-1 text-grey-800"> ^ straight from the Tailwind cheatsheet source code. If this isn't bloat, I don't know what is.
    1 point
  13. I wouldn't call it a manifesto but anyway... let's talk about my workflow. TL;DR I build 90% from scratch. Every time. Each and every project. I don't use frameworks of any flavour.* * except from some JS stuff - see below Long version My boilerplate for new projects: SCSS Skeleton (my personal collection of SCSS Magic) JS Skeleton (my personal collection of JS Magic) HTML/Kit files depending on templates and elements the project needs (inspired by http://bradfrost.com/blog/post/atomic-web-design/) just an empty folder would work totally fine as well Tools I use and need: git Prepros/CodeKit (or ProCache ?) Tools that may be added later (if absolutely necessary): Lazysizes SVGinline jQuery for Slider scripts (slick, OwlCarousel) MixItUp Tools I never use (because I'm too old for that - I guess) Grunt, Gulp, Bower, Webpack, Parcel, ... you get the idea Benefits Projects are portable Projects run everywhere Every part of project can be changed without affecting other things (most of the time) No need for a special setup (at least for the compiled files) Small(est) file sizes and therefore fast websites (in most cases) Downsides Working with others means I have to trust them and their capability to write good CSS/SCSS You have to think at least twice for each step, every time It takes much more time to build everything from scratch It's much more expensive at first Clients often don't understand the benefits and sometimes WANT a Bootstrap website ? FAQ What if you work with others? As mentioned before I have to trust others that they are capable of writing good CSS/SCSS and therefore I tend to work only with very good people I really trust. Is it worth it? Yes! Why? When stuff breaks or needs to be changed, I know where to look, what to change and can do my stuff without the need to take care of any version upgrades, incompatibilities in or with newer version, I don't need a special setup or whatever. AND... if I want to I can still add whatever is needed. Try it the other way around. That's much harder. Are there exceptions? Of course. Backend stuff, admin interfaces and things like - ProcessWire admin is the perfect example. I wouldn't build something like that from scratch. I guess that's my manifesto.
    1 point
  14. Here is another snippet that I use to get rid of unwanted table properties: // Remove unwanted attributes from tables CKEDITOR.on('dialogDefinition', function(ev) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if (dialogName == 'table') { var info = dialogDefinition.getContents('info'); info.remove('txtWidth'); info.remove('txtHeight'); info.remove('txtBorder'); info.remove('txtCellPad'); info.remove('txtSummary'); info.remove('txtCellSpace'); info.remove('cmbAlign'); var advanced = dialogDefinition.getContents('advanced'); advanced.remove('advStyles'); advanced.remove('advId'); //Id attribute advanced.remove('advLangDir'); // writing direction advanced.get('advCSSClasses')['default'] = 'uk-table'; //set default class for table } Put this code inside your custom config.js Best regards
    1 point
  15. 1 point
  16. I use Laragon on Windows... before Laragon, i used XAMPP, but Laragon is much nicer ?
    1 point
×
×
  • Create New...