Jump to content

tpr

Members
  • Content Count

    2,288
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. Try $this->wire("page")->feel(). It's not FEEL but your $page is not available (null).
  2. tpr

    Auto Smush

    I guess the remaining 5% of your "clients" should move to Slovenia to be part of that piece of heaven you have there ๐Ÿ™‚
  3. @MilenKo Just a minor issue that caught my eyes: I would "cache" the webp support in eg. config.php so it shouldn't be evaluated on each function call: $config->isWebpSupported = strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false; if($config->isWebpSupported) { // ... or use a static variable inside the function to evaluate only once: function webp_support($imgURL) { static $isWebpSupported = strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false; if($isWebpSupported) { // ... } else { // ... } } Note that I used "!== false" because if "image/webp" is at the beginning, the strpos gives 0, and it's false (not sure if it can be at 0 position, but it's a good practice to use like this imo). (untested, haven't written PHP for months :))
  4. A former experienced colleague of mine put it right (regarding Bootstrap, but applicable here as well): If you don't know coding, it's a bless, if you do, it's a curse ๐Ÿ™‚
  5. Glad you stopped that infectious thing before it could take CTRL of world domination! ๐Ÿ™‚
  6. tpr

    MarkupSrcSet

    Nothing in sight, how could that work? Only setting webp urls, or somehow combined with fallback to non-webp format?
  7. tpr

    Porfolio of Imre Baksa

    Update 2019-11 I'm learning Angular nowadays and this project seemed to be a perfect one for a rewrite. I planned to do that beforehands mainly because of the design and slowliness (frontend issues) anyways. I kept PW as the API source, so I could use the current admin as before. The major change was to remove all template files except for "admin", and added a new "api" template. Of course a bunch of frontend modules were also removed, eg. TemplateLatteReplace. Things are determined in ready.php. There's also a saveMeta() function that creates a meta.json file on the server, that is to be able to dynamically update the Open Graph meta (and page title) in the Angular entry point "index.php" (renamed from "index.php"). See more about this here. There was some unforeseen issues during the development but mostly on the Angular/.htaccess side. ProcessWire itself was easy to handle, my biggest concern was to design the JSON response in an easy-to-process way. Although the initial load may take slightly more time, the speed and responsibility is almost instant afterwards. Images and video thumbs need additional requests but otherwise everything is very snappy. You can read some more about the site on my blog.
  8. I have also used Eleventy to convert some sites to static, used together with Netlify to automate the build and deploy process. It's also a great tool if you need to just generate some complex html (or actually any type of textual document). I even used it to generate .NET model files based on a list of properties to save time.
  9. I see, and it's caused by the template and field edit links submodule. I've tried a few things like prioritizing hooks and changing the execution order but no luck so far.
  10. Thanks both, it's been fixed in v2.0.20. Sorry for the inconvenience.
  11. It's not my module but @Robin S's, just to make it clear :)
  12. Do you have your test files in subdirectories? The breadcrumb should show the subdirectory names (paths). On configurable I meant the "Show breadcrumbs" checkbox above the test list.
  13. Worth mentioning this module here: https://modules.processwire.com/modules/template-field-widths/ GIF: https://user-images.githubusercontent.com/1538852/49207167-0cbef100-f419-11e8-965a-ca46b4f256d1.gif
  14. I like the developer satisfacion coming through these lines ๐Ÿ™‚
  15. Perhaps using something like $str = function { return if (function_exists('__')) { return __('key'); } ), or something along these lines? Just a quick idea from mobile ๐Ÿ™‚
  16. tpr

    SeoMaestro

    Ok, in theory you can circumwent this by creating the missing .latte file and in there include the SeoMaestro module's php file.
  17. tpr

    SeoMaestro

    I see. Unfortunately I don't have this issue but perhaps it's a version mismatch or a result of your template setup (I see "controllers" in the path). I can try to reproduce if you tell these details. Anyway, it's sure not SeoMaestro module's fault, maybe this thread could be merged to the main Latte one?
  18. tpr

    SeoMaestro

    In the Latte module settings add the template name to the excluded templates list.
  19. There already is one, the textarea selector is "textarea:not(.noAutosize)". I haven't checked it yet but in theory it should work. Otherwise you could apply a max-height with CSS that could also help, or perhaps setting the height with !important.
  20. Thanks @Robin S, somehow I thought the built-in one didn't work for CKEditors but it's not true. Just tried it and worked fine for a multi-language field as well, and showed the same values as the CKEditor plugin. According to the CKEditor plugin's documentation it offers more advanced configuration though.
  21. Just add this plugin: https://ckeditor.com/cke4/addon/wordcount Or use AdminOnSteroids module which comtains this plugin.
  22. Thanks, I just used the z-index: 11 you suggested in v2.017. There's a very high z-index on the datepicker calendar div added by AOS that was needed back then. This is still above the masthead on scroll but I think it's better not to change that. There's also a bunch of new CKEditor plugins added in this version: Color Button Color Dialog Table Resize Table Tools Table Tools Toolbar
  23. Just used vex in a project where Kendo UI wasn't available (mostly we use that for admin pages), and it was a very pleasant experience. After all I'm happy that I had to find an alternative, it brings more sophisticated ways to do prompts, confirms, etc.
ร—
ร—
  • Create New...