Jump to content

adrian

PW-Moderators
  • Posts

    10,898
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Interesting that in this case InnoDB faster and yet there have been other issues where it's much slower: https://github.com/processwire/processwire-issues/issues/692 I am sure there's a good reason for it, but it does make the decision on which to use more difficult. Maybe MyISAM for most tables and InnoDB for the sessions table if you are using SessionHandlerDB?
  2. Hi @simonsays - firstly, that is just a warning coming from PHP 7.2. I need to adapt that code to handle the way the 7.2 now works with `count()`. I am curious though, because the warning you are getting says line 204, but the count is on line 202 in the current version. Are you running 1.0.9 or an older version? Despite the line number difference, I can't replicate the error. Typically outputformatting is off in a module, which means even a single image field will return an array, but in this module I do turn it on when creating the new filename so that dates/times are formatted as expected. Perhaps this is what is causing the issue. Could you please send me your settings for CustomUploadNames and also the settings for the image field in question so I can try to replicate? Thanks.
  3. Hi @kixe, I hadn't seen this before. I just had a quick look around and from what I can tell, it's a simpler version of @kongondo's RuntimeMarkup in that it doesn't allow you to use PHP to generate the markup. Would you mind describing the differences for us please?
  4. I just committed a new version with several tweaks and fixes for the old, unloved Template Resources panel. It now better detects variables, constants, and functions that are only used once and therefore redundant code. The panel icon is now also colored to warn you that there are redundant things that you could remove.
  5. Another nice option might be to extend spectrum to do this. I just did this via browser dev tools, but I expect it could be done with JS quite easily if we has the option to inject JS when using the Inputfield with Spectrum Color Picker (JavaScript) option. I really like being able to see the hex code without having to open the picker. What do you think?
  6. Thanks @kixe One more request for you please. I am using this setup: $('#{id}').on('keyup', function() { $(this).css({'background-color' : $(this).val()}); $(this).css({'color' : ($(this).val().replace('#','0x')) > (0xffffff/2) ? '#333' : '#fff'}); }); so that the input background changed dynamically as the hex code changes, but I also want the background to be colored onload so I changed case 4 to this: case 4: $this->attr('style', "color: $textColor; background: $bgColor;"); if ($this->alpha) $this->attr('value', $color32); else $this->attr('value', $color24); break; I guess I could probably modify the JS code to do the onload as well, but I was wondering if you thought such a setup would be a worthwhile core option?
  7. Have you tried using AdminOnSteroids or AdminCustomFiles to add the CSS without needing to module the core module file?
  8. Glad you've found it so useful. Sorry for the bug in that version. I have just committed a fix. Please let me know if you have any other problems.
  9. adrian

    Hanna Code

    Yeah, a little bit of regex magic should take care of that for you.
  10. adrian

    Hanna Code

    My example shows how you can do that with Hanna - you need to do something like define the value of a text variable within the hanna. They are self closing tags. There is no separate hanna close tag.
  11. adrian

    Hanna Code

    [[av_textblock size='' font_color='' color='' text='Some Text']] Although I think giving site editors the ability to change font size or color beyond selecting from <hx> tags is a bad idea for keeping a nice looking site.
  12. Just got a couple of likes from @Knubbi on my posts above which prompted me to note that there is a Search and Replace action for my Admin Actions module: http://modules.processwire.com/modules/process-admin-actions/
  13. Awesome thanks so much - this is really speeding my workflow up today.
  14. Thanks Steve, it should be fixed in the latest version just committed.
  15. It's clearly a BatchChildEditor module issue: https://github.com/adrianbj/BatchChildEditor/blob/339624b0a14a9f403ae73b37a08f3e0f5f8d6136/BatchChildEditor.module#L907 It's part of the Lister mode option so if you don't need that, just disabled it and everything will be fine. It's a limitation with PHP 5.3 and $this in enclosures.
  16. @kixe - it might be worth noting that this module requires PHP's bcmath extension because of the call to: bcmod (and maybe others).
  17. Hey Robin - I am really loving this module - it's becoming one of my key navigation tools, so thank you! This might be feature creep so I definitely won't mind if you don't think this is a good idea, but I was thinking an "Add New" link at the top of each list could be quite useful.
  18. I didn't write the initial module - this is a port of a Drupal module. I did this for an agency who wrote the Drupal module and because they are now using PW for several sites, they wanted a PW version of this. It was their choice to use checkboxes. As you can tell they are set up to toggle automatically, but I agree it doesn't really make sense - users are used to radios toggling and checkboxes being for multiple selections. Maybe at some point I'll move this module to use radios, but we'll see ?
  19. I agree but I wonder if you're solution actually makes sense. Surely this bit of code is not logical in the first place - why would we want to show the banner if auto_accept has already been triggered by a view. I feel like they were headed somewhere with this but didn't quite get the logic correct. // if they haven't explicitly accepted it (ie: auto-accept) then display the banner if (pwcmb_settings.auto_accept && cookieMonster.cfg.viewCount != -1) { cookieMonster.ui.show(); } I also find this weird: // if this is NOT the first page view (ie: 2nd, 3rd, 4th, 5th, ...) pageview, then implicitly allow cookies if (cookieMonster.cfg.viewCount == 1) { cookieMonster.allow(false); } // but if they haven't explicitly allowed cookies, then display the banner if (cookieMonster.cfg.viewCount >= 0) { cookieMonster.ui.show(); cookieMonster.cfg.viewCount++; } It says if it's not the first, but then it allows when viewCount == 1 and then another case of displaying the banner if they haven't explicitly allowed cookies. To me the auto accept should work the same as explicitly allowing, otherwise there will be this weird stuff when the user manage option is checked. I don't know - maybe I'll try to get some clarification from the original devs.
  20. Yeah, but what I don't get it why you want to display the banner at this point. Auto accept is true and the page has been viewed - why now show it?
  21. Maybe I don't fully understand what the auto accept mode is intended to do, but there certainly seems to be a difference in behavior when Allows users to manage is checked along with auto accept. Anyway, regarding the new cookieMonster.cfg.viewCount = -1; you have added, I don't really get it - why do we want to set the viewCount when the user blocks marketing cookies? Sorry, I am distracted on other things at the moment and I haven't ever really got my head around this part of the module.
  22. I do want to hear from a few others, but I actually think that #3 (off in backend and on in frontend) makes most sense to me because that matches how PW itself works. I think perhaps a simple OF icon with either a red or green background somewhere on the console panel is probably a good idea as a reminder, but I don't think there should be a toggle - I think if you need to adjust the status, it should be added to the Console code.
  23. Hey Bernhard - sorry for the hassles - hope you didn't do any long term damage to anything! As for whether this should be on or off, I am not really sure to be honest. Perhaps it should be "ON" if you're using the Console panel on the frontend and "OFF" if you're using it in the backend/admin. I don't explicitly set it on, but that is how it works by default. The problem with it being off is if you simply want to get the value of a field, it will return the raw, unformatted value: instead of: So, I guess we could take several different approaches: 1) Always ON 2) Always OFF 3) ON in frontend and OFF in backend/admin 4) Configurable as ON or OFF for both 5) Configurable separately for frontend and backend Any thoughts? What does everyone else think?
  24. There are several outlined in the second Issue that @Robin S linked to. It would actually be great if you could comment on that issue to get Ryan's attention once again if you wouldn't mind.
×
×
  • Create New...