Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/19/2022 in all areas

  1. Hi all, I was playing around with background video clipped by text to get a nice text effect like https://codepen.io/gebeer/live/wvxweZX In that process I was brushing up knowledge about best compression options for html5 video and came across this very concise article that sums it all up: https://www.kaels-kabbage.com/posts/html5-video-and-images-for-web/ The video in my codepen is 1920x188px 30 seconds at 30fps. The results I got with h264 codec are already pretty good. But with AV1 it is much better. Comparison: original uncompressed: 3.2MB h264 codec: 568KB AV1 codec: 258KB I used Handbrake (ffmpeg) for encoding. For comparison I also tried several cloud services and found https://convertio.co/av1-converter/ to be the most versatile.
    7 points
  2. This should do the trick to get all events from yesterday and the next 6 days. // define yesterday $yesterday = strtotime("-1 day"); // make $yesterday match the saved date format // in this case: dd.mm.yyyy $yesterdayForSelector = date('d.m.Y', $yesterday); // get our pages $events = $pages->find("template=template, limit=7, date>=$yesterdayForSelector");
    3 points
  3. Your frontend doesn't have any styles in regards to present code snippets therefore it's a bit pale. Neither ProcessWire, nor TinyMCE take care of your frontend styling. You could use hightlight.js or other helpers like that. Another option could be looking into the backend code and figure out from where the styles come and use that in the frontend as well.
    2 points
  4. I'm testing TinyMCE and it looks absolutely brilliant! I'll report my findings as they occur ? @ryan it seems you are still not on PHP8? Could you please have a look at DDEV for local development? Using DDEV you can simply switch PHP and DB versions and do "ddev restart". It's such a great tool, it has saved me so much time and headache since I installed it on my laptop one year ago! I've not had a single situation that ddev wasn't able to handle. Want to setup a new project? "ddev config" is all you need to do! You want to test something that sends emails? DDEV has mailhog on board and you can simply launch it via "ddev launch -m" You want to have local dev using HTTPS? ddev creates certificates for you! You want to create JPGs from PDFs on page save? You can add poppler-utils to your web-container config and have the same environment as on the remote server. You can even share your projects with clients using ngrok. You can share your project on the local network to test it on mobile devices. Want to import a db dump? You can import it simply by doing "ddev import-db -f site/assets/backups/database/db.sql".
    2 points
  5. The TinyMCE 6 rich text editor opens up a lot of new and useful abilities for ProcessWire users. In this post, we'll take a look at a few of them, and how you can start using them now, with a focus on those that are unique to ProcessWire's implementation of TinyMCE— https://processwire.com/blog/posts/using-tinymce-6-in-processwire/
    1 point
  6. Hi there, Now that I have a functioning padloper installation I have my first real challenge. One that actually might be a bit tricky. Maybe too tricky? The client wants to sell workshops for kids, and give discounts for siblings, X% for the first sibling and Y% for two or more siblings. What's the best way for me to go about this? many thanks for your thoughts, J
    1 point
  7. Hello all, Since https://processwire.com/docs/tutorials/using-custom-page-types-in-processwire/ came out, I used to implement custom page classes as modules, following the principles described in that tutorial. Now only a few weeks ago I stumbled across https://processwire.com/blog/posts/pw-3.0.152/#new-ability-to-specify-custom-page-classes. This seems to me a much cleaner and easier way of implementation. Though it restricts the naming of custom classes to the naming conventions for the class loader. Other than that I can't really see any more disadvantages. Which way do you prefer and why? On a side note, useful features like described in the second link often can only be found in @ryans core update blog posts. If you don't read them on a regular basis, those new features are easy to miss. I'd love to see those hidden gems find their way into the API reference in more detail. Although $config->usePageClasses is documented at https://processwire.com/api/ref/config/, I think it would deserve its own page with all the explanations from the blog post.
    1 point
  8. Many thx @wbmnfktr. Hightlight.js is working perfectly. Result frontend:
    1 point
  9. @DV-JF https://github.com/processwire/processwire-requests/issues/239
    1 point
  10. Nice, it works great. Now only the datetime and putting in the trash. Defining the $yesterday simple. Thank you very much ;)
    1 point
  11. For some more info, I've attached a small truth table as to what is possible in the page lister for the editor in question (first Lister filter set to template = template editor can edit). It shows that, although the 'hidden' filter works ok when used independently, setting the page to 'Unpublished' means they don't show when the page is unpublished and this overrides the 'hidden' filter too so that pages that are both hidden and unpublished are not listed, even when the page is set to hidden and the filter is set to show pages that are hidden. Again, any help is really appreciated.
    1 point
  12. Ha, that was it. Too low amount. Now I have a fully functional proof of concept setup. Very nice. Now the error message is very clear, it says that it's a test setup. The previous more generic error was due to the low amount.
    1 point
  13. Hi @Stefanowitsch, I've used this UIkit implementation in a few recent projects, I wrote up how I did it here: Hope that helps! Cheers, Chris
    1 point
  14. thank you @BrendonKoz In the end I fixed by changing the server provider. I can't make change in the php ini in OVH. so, just fixed by go back to site ground.
    1 point
  15. Hello @kongondo, I have added a checkbox field to the media-manager-image template but cannot choose it as a custom column. Guess this matter is about supported field types for custom columns. Fieldtype Checkbox seems not to be supported. It is supported in normal listers, though. Would it be possible to add support? And is there a list of the supported field types? EDIT: If I add the field id manually to the MM settings JSON, the column appears in the image lister, but not in the Settings ASM Select
    1 point
  16. Hey @ryan I've managed to find a way to get a minimal tinymce field using this very simple json: { "menubar": false, "toolbar": "bold", "toolbar_sticky": true } Result: This is very nice and what I want! The problem: I need to set the JSON globally for ALL tinymce fields: Would it be possible to add an option to set the defaults.json file on a field level? This would be extremely helpful (necessary) for module development where one wants to ship fields with a custom set of options. It's also a lot easier to create fields where the settings are defined in code (GIT!) rather than via gui. Another benefit would be that the core (or a module) could ship different versions of defaults (eg minimal.json, simple.json, default.json) that a field could use and extend on them rather than on global defaults. Thx!
    1 point
  17. Just being able to specify styles right within settings is a monster feature alone. My goodness that is sweet. Thanks for your hard work on this. And the post is excellent. I love your clear and thorough writing.
    1 point
  18. Great stuff Ryan! Maybe you want to link to this blog post on the module's readme? https://processwire.com/modules/inputfield-tiny-mce/ OK I'm through the post and there's lots of great informations in it! Thx a lot! I'm wondering if there is an easy way of making a field have a minimal setup? The default.json with its merge features looks great for regular text fields. But what I often need is to have text fields that only allow the user to add two things: add line breaks and make some words bold. That's useful for my page builder where I have blocks for a very specific purpose (like inserting a multiline headline). Is there an easy way to setup such a field without having to manually remove all defaults? Another thing: really great stuff with the css styling feature!! What I wondered here is how we could add multilingual labels for our editor styles? Maybe something like this? (sorry on mobile) /* en = Red paragraph */ /* de = Roter Absatz /*
    1 point
  19. This is perfect. I've thought of an enhancement to RockMigrations that would be useful because I'm lazy. In the showCopyCode method, instead of copying and pasting, an additional option would be an 'export' button, and a path field. I'd still need to write a migration file, as the order of field and template migrations is important, but if I simply list the fields and templates as includes in order, then it would make the migration file more concise, and I could still trigger a migration by updating version details of file, but without having to keep copying and pasting into a file. eg, if I want the definition for myTextField to be associated with ProcessHelloWorldModule, then I could set a path site/modules/ProcessHelloWorldModule/fields/ and dump the definition there by button click. I've been having a play and here's a mockup although it doesn't do anything yet. I'm not sure whether it actually needs its own save button, or whether to hook into saving the field and save the RockMigrations code to the path specified. I've never worked with modifying field/template editing before, so I'm not sure how to persist the save path. Of course I can do this manually, by copying and pasting each field and template definition into its own file but I think this might be a time saver for people who like to use the UI, but also want to use migrations.
    1 point
  20. https://github.com/processwire/processwire-issues/issues/1633
    1 point
  21. The latest site of the week reminded me of https://senderkataster.rtr.at/ that I built with a friend some time ago and that I want to share. Tech: ProcessWire (obviously) https://getuikit.com/ (also quite obvious ? ) https://tabulator.info/ for all kinds of filters https://leafletjs.com/ for the map https://basemap.at/ using an Open Government Data License Some GDAL command line magic to transform the overlay source data into PNGs that are stored in ProcessWire pages and can then be queried and correctly placed on the map. ProcessWire has been a great platform for that project! If you need help with a ProcessWire project that needs some geo-magic or powerful web maps drop me line ? I'm not responsible for the red background ? Show details of a tower Choose a program by name or type and show its radio coverage (not in the screenshot): Expert mode for nerds:
    1 point
  22. Hi @Roope, thanks for letting us know! I'm fixing some issues and would provide PRs as soon as I have found a working solution. Spoiler: the regex way of looking for addresses runs into a memory/performance issues on pages containing a lot of code.
    1 point
  23. Just to clarify... I didn't want to make repeaters bad. RockMatrix is based on repeaters and it is absolutely great (for flexible page building). But what I found is that Repeaters are not my first choice when it comes to storing data. For example I've built a survey tool where I saved all the votes in a repeater field of the survey template. That sounded good because every vote belongs to the survey and in the admin gui you can easily inspect all the votes and you can easily loop through all of them via foreach($page->votes as $vote)... So far so good, but then I needed to do complicated calculations and it turned out that would have been a lot easier and more efficient if all the votes had been pages under one parent. Selectors would have been easier, calculations could have easily done in SQL rather than looping all the results in PHP (because you need the parent/child relationship which is easily available in PHP/in memory but not so easy to get from the DB/SQL). What I said might not be 100% accurate and there might have been good solutions even with repeaters, but I had troubles back then and I now have to tools to display all kinds of page data easily and in a great way using RockGrid. Because that's the other side of the coin: If you store everything in pages under one parent it might need a little more thinking where and how you present things. That's obviously easier with repeaters...
    1 point
  24. I published a generic module with some examples at https://github.com/gebeer/CustomPageTypes Happy visual learning ?
    1 point
  25. This works for me: $store->getUnformatted('products');
    1 point
×
×
  • Create New...