IRC logs for #farmOS, 2020-07-06 (GMT)

2020-07-05
2020-07-07
TimeNickMessage
[02:00:14]* JustTB has quit (Quit: Leaving.)
[02:36:45]* JustTB has joined #farmos
[10:28:40]<tcmah[m]>Hi Guys, Is it possible to create a naming pattern /token for the "week #" since transplanting date? I would like to include this as opposed to [log:timestamp:short] in the log name
[10:30:38]<mstenta[m]>Hi tcmah - if you are self hosting you can override the naming pattern at /admin/config/log/types (iirc)
[10:30:52]<mstenta[m]>But you may be limited by the tokens ansible
[10:31:01]<mstenta[m]>Available*
[10:31:26]<mstenta[m]>Of course, with a custom module you can provide your own tokens too
[10:31:40]<mstenta[m]>So yes! It might take some coding but it's possible
[10:35:13]<tcmah[m]>Thanks for the prompt feedback. I'm self hosting and have since scrolled through the available tokens but couldn't find one that satisfies this requirement.
[10:35:58]<tcmah[m]>There is [current-date:since] but not sure if this takes a parameter?
[10:36:54]<mstenta[m]>Yea I think that's just "x days ago"
[10:37:37]<mstenta[m]>Most of those are provided by Drupal and the Token module. farmOS itself doesn't provide any tokens of its own
[10:37:56]<mstenta[m]>(unless I'm forgetting)
[10:38:30]<mstenta[m]>So it would probably require writing your own in a module, then using that token in the log name pattern
[10:40:23]<tcmah[m]>ok thanks, this helps. Now back to the videos I go to learn how to write a custom module 😀
[11:03:53]<mstenta[m]>Haha great! Good luck!
[11:04:10]<mstenta[m]>Remember this is Drupal 7, not 8 ;-)
[11:04:33]<mstenta[m]>Same basic concepts but some slight differences in writing modules
[11:05:02]<mstenta[m]>You basically just need a .info file and a .module file
[11:05:32]<mstenta[m]>And you put your hook implantations (specially named functions) in the .module
[11:06:30]<mstenta[m]>This looks pretty good at quick glance:
[11:06:32]<mstenta[m]>https://www.valuebound.com/resources/blog/how-to-create-custom-tokens-in...
[11:10:02]<tcmah[m]>Awesome, thanks!
[17:01:57]* JustTB has quit (Quit: Leaving.)
[18:36:16]* JustTB has joined #farmos