Jump to content

adrian

PW-Moderators
  • Posts

    11,182
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by adrian

  1. There might be a better way - this is a bit of a rush, but put the following in site/ready.php wire('config')->initialLogPath = wire('config')->paths->logs; $this->addHookBefore('WireLog::save', function($event) { if($event->arguments[0] == 'test') { // where "test" is the name of the log to go into the tfdencoding subfolder wire('config')->paths->logs = wire('config')->paths->assets.'/logs/tfdencoding/'; } else { wire('config')->paths->logs = wire('config')->initialLogPath; } });
  2. It's going to affect all log files, but you could do this in your config.php file: $config->paths->logs = $config->paths->assets.'/logs/tfdencoding/';
  3. Just a quick thought on the "Note: Empty values will be saved" message - I am not sure that this is helpful to site editors, and may even be confusing! Maybe it is something that doesn't need to be displayed, or maybe just for superusers? Thanks!
  4. Firstly, to clarify - what you are talking about is core functionality now, but you have posted in the support thread for Nico's "old" module. Just use the $options array like this: $options = array('limit' => 100); $items = $this->wire('log'); $items = $items->getEntries('animalabc_logs', $options);
  5. @tpr - glad it works and that Migrator helped to save your *ss too Firstly, I do have a working solution for you, but first a little background It is weird that nothing is getting exported - it is definitely exporting a valid CSV file for me. The only problem I am seeing is that I can't control the fields that are exported - it is defaulting to: Set Password, Email Address, Roles The problem is that if you allow the Home > Admin > Access > Users to be separately configurable you should be able to specify the required fields, but the settings don't save, because that page is locked for editing by PW so we are out of luck with that. BUT, here is my working solution, which I think is cleaner than making users navigate to that deep page anyway: Grab the latest master version (there is one critical change to make this work). Create a new page somewhere in the main page tree (not inside the Admin tree) - maybe called "User CSV Export". Make this new page separately configurable in the BCE "Where editing tools are available and separately configurable" settings section. Go to the Settings tab of this new page and configure it to enable Export mode. In the Content / Deletion / Protection section, set the Parent Page to: Home > Admin > Access > Users In the CSV Export Settings, set up the fields to export. You will likely want Name, Email Address, and any custom fields you may have set up. Save settings and then go to where you have BCE displayed (maybe an Inline Fieldset would be a good idea in this case) and click Export. Works great here, so please test and let me know.
  6. Thanks for reporting @tpr - I have fixed this on the master branch. I have some uncommitted changes to the dev branch at the moment, so the fix won't be on that branch just yet.
  7. Just so you are aware, the InputfieldSelect that soma mentioned has nothing to do with the third party FieldtypeSelect module from Hani which is what I think you are talking about in your first post. If you want to specify optgroups with InputfieldSelect, you want to use a Page field, or the Options field type (which is in the core, but not installed by default).
  8. Ah yes - perhaps I should have said: "populate blank rows" vs "overwrite all existing rows", instead of append/overwrite. Sorry for all the confusion, but I think we are on the same wavelength now Yes - creating a new blank row for each year is easy - I have a "Years" parent page and they simply create a new year under that as required - well actually it is done using Batch Child Editor and the child pages are hidden to avoid confusion. Thanks again!
  9. I hate CSS too - not my strong point, that's for sure! Given that the PW core uses the brower's alert box, I wouldn't bother struggling with it too much. It might be nice if PW had it's own consistent alert (like the pw-modal that we have for modals), but I don't think you should put too much effort into overriding the browser in this case. For my purposes, I don't think I would want what you are suggesting because an incorrectly prepared CSV file could damage my site by adding additional years and indicators (nitrogen etc). The indicators are actual pages that have their own content, so I think it is important that site editors make a conscious decision first to add a new indicator which will then automatically appear in the Matrix field. This is the reason I am using Matrix and not Table - the automatic population and new indicators and years. Yes, I didn't see your initial point - sorry, but I also think that trying to deal with that is getting too complicated
  10. Kongondo - you raise some good points around the issue of appending when importing. I don't think I really thought it through myself when I mentioned it in the first place - of course this is not a normal field type where you can just append new rows. The row must already be part of the matrix. I was talking about appending new rows. In my current use case, each year there will be a new "year" row that will appear in the matrix. I would like users to potentially be able to import a CSV of the data for that row. Of course importing for one row may not be worth the effort, but in some cases I can have up to 20 columns, so it might just be worth it. In that case, I would want "import" to just append the new row to the blank year that is in the matrix table. Here's my matrix so you can see what I am talking about: I am not sure I agree with this - if I had a dataset in excel I would definitely have the years in the first column. I agree that there are issues around how to structure the CSV to be imported - my initial thought is that it would be nice if it could (or must) contain the year in the first "column". I think it is a bit weird that you can't export from a matrix field and then import the same CSV file back into the matrix field, because of that first column issue. Maybe "ignore first column" and while you are at it, "ignore first row" options would be good - make sense? I am concerned about the current behaviour though, because at the moment, any import completely wipes the existing data - I don't think this is a good situation. Some other thoughts on your recent dev additions: my initial thought is that checking rows would mean that only those rows would be exported - I didn't realized that I had to enter row numbers - could this be changed to respect checked rows as well? It would be nice if Matrix supported Shift+Click for selecting a block of rows like the PW does. I think your new modal alert box needs some css tweaks - might be on your list, but thought I'd mention anyways. This is getting better all the time - really super useful for my needs - thanks again!
  11. Glad you like it! Are you talking about from Access > Users, or Home > Admin > Access > Users ? The former uses Lister, so I assume you are talking about the latter. If you have ListerPro you can use the export to CSV action from the former. If you don't, then go into the BCE module code and comment out this line: // don't even consider system templates if($this->editedPage->template->flags & Template::flagSystem) return; On the master branch it is line#159 and on dev it is 166. Let me know if that works for you. I wouldn't recommend leaving this commented though - I haven't though through it too much, but the Replace mode could cause some major damage pretty quickly Do you need this to be available regularly, or is it a one off need? If you need it regularly I could add any exception for the user page - let me know and we'll work something out.
  12. Hi Robguy - any chance you could check with the latest dev version of PW - it should be release at 2.7 in the next couple of weeks. Would be nice to know if this is still a problem. Thanks!
  13. I actually really like ImageExtra (http://modules.processwire.com/modules/image-extra/) for Slider details - you can easily specify all sorts of "subfields" to contain info for each image in the slider.
  14. Welcome John, We're a pretty friendly bunch around here. As long as you're willing to learn, you'll get plenty of help! I am certain you'll find PW a huge relief after the pains of WP!
  15. Kongondo - just wanted to send a big thanks for this - just used it for the first time as a way to provide a preview of content from a hidden page tree and a modal edit link to edit that content - really very handy!
  16. Just a quick FYI - thanks to a tip from Ryan I have been able to remove the need for making the numChildren method hookable, so if you are interested in the new features on the dev version for hiding the children from the page list view, go take a look now - no need for the core modifications.
  17. A quick look at your source code shows that it is Royal Slider: http://dimsemenov.com/plugins/royal-slider/
  18. This looks fantastic kongondo - thank you! I will try out soon and let you know if I have any problems/suggestions.
  19. Just a quick screenshot of the Lister mode in action - note that I have toggled editing on for the first "Story"
  20. I definitely thought about not hiding the children for superusers - just didn't worry about it too much for this first version. Determining which roles they are hidden for is definitely another option. The config settings for this module are definitely getting complex - maybe I have already passed a critical feature-bloat point, but I definitely see your point. The main thing I want to improve on is the Lister mode option in this new scenario - I think that it is the most powerful and unique option due to the inline ajax editing - the only catch at the moment is that it is embedded in an iframe (like Ryan did with newish Template > Usage lister. The inline ajax editing works awesome (if you have Lister Pro), but right now Add New and modal editing don't work. I will try to tackle these again shortly.
  21. Bernhard - that's a good question. In general hiding pages in the Page Tree can be problematic with child count and pagination, but I don't think this will be a problem for BCE given that when it hides pages it hides all the children of the page (not a select list). That said, this new feature is not well tested yet (which is why it is in the dev branch), but I am implementing it on a live site in the next day or two, so it will get some good testing pretty soon. Give it a go and let me know what you find - I am undecided at the moment if this is a good idea or a bit of a hack, but I really like the way it looks and works!
  22. There were some changes made a while back - can't remember if they were just changes to the module, or also the core - I think the core, because there was a limit that prevented it showing more than 10 modules. That looks to be BFD Calendar's issue - not sure if the same for you too. Can you try the latest dev version of PW?
  23. Hi everyone, New version committed to the dev branch which adds some interesting new features. I have had some clients confused by the use of child pages for repeatable elements. I know we have PageTable, but a couple of versions ago in BCE I introduced the ability to embed the editor within the Content tab (or a new tab, etc). This provides an alternate interface for editing child pages within the parent page. I think this was useful (and has become my default over PageTables). It can be especially cool in Lister mode where you can have inline ajax editing of child pages. This new version adds the ability to hide the child pages from the Page Tree and and also if you want, to hide the Children Tab. This means that clients have no idea that the content is stored in child pages. I know that you can also do this with an external page tree for PageTables, but that hidden "black box" still makes me a little uncomfortable at times, so this is a bit of a best of both worlds. The only catch with the hiding of child pages in the Page Tree is the count of child pages. To make it work I needed to make the core Page::numChildren method hookable. I have asked Ryan if he'd be willing to do that in the core, but for now if you want this feature to work properly, you will need to make this change yourself. Here are some screenshots of the new options and functionality. Two new settings: Note that the About page has no children listed: Child pages are editing within the content tab, but nowhere else because the Children tab is also hidden:
  24. Have you seen Martijn's great module: http://modules.processwire.com/modules/admin-custom-files/
  25. 2.6.1 is the stable version, but 2.7 is due out in about a week, so for a new project I would definitely say go with the dev branch (https://github.com/ryancramerdesign/ProcessWire/tree/dev). Just don't use the devns branch yet - it will be the 3.0 version down the road a little!
×
×
  • Create New...