Jump to content

adrian

PW-Moderators
  • Posts

    11,213
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. Check out the "Page Active Languages Batcher" action in the Admin Actions module:
  2. I know this is old, but in case new users stumble across this, the Console Panel in TracyDebugger is what you are looking for http://processwire.com/blog/posts/introducing-tracy-debugger/#console-panel The other option for @muzzer's specific request of: $p = $pages->get("template=test"); $p->of(false); $p->set( 'fieldx', 'this is a default value' ); $p->save(); is to check out the "Field Set Or Search And Replace" action in the new AdminActions module which provides a GUI for setting the value of a field on many pages at once:
  3. It's now available in the modules directory: http://modules.processwire.com/modules/process-admin-actions/ It also includes a few new actions. The first post and the Github ReadMe give a small description of each action. Hope you all find something useful among them. Again, please feel free to contribute some actions, or if you have an idea but don't know how to build, let me know and maybe I can put it together.
  4. Ah thank you - I didn't see that! Just an FYI - adding aos_column_break to a tab actually does seem to work - just of course only for that tab
  5. Just a request for when you're bored. I think it would be nice to have more than one: "aos_column_break" field available. If you are making use of fieldset tabs it would be great to be able to break up the fields on each of the tabs. Maybe if it was just possible to manually create "aos_column_break_1", "aos_column_break_2" etc.
  6. If anyone with php <5.4, be aware that the short [] array index won't work for you. You'll need array().
  7. Maybe I don't fully understand what works and what doesn't in your case, but typically with hooks on after page save you can end up with recursion when you include $page->save inside the hook function. Typically you need to make it a "before" hook, or do: $page->save("index"); so that you are just saving the specific field (not the entire page), so that the hook won't be triggered again.
  8. Another option is to use the "Allow HTML" setting in this module: http://modules.processwire.com/modules/dynamic-description-notes/
  9. I would just like to mention that I think the easiest way for most users to upgrade these days is with this module: http://modules.processwire.com/modules/process-wire-upgrade/ It handles the PW core as well as any modules you have installed.
  10. That error means that you didn't select a db in PHPMyAdmin before clicking the Import or SQL tabs. The 500 error could be several things. Make sure you have debug mode on and read through this: https://processwire.com/docs/tutorials/troubleshooting-guide/ and this: https://processwire.com/docs/tutorials/installation-moving-and-troubleshooting/
  11. The admin user's email address suggests the developer is Greek. I won't share here, but if you're curious....
  12. @SamC - please see ryan's response: https://github.com/processwire/processwire-issues/issues/96#issuecomment-264145798 Perhaps reply there if you want to discuss with him further.
  13. Well you should get to work on one then Send me a PR with a new action and I can work on the ajax response to suit your needs and we'll take it from there!
  14. SeaVuel | Hotel CMS / template : http://seavuel.com/ | http://demo.seavuel.com/ Whose handiwork is this? It looks ryan-esque to me
  15. Ok, this functionality is ready, although please test carefully at this stage. You can populate the option parameters via URL parameters. You should split multiple values with a "|" character. There are two options: 1) You can either just pre-populate the options values, but still showing the options page where you can make changes via the options form GUI: http://mysite.dev/processwire/setup/admin-actions/options?action=TemplateFieldsBatcher&templates=29|56&fields=219&addOrRemove=add 2) or you can execute immediately with the passed options values: http://mysite.dev/processwire/setup/admin-actions/execute?action=TemplateFieldsBatcher&templates=29|56&fields=219&addOrRemove=add Note the "options" vs "execute" as the last path segment before the parameters. Please try it out and let me know what you think. Do you think it might also be nice to have an option to redirect to another page after it has executed, rather than showing the results page? With your suggestion of linking from other places in the admin are you thinking about maybe an ajax call to an action, rather than loading the page? I haven't tested this yet, but it might be a nice option. I might even be able to return a JSON formatted response if called via ajax?
  16. You can manually install it, like any other module - just copy the file into your site/modules/ directory, do a modules refresh and click install. You might want to check out @mr-fan' s version in that thread I linked to as I think he extended it to also work with file fields (not just image fields), which you will want for audio clips.
  17. Looks like your field is returning an array of author options, so try: <?php echo $page->author->first()->fullname ?> You can also use: last(), or eq(n) The other approach is to foreach through each author: foreach($page->author as $author) { echo '<p>'.$author->firstname.'</p>; }
  18. Ok, the optional author links are now available. These are the current options: protected $authorLinks = array( 'pwforum' => '985-adrian', 'pwdirectory' => 'adrian-jones', 'github' => 'adrianbj', );
  19. Let me think about this a little more - even in a dev environment restoring to a really old backup could be disastrous if you're still developing the site. I guess that's the responsibility of the dev to be smart about things though. I like it - I think giving authors proper credit will hopefully promote more contributions. I have gone with PW developer directory link, PW forum profile, and also Github account, with linked icons. I could maybe provide the option for the author to fully customize their links, but don't want things getting too ugly. Any thoughts?
  20. Take a look at this gist: https://gist.github.com/adrianbj/437e3945e9d774f5a67e Also, this thread: You may also want to consider these modules: http://modules.processwire.com/modules/media-library/ https://processwireshop.pw/plugins/media-manager/
  21. Glad you like it Definitely part of my goal! And yes, I agree with you and @tpr - a subfolder is the way to go. Are you talking about this module: http://modules.processwire.com/modules/process-database-backups/ - what if users don't have it installed? At the moment it only stores the one version of the backup - it gets overwritten every time you run a new action. It would be no problem to store more backups, but I was worried that it might be tempting to restore an old backup which could take you back too far and you might lose some manually adjusted content etc. The idea of the automatic backup was to provide a quick recovery from an action that didn't do what you expected. I am definitely happy to revisit this though, so please everyone give me your ideas on this.
  22. I like the idea - are you thinking that if all required options are passed it would be possible to run directly with no intermediate "Execute Action" button? Perhaps an additional url parameter: ?execute=true - without this, all options would be prefilled, but the user would still have the option to modify if needed before executing. Any thoughts? Yeah, I did think about it, but I think you're right, it is probably a good idea. I think you are being genuine and not sarcastic, but just wanted to clarify. I am actually wondering if maybe I should convert the config settings page to a DataTables layout (like how it is on the main module process page) - not sure how simple that would be to implement at this point, but might be nice if this starts to fill out with a lot of actions. Btw, in case you guys didn't realize, you can actually remove the superuser role from any actions you know you won't ever use so that you have a shorter list to choose/filter from when using the module.
  23. Just to add to your testing, I can confirm that I have been using this awesome module with 3.x for probably 6 months now without any problems!
  24. I wanted to store multidimensional data in the config settings of my new AdminActions module and I ended up taking the approach of hooking before saveModuleConfigData so that I could change the content of $event->arguments(1), which is the data array, before it is saved. https://github.com/adrianbj/ProcessAdminActions/blob/b3a82c308377f03c86ae4a2b8fc78e4cdc73b94e/ProcessAdminActions.module#L383-L390 I am not sure if that helps you or not, but thought I'd post just in case. PS - I feel like PW could benefit from a more standard way of storing multidimensional config data.
  25. This functionality is now available as an action in my new Admin Actions module:
×
×
  • Create New...