Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


tpr last won the day on November 14 2019

tpr had the most liked content!

Community Reputation

3,194 Excellent

1 Follower

About tpr

  • Rank
    Hero Member
  • Birthday 06/21/1980

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Budapest, Hungary
  • Interests
    sports, spaghetti, portable applications, and spaghetti

Recent Profile Visitors

8,178 profile views
  1. @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 :))
  2. 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 🙂
  3. Glad you stopped that infectious thing before it could take CTRL of world domination! 🙂
  4. tpr


    Nothing in sight, how could that work? Only setting webp urls, or somehow combined with fallback to non-webp format?
  5. 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.
  6. 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.
  7. 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.
  8. Thanks both, it's been fixed in v2.0.20. Sorry for the inconvenience.
  9. It's not my module but @Robin S's, just to make it clear :)
  10. 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.
  11. 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
  12. I like the developer satisfacion coming through these lines 🙂
  13. Perhaps using something like $str = function { return if (function_exists('__')) { return __('key'); } ), or something along these lines? Just a quick idea from mobile 🙂
  14. tpr


    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...