Jump to content

adrian

PW-Moderators
  • Posts

    11,105
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by adrian

  1. Thinking this through I think I would like to add a page field (checkboxes) on the parent page of each branch that is linked to the list of installed languages so I can specify which language field inputs should be available to all child pages in this branch. Now the catch is finding the hook that determines the languages to list. This may need to work with both multi-language fields and language alternate fields, although I am not sure about this yet. I haven't scoured thoroughly yet, but does anyone know the best hook for this?
  2. Sweet - glad you are finding it useful. I am kinda keen on knowing what panels you use and what panels you restricted them to. I have actually been thinking about setting up a poll so I can find out what panels you guys are all using - would be helpful so I know which ones to focus on improving. I don't think this new version of the forums has the poll option though.
  3. Hey guys, Just about to do my first ML work and feeling like a bit of a noob I have a site with several branches with the same templates and similar content but each one will have different language requirements - some will be English only, but the first ML one will be both English and Portuguese. Future branches will probably be English and Spanish and then who knows what others might be. I am wondering if there is a way to hide unnecessary languages from the branches that don't need them. I will need this to work for page names, titles, and all other fields. I will be making use of the ML features of the Profields Table field too, if that has any impact on how to make this work. Thanks for any ideas - maybe it's very easy and I just didn't RTFM properly
  4. Ok, check out the latest version. Any panels that are checked here won't be available to superusers (and other users with tracy permission) if they have the "tracy-restricted-panels" permission. Let me know if that works for your needs.
  5. I haven't set up that tracy-debugger-superuser yet - that was just an idea at this stage. What I am asking you is whether that approach would be best, or whether it would be better to go with a permission that could be added to certain superusers that limits the panels on their Debug bars. I think the second option would give more flexibility - what do you think?
  6. Don't forget about $this->halt() rather than using exit/die https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-this-gt-halt-method-for-use-in-template-files
  7. Maybe I could add a checkbox list of panels so that you can check off panels that aren't available to special restricted superusers? Do you think that would take care of all your needs with this one approach?
  8. New User Bar config settings for changing the position of the bar, as well as an option to also display it for users who also have Tracy Debug Bar permission - gives quicker access to the admin and edit links, as well as any custom links you set up. Also fixed a bug where the User Bar wasn't showing in Production mode.
  9. Hey @Macrura - just looking at this part of your question again - is this the key thing you want changed - the ability for Tracy to not be shown for all superusers? If you want I could check for a new "tracy-debugger-superuser" permission. This would only be considered if it exists and if it does, superusers would only be able to see the Debug bar if they also have that permission. Is that what you are looking for? or is your issue answered by these posts? https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=127746 https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=127747
  10. Hi @Naz - glad you like the module and welcome to the forums. I can totally understand the issue you are having with the way I have the configuration set up. Ideally having it by template would also be useful - unfortunately I don't think it will be a simple change so I am wondering if we can figure out why you are needing the field pairing to be set up if you have matching numbers of fields in the CSV file. Are you using the latest version of BCE? Could you perhaps send me a test CSV file to work from?
  11. Thanks for getting back to me. @BrendonKoz - I think if everything is working fine for @cstevensjr as it is, then maybe we should just leave until there are issues for others - unless you feel strongly that the change should be made - in which case maybe you could elaborate so that @cstevensjr agrees that the change needs to be made. I'll leave this up to you guys to figure out if that's ok
  12. Have you tried $field->message() ? Personally I have used $session->message() with success - I honestly haven't looked into it properly, but maybe it's a page reload issue which is why the session version works. Maybe someone else has used these more or looked into exactly what is going on a little more thoroughly.
  13. Sounds like a job for Lister
  14. I don't think I ever saw your admin bar - did you mention it in the forums? Maybe I just forgot On the hookable side of things, I have been thinking about making both the Debug bar and User bar hookable to make it easy for you guys to extend. For the moment I thought this custom code entry for the User bar was a good starting point to gauge interest. Let me know if there are any changes I can make to simplify things for you.
  15. Thanks for your post @BrendonKoz - I have never actually used this module, despite contributing a fair bit of code to it, so I haven't really been pushed into finding a solution. I'd love to hear from @Werner Pilnei whether he has success with your version of fMailbox.php - if it solves his problems then it sounds like it might be the best solution for now. Thanks again!
  16. You can now also add your own features to the User Bar: In this case it's a link to Google Page Speed for the current page, but you might choose to link to a specific page in the PW admin, perhaps a ListerPro page - maybe bookings or orders, or whatever you want. An SVG icon is probably the easiest approach, but it's up to you. The entire thing is rendered from custom php code that you enter in the config settings. You can make use of the $iconColor variable in your code to have it match the icon color you defined in the Icon Color setting. Of course you can return multiple icons with this code block. By default, all logged in users who don't have Tracy Debugbar permissions we see these custom feature icons, so you may wish wrap this in a: if($user->hasPermission('page-edit')) {
  17. No - there is the list to install from - that's why I showed you that screenshot. That "Install predefined system permissions" is available from 2.7 onwards. Maybe even before, but it's definitely in the current stable as well as 2.8 and 3.x
  18. Permissions > Add New > Install predefined system permissions. Or you could just type out that permission name manually.
  19. You should be able to get the page from this: $page = $event->object->getPage(); But the other thing to consider is that I think what you are trying to do is already support by a core permission. Try installing that "page-edit-created" permission. It may not be as flexible, but worth point out in case you didn't know about it. The other thing is that you don't need a full module for small snippets like this - you can place the code in /site/init.php instead.
  20. Thanks @Juergen - it should be fixed in the latest version.
  21. https://github.com/ryancramerdesign/ProcessWire/search?utf8=✓&q="function+message" That should give you an idea of what the message() method does in various contexts. Basically it is for sending a message (green for success). You can also use: error() for red. https://github.com/ryancramerdesign/ProcessWire/search?utf8=✓&q="function+error" The default method for each of these is the one in the Wire.php file Most(all?) of the versions are in classes that extend Wire, so they are extending that base method.
  22. Is this what you are looking for: https://github.com/ryancramerdesign/ProcessWire/blob/7e8c7c6836282b6b64de81263f5aaa8112fd51ae/wire/modules/Inputfield/InputfieldForm.module#L95 Remember though that each fieldtype (textarea, text, integer, file, image, etc) is defined and processed by the Inputfield (https://github.com/ryancramerdesign/ProcessWire/tree/master/wire/modules/Inputfield/InputfieldImage) and Fieldtype (https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeImage.module) modules. Those links are to the Image field. If that doesn't help, maybe let us know a little more about what you are trying to do.
  23. I have added some simple styling options for the User Bar. Definitely nothing fancy yet, so let me know if there are any particular settings you'd like to be able to tweak. It can definitely look a lot more stylish now, eg.
  24. Repeaters have had a major overhaul since that comment by @tpr https://processwire.com/blog/posts/processwire-3.0.4-repeaters-revisited-preview-of-profields-matrix/#major-upgrades-to-repeater-fields https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/#repeater-upgrades-continued-in-pw-3.0.5 and there is also the new Repeater Matrix fieldtype: https://processwire.com/blog/posts/processwire-3.0.4-repeaters-revisited-preview-of-profields-matrix/#new-profields-repeater-matrix-field
  25. Hi @Zeka - at a quick glance that looks like a core bug. What happens if you change that line to: if($this->wire('config')->debug) $this->message("changeFieldType loses table field '$value'"); If that fixes it, could you please post an Issue on the PW Github issues page? Note that of course Tracy is not causing that Notice, it's just that by using Strict Mode you are forcing it to behave like a fatal error. It would probably go un-noticed by everyone else. On an unrelated note - do you know why all the links in your Tracy config settings are styled with strikethrough text?
×
×
  • Create New...