| [22:25:28] | * JustTB has quit (Ping timeout: 245 seconds) |
| [22:40:44] | * JustTB has joined #farmos |
| [00:42:32] | <johanness_charle> | Greetings: Please can you provide me with guidance on how to deploy FarmOS Field Kit (Web/Mobile App) |
| [02:15:51] | * msandstrom[m] has quit (*.net *.split) |
| [02:15:51] | * amber65[m] has quit (*.net *.split) |
| [02:15:51] | * donblair[m] has quit (*.net *.split) |
| [02:15:51] | * johanness_charle has quit (*.net *.split) |
| [02:15:51] | * hamishcunningham has quit (*.net *.split) |
| [02:15:52] | * gsavio[m] has quit (*.net *.split) |
| [02:15:52] | * sudokita[m] has quit (*.net *.split) |
| [02:19:38] | * JustTB has quit (Ping timeout: 245 seconds) |
| [02:22:25] | * johanness_charle has joined #farmos |
| [02:23:55] | * hamishcunningham has joined #farmos |
| [02:24:00] | * donblair[m] has joined #farmos |
| [02:25:12] | * gsavio[m] has joined #farmos |
| [02:25:26] | * amber65[m] has joined #farmos |
| [02:25:29] | * msandstrom[m] has joined #farmos |
| [02:25:43] | * sudokita[m] has joined #farmos |
| [03:25:59] | * JustTB has joined #farmos |
| [05:12:09] | <mstenta[m]> | Hi @johanness_charles - if you have Android you should be able to search for it in the Google play store |
| [05:12:43] | <mstenta[m]> | It is still considered beta, and you need to search "farmOS Field Kit" for it to show up |
| [05:13:11] | <mstenta[m]> | But hopefully will be launching officially soon |
| [05:13:35] | <mstenta[m]> | In both Google play and apple store |
| [05:13:59] | <mstenta[m]> | Alternatively, https://farmOS.app is the same thing and works in the browser |
| [05:15:12] | <mstenta[m]> | Please note that the beta app in the play store may lose data if you don't sync it to the server |
| [05:15:35] | <mstenta[m]> | New version coming soon :-) |
| [05:15:47] | <mstenta[m]> | Thanks to @jgaehring:matrix.org |
| [08:30:45] | * JustTB has quit (Ping timeout: 258 seconds) |
| [08:47:03] | * JustTB has joined #farmos |
| [10:46:34] | <karna[m]> | <mstenta[m] "But not too difficult with a cus"> mstenta: Having trouble making sense of how to go about this. Where are the specific permissions listed and attributed to a role? I can see in farm_access_roles.farm_access.inc that roles are granted view and edit permissions but can't work out what these refer to |
| [10:47:56] | <mstenta[m]> | karna: i've built a custom layer of abstraction on top of Drupal's normal roles and permissions system in farmOS, but it's completely optional |
| [10:48:46] | <mstenta[m]> | it basically allows permissions to be programatically assigned and automatically maintained |
| [10:48:58] | <mstenta[m]> | Via these hooks, provided by the farm_access module: https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_access/f... |
| [10:49:07] | <mstenta[m]> | (Are you familiar with how Drupal hooks work?) |
| [10:49:26] | <mstenta[m]> | Regardless, you can completely bypass that if you want to just manage the roles and permissions 100% manually |
| [10:50:23] | <mstenta[m]> | > But not too difficult with a custom module that overrides the access arguments of the quick forms |
| [10:50:24] | <mstenta[m]> | You will need to learn some Drupal module development to do this, however |
| [10:51:06] | <mstenta[m]> | And create a new custom module that implements this hook: https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func... |
| [10:51:25] | <mstenta[m]> | In that hook, you can override the access callback and arguments for specific paths |
| [10:52:19] | <mstenta[m]> | The quick forms use general permissions... eg: the egg quick form simply uses the "can create harvest logs" permission, which ALSO grants access to add logs manually - which it sounds like you don't want |
| [10:52:30] | <mstenta[m]> | So you would need to override the access callback for each quick form in your module |
| [10:52:46] | <mstenta[m]> | This is some deep dive coding... so you'll have to learn a bit... but it's possible |
| [10:53:03] | <mstenta[m]> | Unfortunately, I don't have much time to help today |
| [10:53:25] | <karna[m]> | I see! I'll definitely get studying |
| [10:53:31] | <karna[m]> | No worries, you've helped plenty |
| [10:53:34] | <karna[m]> | Any resources you can point me to? |
| [10:54:34] | <mstenta[m]> | This looks pretty close to what you want, I think: https://stackoverflow.com/questions/5124584/how-to-use-hook-menu-alter-t... |
| [10:54:40] | <mstenta[m]> | (only took a quick glance at it though) |
| [10:55:34] | <mstenta[m]> | It will help greatly for you to understand hook_menu() as well: https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func... |
| [10:55:49] | <mstenta[m]> | That's the hook that modules use to provide new paths in Drupal |
| [10:56:16] | <mstenta[m]> | hook_menu_alter($items) runs after that, and $items has ALL the menu items that were created by other modules |
| [10:56:25] | <mstenta[m]> | So you'll see farm/quick/eggs (for example) in $items, and can alter it |
| [10:57:00] | <mstenta[m]> | Another piece of advice: put your custom module in `sites/all/modules/[mymodule]` NOT in `profiles/farm/modules/...` |
| [10:57:27] | <mstenta[m]> | The latter is core farmOS module, which should never be directly modified, since they are meant to be replaced during a version upgrade |
| [10:57:51] | <mstenta[m]> | (which follows the basic Drupal rule of "never hack core") |
| [10:57:52] | <mstenta[m]> | https://www.drupal.org/docs/7/site-building-best-practices/never-hack-core |
| [10:58:17] | <mstenta[m]> | Drupal modules provide a TON of flexibility to alter core modules, without modifying their code directly |
| [10:58:27] | <mstenta[m]> | Hope that helps! Good luck! |
| [10:58:58] | <mstenta[m]> | If you want to start a thread on the farmOS forum, it would be a great place to have some of this conversation: https://farmOS.discourse.group |
| [10:59:17] | <mstenta[m]> | That's better suited for long-running conversations than chat, IMO - and others can find it later easier |
| [11:12:14] | <karna[m]> | Cheers Mike :) that's plenty for me to get stuck into |
| [14:10:23] | <paul121[m]> | Aha! mstenta , this reminds me I had a couple questions about Drupal development |
| [14:11:11] | <paul121[m]> | Specifically with `hook_menu()` ... This is what I used to add the "Reports" tab for the Weight Report. |
| [14:13:57] | <mstenta[m]> | @paul121 sure anytime! |
| [14:14:15] | <paul121[m]> | Two things: |
| [14:14:16] | <paul121[m]> | - Now that you mention `hook_menu_alter()` I'm wondering if I should have used that instead of `hook_menu()` to add a new `/assets/x/report` path? |
| [14:14:16] | <paul121[m]> | - ALSO when developing this module is was a bit of a pain to "see" my changes... it seems like `hook_menu()` is registered when the module itself is installed. Basically, while developing my `farm_livestock_menu()` hook, I had to disable/reenable each time to show changes. Is there a way around this? |
| [14:14:18] | <mstenta[m]> | I'm a bit preoccupied at the moment but feel free to ask and I'll get back when I can |
| [14:14:46] | <mstenta[m]> | Yea you want hook_menu |
| [14:14:52] | <mstenta[m]> | That's for creating a new item |
| [14:15:13] | <mstenta[m]> | hook_menu_alter is for modifying existing items |
| [14:15:34] | <mstenta[m]> | And yea: menu items are cached |
| [14:15:44] | <mstenta[m]> | You can clear the menu cache in a few ways |
| [14:15:46] | <paul121[m]> | > hook_menu_alter is for modifying existing items |
| [14:15:46] | <paul121[m]> | Ahh yes. hence "alter" |
| [14:15:53] | <mstenta[m]> | One way is to simply submit the modules page |
| [14:16:19] | <mstenta[m]> | Quicker way is to install devel module and go to /devel/menu/reset |
| [14:16:38] | <mstenta[m]> | Drush also has a `cc menu` command |
| [14:21:24] | <paul121[m]> | OK - I started to plat with the devel module, but didn't get past install. It wanted FTP settings? |
| [14:21:50] | <mstenta[m]> | Devel shouldn't need any config |
| [14:22:03] | <paul121[m]> | Also, I'm afraid I've been jumping around avoiding Drush. I should probably learn how to configure and use it |
| [14:22:05] | <mstenta[m]> | Not to use the menu reset anyway |
| [14:22:42] | <mstenta[m]> | Are you using docker? The farmOS dev image includes drush |
| [14:23:01] | <paul121[m]> | Yes using docker. Didn't know that!! |
| [14:23:01] | <mstenta[m]> | Probably need to document how to use it somewhere |
| [14:23:29] | <mstenta[m]> | You have to prefix the drush commands with docker stuff |
| [14:23:59] | <paul121[m]> | `docker exec ....` ? |
| [14:24:04] | <mstenta[m]> | Yup |
| [14:24:14] | <mstenta[m]> | On my phone right now |
| [14:24:28] | <mstenta[m]> | But I can get you an example later if you remind me :-) |
| [14:24:41] | <paul121[m]> | Cool, no problem. I'll remind ya! |
| [14:25:13] | <mstenta[m]> | Great thanks! |
| [14:46:25] | * JustTB has quit (Ping timeout: 248 seconds) |
| [15:01:29] | * donblair[m] has quit (*.net *.split) |
| [15:02:00] | * donblair[m] has joined #farmos |
| [16:54:10] | * JustTB has joined #farmos |
| [17:31:19] | * JustTB has quit (Quit: Leaving.) |
| [17:35:25] | * JustTB has joined #farmos |