< 292020-07-30⋎31 >

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
01:48*JustTB has quit (Quit: Leaving.)
05:24*JustTB has joined
12:56tool172[m]can you have more than 1 hook menu per module area or will i have to explode into folders?
12:57tool172[m]sorry. i got the json data flowing, now i'm working on formatting translating etc
12:58mstenta[m]Hi tool172 - sorry meant to follow up yesterday but dinner, kids bedtime, etc :-)
12:58mstenta[m]Glad to hear you figured it out!
12:58mstenta[m]A module can only have one `hook_menu` function, but it can provide multiple menu items
12:58mstenta[m]`hook_menu` returns an array of items
12:59mstenta[m]api.drupal.org/api/drupal/modules%21syst
21:15tool172[m]so i have one hook right now for the api key storage in farm settings
21:15tool172[m]but i would need to either subfolder that or are you suggesting a better way with returning the arrays
21:15*alexandria[m] has joined
21:15tool172[m]the Drupalize is confusing me, php not so much - i can grind that out
21:23paul121[m]tool172: do you mean something like this? github.com/farmOS/farmOS/blob/7.x-1.x/mo
21:23tool172[m]well
21:23tool172[m]i could use like farm maps, make a sub folder (module within a module) with 2 hook menus
21:23paul121[m]that implementation of `hook_menu` returns multiple menu items. just an example
21:23tool172[m]one to store the api key
21:25tool172[m]right, but i need a hook item for the settings page and another for the actual reports
21:25paul121[m]you should be able to do it in the same module
21:26paul121[m]does that make sense, returning two items from `hook_menu` ?
21:47tool172[m]that's where my mind is blown
21:47tool172[m]i need a visiual code example
21:48paul121[m]check the link above! :-)
21:50tool172[m]and each hook array is only called by the runtime libraries or whatever when needed
21:50tool172[m]?
21:50tool172[m]it's the magic that always gets me with this thing
21:51tool172[m]well menu array
21:51paul121[m]haha yea there is some magic that happens there (some hooks are cached and not called as often)
21:52paul121[m]but the values you return are merged with all the others
21:52tool172[m]once i get this thing parsin json into views i'll strip out and modulize it and git repo it
21:52tool172[m]right now its strung across in php files
21:53tool172[m]i should buy php storm, i'm using notepad++ and winscp and my apache server
21:53paul121[m]yeah... php storm is nice. having the debugger helps see whats going on
21:54tool172[m]as always thanks guys
21:54mstenta[m]"hook_menu()" only runs occasionally. It is used to build the "{menu_router}" table in the database. That is what's actually used when a request comes into Drupal
21:54tool172[m]i'm making good progress right now...i'm tied in with the api and the json is flying in
21:54mstenta[m]It looks at the requested path and then looks that up in the database to find the callback function for it
21:55tool172[m]mentally i'm thinking of having some callbacks to shift the json requests around
21:56tool172[m]through a case in the hook when it runs
21:56tool172[m]then use Data to serve it as maps or i can us d3
21:56tool172[m]use not us
21:58tool172[m]i need to road map this because we can link it with livestock stuff
21:58tool172[m]and actually estimate income in nrt based on historical averages for stockyards etc local
21:59tool172[m]cash crops are also reported

< 292020-07-30⋏31 >