< 232019-06-24⋎25 >

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

< 232019-06-24⋏25 >