Jump to content

tpr

Members
  • Posts

    2,321
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. Isn't AdminOnSteroids pagelist tweaks suit your needs? https://github.com/rolandtoth/AdminOnSteroids/wiki/PageListTweaks Show pagelist actions on full row hover: makes pagelist actions visible on hovering anywhere in the pagelist, not only on the page title
  2. I've checked on a site that was using .latte extension and a rather old module version (0.3.7). After the update I had to re-add the admin template check, otherwise I got errors complaining undefined variables, that I set in ready.php. public function ready() { if ($this->wire('page')->template == 'admin') { return; } In theory this could also work: 'autoload' => 'template!=admin', but unfortunately all pages go 404 because PW doesn't find template files (I guess). Furthermore there's a simpler way to set fuels, so the entire "fuels" array item in the getDefaultData() could be deleted: $view->fuel = $this->wire('fuel')->getArray(); I removed the ignored templates module setting and there were no errors. First I emptied and saved it to make sure it's removed from the db. With these settings this particular site was working OK (Tracy as well). Unfortunately I don't have any other sites locally on my computer to but I can copy prod sites and check (all uses .latte).
  3. Thanks, these seem to be useful updates. I'll try to try things out on the weekend. I wouldn't mind if somebody could take over this module. I'm doing asp.net and angular things nowadays and I don't plan to go back to php, and I have no time to jump back and forth, unfortunately. I started a major rewrite that affected filters and macros, namely I built a separate module that contained helper methods that could be used separately and by Latte as well. I added a great number of unit tests (via ProcessNetteTester) but the overall project was halted because of time. I can handle this over as well, though that one is really a time-consuming one ?
  4. Thanks @porl, I need to allocate some time to check the updates, which is not an easy task because I'm outside of the PHP world nowadays. It would be great if the excluded templates settings could be eliminated. What I'm concerned is that does it work OK with setting template extension to .latte besides .php as well? Plus since you were changing latte.php, wouldn't that mean update issues?
  5. @porl I don't think there is. The exclude templates feature had caused some troubles in the past, perhaps it would be better to use an include templates feature instead, or some kind of naming convention (eg. basic-page.tlr.latte or .tlr.php, but that doesn't look nice)?
  6. I would just probably add a new ckeditor span with a class so editors could apply manually. That would also allow excluding headlines.
  7. Check x-requested-with here: https://en.m.wikipedia.org/wiki/XMLHttpRequest
  8. Try $this->wire("page")->feel(). It's not FEEL but your $page is not available (null).
  9. 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 ?
  10. @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 :))
  11. 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 ?
  12. Glad you stopped that infectious thing before it could take CTRL of world domination! ?
  13. tpr

    MarkupSrcSet

    Nothing in sight, how could that work? Only setting webp urls, or somehow combined with fallback to non-webp format?
  14. 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.
  15. 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.
  16. 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.
  17. Thanks both, it's been fixed in v2.0.20. Sorry for the inconvenience.
  18. It's not my module but @Robin S's, just to make it clear :)
  19. 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.
  20. 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
  21. I like the developer satisfacion coming through these lines ?
  22. Perhaps using something like $str = function { return if (function_exists('__')) { return __('key'); } ), or something along these lines? Just a quick idea from mobile ?
  23. 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.
×
×
  • Create New...