Jump to content

adrian

PW-Moderators
  • Posts

    11,266
  • Joined

  • Last visited

  • Days Won

    374

Everything posted by adrian

  1. I like the idea of unicode icons, but I am also not convinced that browser support is that consistent. I have seen screenshots of the Tracy console for example where the history back/forward icons don't look good. Also, I agree that there aren't enough options for our needs. Something like a fontello custom set might be ok, but in general I have always thought that plain SVG icons were lighter, so I think I'd prefer to go with those I think. I wonder how much this really matters - is it over-optimization to be worrying about this?
  2. Beautiful work @SamC ! I look forward to reading through all the tuts sometime soon. For the lazy amongst us, here is the link: https://www.pwtuts.com I am glad you are using it, but sad that you don't think you are using it properly. Do you think there are some things I can do to make it easier to understand/use? Maybe we need a tut for it
  3. @helmut2509 - it's working fine here. Are you actually calling the function where the "number" session value is set before you try echoing it?
  4. Yeah - I got it and appreciate your tip! Just thought others might like clarification on how it works with multiple templates.
  5. All sounds great @szabesz The other possibility here is to use FontAwesome icons as much as possible. I recently added it for loading the icons for the new "Custom Links" section in the PW Info panel. Although it is only loaded if you have defined some custom links. Because you guys can add a link to any page (admin Process or frontend) on the site, this was the only way to show the appropriate icon automatically. Not sure if this is a better or worse approach in terms of resources. Obviously Fontawesome isn't super lightweight, but it's also not embedding the SVG directly into the panels, so maybe more efficient? Sounds like a good idea - I'll sort that out.
  6. Like any other ProcessWire variable, the easiest way to access them inside a function is: wire('session')
  7. Just for reference: https://processwire.com/talk/topic/10408-button-labels-for-pagetable/ I thought I remembered this being possible by default, but turns out it only works when you have more than one possible template.
  8. I like where you are headed with this and I think the new version looks nice. The only thing I wonder is whether it is worth re-crafting all the icons vs just running them through SVGO (which I should really have already done). I just used the online GUI for this test. I just tried and it reduced it to 501 characters: <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 44.8 44.8"> <g fill="#CD1818"> <path d="M22.4 21.2c2 0 4-1.8 4-4V4c0-2-2-3.8-4-3.8s-4 1.7-4 3.8v13.5c0 2 2 4 4 4z"/> <path d="M30.7 3.3c-.5-.2-1 0-1.4.2-.5.3-.7.7-.7 1.3v5c0 .6.3 1.2.7 1.4 4.2 2.4 7 7 7 12 0 7.7-6.2 14-14 14-7.6 0-13.8-6.3-13.8-14 0-5 3-9.6 7-12 .4-.2.7-.8.7-1.3V4.4c0-.6-.2-1-.7-1.3C15 3 14.5 3 14 3 6.6 6.6 1 14 1 23c0 12.3 9.7 22 21.6 22 12 0 21.6-9.6 21.6-21.6 0-9-5.4-16.6-13.3-20z"/> </g> </svg> So there is definitely significant room for improvement with these icons. It's just a question of whether it's worth going the "line only" route, or just using SVGO to optimize the existing ones. Honestly I think most of the icons could do with some work - many of them are pretty ugly If you feel like taking this on, it would definitely be appreciated. Anyone else have any thoughts?
  9. Oh yeah, I agree it can be very useful. I have just managed to avoid the need so far, but your enhancement would make it much more functional and less prone to being ignored thereby creating problems. Maybe add a request in the appropriate Github requests repo?
  10. @Juergen - nice work. I actually wonder if perhaps this should be the default behavior for this. I almost never allow editors to choose a template for child pages, but with this approach I might be more willing to do so in the future. Should this be a request to Ryan?
  11. A quick update. Thanks to lots of help from @szabesz we have fixed the issue with the Config Data section in PW Info panel from being slow. The latest version also: 1) Fixes a ERR_BLOCKED_BY_XSS_AUDITOR browser error if there are <script> tags in your template file and you are using the Template Editor panel to test code changes. 2) Adds a new option for opening links from the PW Info panel in a new browser tab (off by default) - this was requested by @szabesz above. 3) Revamped the init() and ready() code so that much less code is processed when Tracy is completely or temporarily disabled. It also improves efficiency for various conditional checks. 4) Several other minor tweaks / fixes. Please let me know if you come across any problems with this new version.
  12. I didn't know they were called that - awesome! Only 6 weeks to go ... BTW - actually not that big of a Star Wars nerd
  13. Sorry, my fault - you don't want to echo $content in loginform.php - you just want to set it - it needs to be echo'd in main.php if you want the login form to appear with your site html wrapper content. Is this site online somewhere I could take a look?
  14. Ok, I think the problem is that loginform.php needs to be: $content = $loginForm; which I think you have already tried, but just not in the code you just posted. Also, is loginform.php selected in the module settings for the "Login Template" setting? Also, because loginform.php is not an actual PW template, _main.php won't be automatically included, so you will need to manually add: require_once '_main.php'; after you define $content, so this should do it: <?php namespace ProcessWire; echo $content = $loginForm; require_once '_main.php';
  15. I think we'd need to see your files to help any further. Does populating $content with anything else actually get output on the end?
  16. Is the missing $ in your post a typo here in the forum? You need: $content .= $loginForm; Also, it depends on how your _main.php is set up. Is $content the final variable that is echo'd at the end, or is it $out or something else? Of course you need to use the variable that is actually used in your _main.php file. $content is just an example.
  17. @mel47's suggestion is a good choice. The other one you might want to consider is: https://processwire.com/api/multi-language-support/multi-language-fields/#language-alternate-field-values
  18. It looks like there is a PHP error message breaking the JSON - you need to go into your dev console and click on the image upload ajax call and go to the response tab.
  19. Ok, I'll take care of that shortly - just keep in mind that I won't be adding "_blank" to the Login/Logout, Clear Session & Cookies, and Modules Refresh links, because these are actions that are designed to reload the same page once they complete, but I think all the others will be ok with an option for "_blank". Honestly I think this is starting to sound a little too complex. i have already added the Enable/Disable Strict Mode option, but I think I think it could get out of control if we're not careful. I'd really like to know why $config is so slow for you - how long does the Console panel response take when doing d($config); ? Just wondering if it's rendering $config itself that's the problem, or something about the way it is done in the PW Info panel that could be improved.
  20. You're missing the line ending semicolon d($config); So it looks like "Config Data" is the culprit on your setup. I don't really know why it's so slow for you, and I don't really know how to improve it. Anyone else seeing that? If others chime in with a similar experience, I'll see what I can do, but I think for the moment it's probably best to just disable that and use d($config); as needed. I used to be all about _blank links, but these days I actually find them annoying because they give you no choice. A normal link lets you choose - I have three-finger / midd-click setup for open in new tab. If you are finding it that annoying though, I'd be happy to add a config setting to make all those PW Info panel icon links optionally open in a new tab - just let me know.
  21. Hi @Robin S - excluding repeaters for a minute for the sake of clarity, it is already possible to have multiple videos on the one page, either in multiple fields, or within a texarea field, so images in the images field could be from multiple videos. I think I assumed that the dev would always grab the thumbnail for a video by name, rather than it's order in the images field, but I don't really know how this is being used, so hard to know. Maybe others can chime in because as I mentioned I don't think I have actually haven't ever used this module - I built it for request here in the forum.
  22. Hi @AndZyk - this was actually just fixed yesterday. Please update and let me know if you still have any problems.
  23. Hey @szabesz - I am surprised you are seeing such a dramatic difference in load times for the PW Info panel with those 3 sections enabled. I just tested on two of my servers and got these results: Server 1 Those sections enabled: 28ms Those sections disabled: 22ms Server 2 Those sections enabled: 6ms Those sections disabled: 3ms So for me, there really is no noticeable difference in load times. But we have seen discrepancies like this before. I remember when kongondo had really slow load times with the three objects in this panel, but it didn't affect you at all. Could you maybe determine which one of these three is causing the main slowdown? If it's "Config Data", then I would suggest just disabling that and using the Console panel and doing: d($config) whenever you want that info.
  24. Hi @eelkenet - I haven't used this module in quite a while and actually never personally used it with repeaters, but I can definitely see why you'd prefer this behavior. Thanks for having a go at implementing this. I think that while this behavior is probably preferred by most users, I agree that making it optional is best, especially because this could be a breaking change for existing users. Looking forward to a PR - thanks!
  25. Sorry about that - I wasn't seeing that because I had an older, updated install that already had those options stored in the settings database. New version just committed fixes it. Thanks again!
×
×
  • Create New...