Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/24/2025 in all areas

  1. Example: foreach($list_of_cards as $card){ // cache cleared then selector matches $files->render("inc/some-include", $vars , ["cache" => "template=some_template", "name" => "template_cache_{$card->id}"]) } Available since version 3.0.130
    3 points
  2. Since it is new install I do not have yet. I will install Tracy and also look in tables - I have webmin on machine so I could use its direct interface to admin MySQL. I will let you know
    1 point
  3. You're right @monollonom, it doesn't seem to cache per render per call which would be the most useful case! Looking at the usage in TemplateFile class, it seems the options passed to render() get passed on to $cache->renderFile(), where we can pass on the name paremeter to specify a unique cache name. Updated the example! I had a very simple case where I was delegating the rendering of list items to another file and I was very surprised how slow everything turned, ProfilerPro was very usefull figuring this out. It wasn't even a big list, just like 40-50 items. I kept debugging what was inside the include file until finally figuring out it was the render() call that killed performance.
    1 point
  4. Thanks for sharing, I should look into this as I also use this a lot. Does it cache per file or per render call? Or maybe you have a unique name in your $vars?
    1 point
  5. I only use the API key in Curl requests and that works perfectly. (PHP-Session) $url = "API-URL"; $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HTTPHEADER, array('x-api-key: *******************')); $data = curl_exec($curl);
    1 point
  6. Can confirm, that pages()->getFresh($page) works as well. The $page->get('field', 'sanitizer_method', 'default') was accidentally taken over from an $input->get call. Fixed it in my example code above. Thanks.
    1 point
  7. Hello everyone, I'm excited to announce that Version 1.0 of ProcessTranslatePage is now available on GitHub: https://github.com/robertweiss/ProcessTranslatePage Please note that there are some breaking changes in this update. I recommend uninstalling and then reinstalling the module to ensure everything works smoothly. You can use the same DeepL API key that you use with Fluency. After installation, you will (hopefully) see two new fields for the language template. However, only the ⁠'translate_locale' field is required for the module to function properly. Thanks for your patience, I hope you find this update useful!
    1 point
  8. @ryan maybe it would be good to make existing installs use the old style and new installs use the new one by default?
    1 point
  9. Hello, After spending a week with the new admin theme, my feeling is that it is definitely a step in the right direction, making the admin feel more like an application, and many thanks to all who've worked to get it where it is. That said, there's quite a few issues I and the team here have picked up on. Most of these have been highlighted already. Here's some observations interspersed with some issues: Page Tree A number of colleagues have commented on the removal of the 'lines' on the page tree. I much prefer the new look, but it may be useful to have the option to toggle this on/off. I also like the 'text' style of the action buttons, but feel a more button-like style on hover would help. Colouring Something I'm not keen on is the lack of colour for the messages. Having the primary alert colour being the same as the background makes it hard to notice. We think the background colour (#eee) in light mode is too dark. #fafafa feels better. I also miss the colour of AsmSelect items. Having these in grey makes them blend in too much. Dark mode I prefer dark mode, but I've found myself switching to light mode on all the installs I've worked on. I can't pin down the problem though. It might be that the muted grey background makes the actual UI (fieldsets) too stark. It doesn't feel right. I agree with other comments that there needs to be an ability to customise the logo and colour for both modes. The installer needs to be tested in dark mode. All the input text is white on an input on a white background! (longest, most frustrating PW install ever!) Colour picker I think there should be at least two more fields beside the colour picker input, one for HEX value, and another for RGB. Editing one updates the others. On Safari, the native colour picker doesn't give you the option to input a value so I needed to login on Chrome to set the value I actually wanted. ... My main concern with this is the rollout when this reaches the master branch. We have a setup where we can update all PW sites on a server at once, and as it stands I think we'll need to go into each site to specify light mode. We want the rollout to be successful with our clients, and we'd prefer to adopt the new theme gradually, as and when we're working on a site. I think retaining the original UIkit theme as the default should be considered. Cheers, Chris
    1 point
×
×
  • Create New...