Jump to content

tpr

Members
  • Posts

    2,321
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. Anyone having issues with page copying (clone)? I got an ajax loader spinning but error in the console "502 (Bad Gateway)" (JqueryCore.js). The page is cloned successfully though.
  2. Yesterday I had a "Bad gateway" error, perhaps nginx-related, but the new version seems to fixed this too. Unrelated: if you uninstall a module, then settings are gone, right? If so, I could think of a file-based settings file which you could edit by hand, to set you own (custom) defaults which would survive uninstalls. Is it a bad idea, or perhaps there's already something like this?
  3. The error message is pretty verbose... try $this->set('successMessage', '<h2>' . $pages->get(1032)->message_sent . '</h2>');
  4. Thanks, seems like I've missed the key point in TEF or simply messing it up with another module
  5. Well it's not impossible to do but I don't plan such a feature. There's already the module Template Engine Factory which is similar to your concept. And there's also Latte engine for that. AFAIK these modules require Template Data Provider to send variables to view files, which didn't suit to me. Mine is much cleaner, there's a $view variable to which you can add variables to pass to the view (eg. $view->children = $pages->find(...)). This is a global variable so it's accessible from every template file, and works with wireRenderFile too. The latter was the reason to create a module of it Even with Template Engine Factory, your template/view files may need to be adjusted if you change the engine as their syntax is not the same.
  6. Latte is not that popular as Twig or others so it's not a surprise It's a great template engine though imo.
  7. In the weekend I just put together my Latte engine module - should have done this way earlier, it's much clearer and better than my previous non-module attempt. I'll share it after using it for a while to see everything works as expected. It's for PW3.
  8. I would use php mcrypt for example where you can use a password. To make the encrypted role available for the JS, you should add a script tag in where you create a js variable (what you place there using php).
  9. Add the role name (or ID) as a post data (preferable with some kind of encoding/encrypting to make it more secure). Then you can get the role in your endpoint php file and do things accordingly. http://api.jquery.com/jquery.ajax/
  10. No, everything is checked there. No error was shown because of "!function_exists('t')" in the module.
  11. It's 4 decimals here: timer('timer A'); $view->package = getPackages(1, 'random')->first(); bd(timer('timer A')); Result: "timer A : 0.0047" (16) I can't use "t" because it's my translate function's name - maybe also a similar name collision is present there? Btw, in the post above where "timer" was introduced, the bd('first') should be bd(t('first')) if I see it right.
  12. There's a typo in the name of "ShortcutMethods": the first "S" is lowercase in the filename which causes an error (perhaps not on every server).
  13. How about making a dummy Tracy class with barDump/dump/log methods to load for non-superusers? (as a workaround) This way less resources would be needed.
  14. I like the way it works now, thanks!
  15. Yes, by adding $config->templateCompile = false; to config.php. https://processwire.com/blog/posts/processwire-3.0-alpha-2-and-2.6.22-rc1/
  16. If you go to the Setup / Languages and click on a language, are _main.php added to the Site Translation Files? Try adding _home.php too.
  17. That was high time then to make a module from it Page Info: it's useful, but it's a bit inconvenient to show. How about adding it to a separate tab? That way it would only require to hover. I don't know how much work is it, just asking.
  18. Looks like you're really in love with Tracy
  19. You could try Tracy Debugger: https://processwire.com/talk/topic/12208-tracy-debugger/ Install, set mode to "DEVELOPMENT" and see the bottom-right corner of the window for any error.
  20. Is there any similar to check whether it is a wireRenderFile() call? $options may not available in that case, and I'm not sure checking for "$templateFile->filename" is suffice.
  21. This is a great tip. I just used it in a module and simplifies things a lot. In init() I create a new global variable and process its values on ready().
  22. Good stuff! I was hoping to see a more feminine screenshot too
  23. Page tree improvement also works with Reno theme, thanks!
  24. This sounds more like a local issue then, I will try to track down.
×
×
  • Create New...