view.php
Table of Contents
Functions
- HookFacesViewCustompanels() : bool
- Adds a custom panel to the resource view page displaying detected faces and tagging options.
Functions
HookFacesViewCustompanels()
Adds a custom panel to the resource view page displaying detected faces and tagging options.
HookFacesViewCustompanels() : bool
This hook is is triggered during the view.php rendering process.
It queries the resource_face table for any faces detected in the current resource, and if found,
renders a table showing cropped face previews along with a dropdown to tag the face with a named person.
It also includes a link to perform a face similarity search (!face<ID>).
Image dimensions are used to correctly crop and scale face previews for display using CSS background properties.
Tagging actions invoke the faces_tag API via JavaScript to persist the selected person name (node) for each face.
Tags
Return values
bool —Returns false to allow further custom panels to be rendered after this one.