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