Jump to content

Chris Ernovsky

  • Posts

  • Joined

  • Last visited

Everything posted by Chris Ernovsky

  1. Hi Everyone! I'm sorry in advance if my issue was solved somewhere here (haven't found it) but I've stuck with sorting... I've got a field where I put Polish surnames and sorting pages by it displays incorrect results according to Polish alphabet: "ą" shoud be after "a", "ć" after "c" etc. Now these letters are treated like English ones. So for example displayed surnames "Bać, Bąk, Bal" shoud be in order "Bać, Bal, Bąk". My selector is let's say: $guys = $pages->find("template=guy, sort=guy_surname"); And I don't have an idea what to do now and how to change this sorting. I tried to use some PHP sort functions but didn't make it working properly (or at all). Maybe there's a much simpler PW-way solution? Any help or tip? 🙏😳 EDIT: Of course there's a simple solution. 🙈 $guys = $pages->find("template=guy"); $guys->sort("guy_surname", SORT_LOCALE_STRING); Now I'm trying to figure out how to paginate the results AFTER sorting. But that's not crucial for us in this case. EDIT #2: This place is - as always - a den full of treasures. 🤩 I've used PaginatedArray and adapted this code. It allows me to conviniently divide pages with hundreds of items which were sorted properly earlier. 👍
  2. The same in our case. AVIF or JPEG XL?
  3. 😄👍 Just checked it - works properly as well. Any particular reason of resigning from 'find' in $event? My programming skills ends somewhere around 'if' statements and playing with PW selectors... 🙈 Efficiency in queries? Structure of methods?
  4. Dear @bernhard & @Noel Boss, I LOVE this wonderful hook! Works perfectly. Huge thanks! 🥰
  5. I don't know why but the above incrementation line didn't work for me. Using '+= 1' didn't work either. I had 'unsupported operand' errors or a counter couldn't start counting from 0. Maybe it's something with sanitization of integers or PHP version - I don't have such knowledge. BUT at some point I tried shorter '$page->download_counter++' and it works at all scenarios. So my final (working) code looks like this (maybe it can help someone): // $page->download is a field with files // $page->download_counter is an integer field for counting downloads if ($page->download) { $options = array ( 'exit' => true, 'forceDownload' => true ); $page->of(false); $page->download_counter++; $page->save('download_counter'); $page->of(true); wireSendFile($page->download->filename, $options); }
  6. @ryan & @renobird - huge thanks to both of you! We've got 2022 and it's still working perfectly. 👌
  7. Soooo true! In consequence, devs have to follow that and do the same. We have so many WordPress sites which have grown in years and and now they are stupidly patched with our homegrown snippets, patches, hooks, etc. And lots of them have been frozen against updates because of incompatibilities or/and Gutenberg. The only option is to build such a site from the beginning. In some cases we did. The same. I get the idea. I just don't buy the WP way from the very beginning. After 3 years of Gutenberg it doesn't get any better. And this is an opinion of our clients/administrators. I've never liked it so I'm not objective here.
  8. @bernhard, thank you very much for replying! I'm at the same place right now... 😄 It haunts me from time to time to build my own theme with admin structure reorganised a little bit. But I'm not there yet and there are (always...) more important things to do. Anyways, you've made a simple yet powerfool tool to play with styling. I'm already using it and love it. So once again - thank you! 🙌
  9. First of all, many thanks to @bernhard for this fantastic contribution (and for all he's done for PW and the its community). I must say I'm not a big fan of UIkit and prefer Bootstrap by far, especially now with 5.0 version which is so easy to customize thoroughly. I was even thinking about creating BS admin theme for myself (and clients) but - as my dev friend says - time, time, time... I get used to PW UIkit admin theme but it always annoys me with its esthetics and code. Now I've got a very convenient tool for changing few things so thanks a lot for that. I do all by the book, it works fine, I can adjust the look. Not always as I want to but it's caused by my ignorance of UIkit and PW admin theme structure I suppose. The question is: how far can I go this way? Is it only - as mentioned above - a quick method to change some colors OR can I dive in really deep here and change UIkit/theme A LOT to maybe even exchange the whole framework at some point (does it take effect on different parts of PW)? In other words: is it universal way (LESS compiler) or would it be simpler to create a new admin theme (module?) completely?
  10. This is EXACTLY what I had to hear. Thank you! 🤞🙌 I'm open to any new approaches and improvements with .js editing/building as an option. Just don't want to lose my new, beloved home... ☺️
  11. Please... just... don't. 😔 👉 https://wordpress.org/plugins/gutenberg/#reviews We've been there 3 years ago with WP. The same discussion, the same requests. The rest is history... or rather anoying present. I've started using PW because of its bare bone flexibility as a backend and text/content editor (not builder!). I don't know too much about all that PW API magic (which I truly admire) and barely scratch the surface, but that's more than enough to build a lighweight customized website with a desired design (here just customized Bootstrap + few js libraries). I don't need and I don't want any builders for that. Clients are extremely happy with very simplified admin dashboards and some of them ran away from Gutenberg and other WP builders last year. I'm perfectly aware that there are different clients, developers, trends and expectations. I just feel (and see) that we're overcomplicating and overbuilding websites (and tools) these years... Just sighing, Guys... All the best to Ryan and the whole PW Community in 2021!
  12. @MoritzLost - huge thanks! I needed exactly such a link/module to clear all kind of cache. PW 3.0.156, PHP 7.4, OpenLiteSpeed - works like a charm. 👍
  13. @LostKobrakai, thank You for this! I have to split a date/time field into day of week, day, month and time in a loop (an archive of events) and couldn't figure it out. I saw this function at forums several times before but didn't know I can use it with date. Awsome! Thanks again for the tip. 👍
  14. @Greg Lumley, you took every single word out of my mouth... Happy coding, Bro!
  15. @ryan, I know it's an ancient thread, but I'm slowly finishing my first public/client site with PW and this "sort=-sticky" trick has just blown my mind... 😄 I've got few crossing loops with different layouts and was trying to implement some kind of clever sticky mechanism onto all my find/sort structures. I was almost there with checkbox conditions but decided to look around here for a little help. Found this thread, adjusted and put your suggestion into my project and... started to dance and scream. 😂 PW is PHENOMENAL! I'm learning PW API for few weeks intensively and I'm more and more thrilled. Thank You and all Devs so much for this wonderful CMF/CME!
  16. Hi! Thanks a lot for the updates! I took me over a year to finally dig into PW and start to use it in more serious way and I've been doing it for few weeks now. First of all I'm catching up with A LOT of things here and trying to do things properly. Learning to use Git and GitHub for a start... 😉 Now. I've started a new project with PW which will be a base for other projects and our customs solutions. Your package is a gift from heaven here but there are still minor typings errors or tentative translations. I'll try to step up here a little bit and instead of opening an issue I'll try to fork your project and make some commits where necessary. Hope you don't mind such a path. Zdrowych (!!!) i radosnych Świąt Wielkanocnych! 🐣 Pozdrawiam, Krzysztof
  17. Got it! I won't be spamming - I'll open an issue with a list of few things rather. There's still a lot of learnig and experiments ahead of me so if I'll find anything worthy of correcting - I'll let you know. Cheers!
  18. Tomasz, one more thing: what would be the best way/channel for reporting you any typos and mistakes or suggesting different versions of translations? I just get a message: 😉
  19. You were right of course - after upgrading to 3.0.122 (from 3.0.98), everything is displayed correctly in Polish (see the attachment) and works like a charm. Relogging after changing a language also does the trick. Thank you! I'm learning to walk here so please forgive me lack of knowledge. Now I'll try to play around with modifing a ready HTML/CSS/JS template and connecting it to PW. No new projects and no deadlines so far so I can climb that hill at my own pace. One step in a time. 😎 Jeszcze raz bardzo dziękuję za pomoc i pozdrawiam ciepło. Krzysztof
  20. Wonderful! I've found out lately that the translation depands also on a UI administration theme - when default is used it's all translated but with UIkit theme there are several places in English. I assume that it needs to be translated elsewhere (if necessary). For me it's better to work in English but for clients / authors it's of course unacceptable. So once again - thanks a lot! Last weekend I've shown PW few guys in two companies and explained the idea. They are very intrigued and one of them is planning to try it for building a PHP/MySQL app for their company administration. So it's good to know that we don't have start from scratch with translating. Wielkie dzięki i pozdrawiam serdecznie! Krzysztof
  21. Hi @heldercervantes! Just learning PW for few days and studying cases right now. I like your ideas, I like SuperTINY and I love this article. 😁 It's my thoughts exactly right now! Cheers!
  22. Hello @7Studio! I was just curious if there is a newer translation and here we are. Tomek, great job, all is working fine (PW 3.0.98 on localhost). I can see that there are still some phrases in English. I don't know if this has been your choice to leave them like that or was it rather lack of need / time. I'm a newbie here (just converting from WordPress after almost a decade) and still learning everything, but after few weeks I'm planning to build a bigger site with PW and there will be several places that will have to be in Polish. If you need some help with translating - let me know. Pozdrawiam ciepło, Krzysztof
  23. Hi @bernhard! Gutenberg in Wordpress is a dual misconception: Wordpress is known as a blog platform. Yes, you can extend it massively and use it for many different projects but in the end it's mostly about operating with text. It's usually enriched with images and embeds but it's still an article, news, etc. So many authors for so many years just copied and pasted their texts, added few media and with 2-3 clicks published it. Now, doing this simple task with Gutenberg is insanely uneffective: instead one simple menu in editor there are several (hidden) menus everywhere (in every block). And EVERYTHING is a block now - a title, a paragraph, an image, a quote and so on (imagine the amount of additional code it generates!). You have to do absurdly much more things to get the same result and you have to spend much more time to do the simplest task. So maybe Gutenberg is for designers rather? If it's true and if this was the idea (to simplify building content) - there are so many so much better WP site builders and themes (to do so) FOR YEARS! Anybody who wants a one-page site or portfolio just picks up a theme and few plugins and voila. The core blogging mechanism stays safe and ready when necessary. I can understand that Matt, Automattic and the dev-deciders want to turn with WP elsewhere and change the character/purpose of the platform. Their choice (though the style they're doing that is embarrassing). But cutting out all those (millions?) of websites using WP for TEXT PUBLISHING and trying to convince the whole world that Gutenberg is better tool to write an article than TinyMCE or CKEditor is as funny as idiotic. From practical point of view, Gutenberg is incompatible with so many plugins and themes (used stably for years!) that it broke hundreds (thousands?) of websites. Blank sites, errors, bugs everywhere AND in many cases people have no idea where is a problem and what to fix. At my site (mentioned above) I have 50 plugins. Half of them doesn't work or generates errors with Gutenberg. Just take a look at the reviews of Gutenberg (and their dates!) to catch the disaster happening there. I know perfectly from my own experience how such a "click click drag-and-drop magic" approach can be tempting. Probably even using PW at some point (it's still ahead of me!). But it's the whole different way and phillosophy of creating (fast) content. There are all those Wix, Weebly, Spacesqare and Mobirise builders for that. WordPress as it was thought in the beginning shoudn't go that way (that 30% of web share will fall quickly).
  24. Hello Everyone! I'm new here, just signed up. I've discovered PW few days ago (what a shame...) and I'm angry for myself that I lost several years of my life... I'm a homegrown webdeveloper since 2005, started from pure HTML, then e107, Textpattern and from 2008 I work(ed) only with WordPress. I've made over a hundred of sites. Most of them are simple blogs but my main site is quite large (with over a 10k entries and over 100k of media). It's outdated a little bit so I was planning to modify and refresh it lately but then... Gutenberg happened. Gutenberg as an editor is unintuitive, buggy, produces massive problems and it's incompatibile with most of the things I'm using (it seems to be the same story for hundreds of websites built on WP). And though the whole WP community is frustrated and angry, it's been forced with WP 5.0 as the beginning of rebuilding WP as a platform into... hmm... next Wix? I was trying to discuss - my comments were deleted and my account has been blocked (as many others). After 8 years of developing WP... Well... I've frozen the site for updates and started looking elswhere. I have few advanced demands so tried Drupal, then played a little with Craft, Codeigniter and Laravel (I'm not a programmer per se). And after few recommendations I've finally found You. Guys... I'm so thrilled and emotional. I can't stop reading and following tutorials on localhost. PW is THE TOOL I was searching my whole life! I'm going to study everything very carefully and next year I'm going to rebuild slowly (there's no rush) my main site with PW. Back to Gutenberg: I understand where it aims to be and what it tries to accomplish BUT this is wrong on so many levels. As far as I can see, a barebone PW installation is far more flexible and useful then WP with 30 plugins. And obviously you know it perfectly. So I'm begging you: no Gutenberg here... 😉 Cheers to Ryan and Everyone! Greetings from Poland!
  • Create New...