-
Posts
10,912 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
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
-
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.
-
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?
-
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
-
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?
-
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.
-
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
-
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?
-
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
-
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.
-
Sounds like a job for Lister
-
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.
-
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!
-
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')) {
-
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
-
Permissions > Add New > Install predefined system permissions. Or you could just type out that permission name manually.
-
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.
-
Thanks @Juergen - it should be fixed in the latest version.
-
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.
-
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.
-
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.
-
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
-
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?
-
Introducing the new "User Bar" If enabled (currently off by default), this bar is displayed for users that don't have Debug bar permissions (typically all non-superusers) Currently it has three features: Admin, Edit Page. Page Versions The first two are simply links from the front-end to the root of the admin panel, and a link to edit the current page in the admin panel. These are quite similar to horst's ALIF module, but I was thinking if you are using Tracy anyway, then why not have it provide these buttons for other users who have editing permissions. Now for the first of the unique features: Page Versions. This is a simplified version of the Template Path panel that is available from the Debug Bar. It is also similar to the User Dev Template option, but this one allows the user to try multiple options that you provide. Remember you can always have the alternate template files load different js/css etc files as well, so you can provide a very different version of a page for your users to test. To make it more friendly for your clients/editors, the labels in the list are formatted to look like page names, rather than filenames. The user simply selects an option and the page instantly refreshes showing the page using the alternate version. Even if you have the Page Versions option selected in the config settings, it won't appear on the User Bar unless you have alternately named template files matching this pattern: "home-tracy-alternate-one.php" etc. The key things are the name of the template, plus "-tracy-", plus whatever you want to appear in the list of options, like "alternate-one", plus .php Users must also have the "tracy-page-versions" permission assigned to their role. My next goal for the User Bar is the Feedback / Tickets / Review functionality that was discussed earlier. I know this is starting to take this module beyond just a debugging tool, but I think it's nice to have all this stuff accessible from the same place, so that when you as the developer look for a user submitted support ticket, it will be part of the Tracy Debug Bar. Of course I am also planning a central admin interface for managing all tickets in one place, but I still think it makes sense to be able to submit them from the page in question and also view them from the page as well. It certainly needs some styling improvements etc, but is functional already. I will probably make it possible to define custom styling/positioning in the config settings. Please test carefully before enabling this new User Bar on a live site! Maybe it's time this module gets renamed as the "Tracy Developer Toolbox"
-
Ok, I still can't reproduce here - from reading about that object it should only be an object if output formatting is off. Anyway, I have committed a new version which should prevent the error - the PW Info panel might not display the contents of that object as an array how I'd like, but it should hopefully work for you for now until I can reproduce and format properly. Please let me know if it fixes the error for you.