Crazy this doesn’t check the custom directory
Only 2 lines within the additionaldetails utility file would need to be added
a check for the caption template
and another for the body template
thoughts?
Crazy this doesn’t check the custom directory
Only 2 lines within the additionaldetails utility file would need to be added
a check for the caption template
and another for the body template
thoughts?
Sorry, where exactly is this? How can I find it in the UI? And in the code?
What versions are you talking about?
include/utils/additional_details.php
this file is for determining what fields show up within the popup boxes when hovering over calendar items.
currently it only grabs the template files from the standard locations and it does not check if there are template files within the custom folder
$caption = $templateCaption->fetch('modules/'. $bean->module_name .'/tpls/additionalDetails.caption.tpl');
$body = $templateBody->fetch('modules/'. $bean->module_name .'/tpls/additionalDetails.body.tpl');
I believe it would be any version but most certainly the latest 7.14.6
Understood, In that guess you can raise a PR on the GitHub.
I believe there are ways to extend this, search the code for $additionalDetailsFile
and you will see places where the mechanism is used.
I am not sure how it works, and I don’t recall seeing this documented. I did have this bookmark, for what it’s worth:
But I would say that the per-module “additional details” (which append the module name to the file being loaded) are not the same mechanism as the ones that reference that $additionalDetailsFile variable.
If you find out how it works, please come back and tell us
to get full functionality for this (add support for custom modules)
the following changes should be considered
ability to add entries to $activityList
variable within /modules/Calendar/Calendar.php
(include by file or records in db, item in config.php, etc)
(controls if records display when completed and which fields on the record are used as start and end datetime fields)
ability to add entries to $activity_colors
variable within /modules/Calendar/CalendarDisplay.php
(include by file or records in db, item in config.php, etc)
(Controls the colours of the items border, body, and text)
You shouldn’t need to allow users to add or edit the array returned by CalendarUtils::get_fields()
as this does not seem to be relevant anymore (or is straight up replaced by the additionalFields metadata)
As long as there are entries in the aforementioned variables $activityList
and $activity_colors
(inside their respective files) any custom module records with 2 datetime fields can show in the calendar.
If those modules have the additionalDetailsFile in the default location, they will be picked up automatically without further changes, however users won’t be able to override the fields that are displayed on the item by placing an additionalDetailsFile in the custom directory without making the change to check the custom directory within /include/utils/additional_details.php