IRC logs for #farmOS, 2019-08-02 (GMT)

2019-08-01
2019-08-03
TimeNickMessage
[04:13:49]* JustTB has joined #farmos
[10:56:50]* Unruly247 has joined #farmos
[10:57:25]* Unruly247 has quit (Remote host closed the connection)
[10:57:53]* Unruly247 has joined #farmos
[11:41:00]<skipper_is[m]>Do you know any good Drupal tutorials for developing my own modules?
[11:48:23]* Unruly247 has quit (Read error: Connection reset by peer)
[11:53:00]<mstenta[m]>On drupal 6
[11:53:01]<mstenta[m]>I've heard good things about drupalize.me
[11:53:03]<mstenta[m]>I learned with "Developing Drupal" book years ago
[11:53:04]<mstenta[m]>This is a great set of examples: https://drupal.org/project/examples
[12:01:33]* alfah_a[m] has joined #farmos
[12:55:00]<skipper_is[m]>Ah nice, cheers. If you make a change to a module, like add a new form or menu, do you need to disable and re-enable it to see teh change?
[12:56:06]<mstenta[m]>No but depending on the change you may need to clear cache (s)
[13:37:21]<skipper_is[m]>Under Performance?
[13:38:17]<skipper_is[m]>Also, the main FarmOS menu bar, what is the name of it? It isn't the 'navigation' menu is it?
[13:48:09]<mstenta[m]><skipper_is[m] "Under Performance?"> Yep! And there are other ways too, like Drush
[13:48:27]<mstenta[m]><skipper_is[m] "Also, the main FarmOS menu bar, "> 'farm'
[13:51:38]<skipper_is[m]>And can a module only have one modulename_menu() hook?
[13:51:50]<skipper_is[m]>I tried modulename_2_menu() but it didnt work
[13:52:04]<mstenta[m]>Yes but it can add multiple menu items
[13:52:27]<skipper_is[m]>Ooh, so you'd just have an items[] array of arrays?
[13:53:08]<mstenta[m]>Yup
[13:53:22]<mstenta[m]>Google "Drupal hook_menu"
[13:53:33]<mstenta[m]>The API docs are good
[13:53:47]<mstenta[m]>I'm outside right now, otherwise I'd be more helpful :-)
[13:53:54]<skipper_is[m]>Ah no worries :)
[13:53:57]<skipper_is[m]>Cheers anyway!
[14:12:55]<skipper_is[m]>ACTION uploaded an image: image.png (104KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/SkRXGTDhZqyeQPam... >
[14:13:12]<skipper_is[m]>Well, I'm proud of thjat
[14:13:12]<skipper_is[m]>*that
[14:13:48]<mstenta[m]>Nice!!!
[14:14:11]<mstenta[m]>Hook area details right?
[14:14:19]<mstenta[m]>(something like that) :-)
[14:14:59]<mstenta[m]>FYI the available hooks are generally documented in MODULENAME.api.php
[14:15:48]<skipper_is[m]>...Now he tells me...
[14:16:14]<skipper_is[m]>Yea, hook area details, it is just going to display the units in the other unit, so if it is Ha, it'll give it in acres
[14:16:18]<skipper_is[m]>and visa versa
[14:16:24]<mstenta[m]>Haha
[14:16:37]<mstenta[m]>Oh cool
[14:16:52]<skipper_is[m]>Some of my colleagues work in acres, and I prefer hectares
[14:17:57]<skipper_is[m]>The only concern I have is if I call farm_area_calculate_area($id, FALSE) is it calculating the area twice, one through the main area_details once through mine?
[14:18:11]<skipper_is[m]>And is that going to massively slow it down?
[14:18:15]<mstenta[m]>Might be
[14:18:26]<mstenta[m]>I don't think it'll slow it down much
[14:18:46]<skipper_is[m]>Okay, it does take a second or 2 for the popup to appear
[14:18:47]<mstenta[m]>But we could put some caching in that function
[14:19:10]<skipper_is[m]>Oh that is too complex for me at this stage
[14:19:49]<mstenta[m]>Look up drupal_static function not too hard
[14:20:20]<mstenta[m]>Yea I forget why the popup is slow... It's an Ajax request so maybe that's why
[14:20:39]<skipper_is[m]>Ah okay, so possibly not because of the additional call
[14:21:04]<mstenta[m]>Yea probably not
[14:21:16]<skipper_is[m]>2.09s it takes, I can live with that
[14:40:14]<mstenta[m]>Ugh that's too long
[14:40:30]<mstenta[m]>I should really get PHP profiler set up
[14:42:28]<skipper_is[m]>It is probably my server
[14:43:17]<skipper_is[m]>ACTION uploaded an image: image.png (169KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/LQcJbNzDfeNZtQzb... >
[14:43:24]<skipper_is[m]>Happy with that :)
[14:43:42]<mstenta[m]>Nice!!
[14:58:20]* h8x0rd has quit (Ping timeout: 272 seconds)
[15:44:41]<skipper_is[m]>https://github.com/Skipper-is/farm_area_combined
[17:46:47]* h8x0rd has joined #farmos
[19:14:35]* h8x0rd has quit (Ping timeout: 244 seconds)