====== mediatooltip Plugin ====== ---- plugin ---- description: author : Myron Turner email : turnermm02@shaw.ca type : action lastupdate : 2021-04-15 compatible : Greebo, Hogfather depends : conflicts : similar : tags : tooltip, media, mediamanager downloadurl: https://github.com/turnermm/mediatooltip/archive/refs/heads/layout.zip bugtracker : https://github.com/turnermm/mediatooltip/issues sourcerepo : https://github.com/turnermm/mediatooltip donationurl: screenshot_img : ---- ==== Installation ==== For the basic install use the Dokuwiki [[.:extension|Extension Manager]]. This should work without incident. If not, then for a manual install, see [[:plugin_installation_instructions#manual_instructions|Plugin Installation Instructions]]. ===== About ===== This plugin was initially developed to create enhanced tooltips and image filenames for wikis that use images based on photographs. However it has been expanded for use with any media files. The tooltips are based on the jQuery tooltip widget, and their appearance can be controlled by making changes to the ''style.css'' file that is included in the plugin directory. ==== Expanded tooltip support ==== The latest upgrade includes expanded support for tooltips. It provides for inclusion of up to eight fields in the tooltip data and display: - **Camera** make and type, assuming one was used - the **File** in which the image is stored on the server - the **Exposure** data, if ''Camera'' is selected - the **Date** that the image or photo was created - the name of the **Artist** or potographer who made the image/photo - **Caption**, if provided - **Copyright** info if available - the **Size** of the image in pixels and size of the file on the server ==== Copyright Statement ==== If copyright statement is included, it can be included in the tooltip or on-screen underneath the image or in both places. The size of the on-screen copyright text is set in ''style.css'' using the ''mtip_copy'' class and is pre-set to ''x-small''. ===== Configuration ===== The output of the MediaToolTip plugin for photo-based images is controlled by its configuration options. The choices made from the options will alter the file names of the images and depending on the option may affect the information given in the tooltips. Otherwise, all media files will have the jQuery tooltips. ^ Option ^ Brief Description ^ Choices ^ Default ^ | captionpos | Placement of caption field; has precedence over copyright placement for under image position | on-screen underneath image, in the tooltip | | | ''copypos'' | Placement of copyright statment | 1) in the ''tooltip'' \\ 2) ''on-screen'' underneath the image \\ 3) ''both'' in the tooltip and under the image | tooltip | | ''fields'' | Checkbox for selecting one or more fields for inclusion in tooltips | Camera, File, Exposure, Date, Artist, Copyright, Caption, ImgSize, FileSize | File, Copyright | | ''groups'' | comma separated list of user groups to be used for creating image ids | | | | ''enable_userid'' | use userid in creating image ids | 1,0 | 0 | | ''enable_real'' | use user's real name in creating image ids | 1,0 | 0 | | ''date_style'' | choose whether and which date style to use in creating image ids | date_hms \\ date_hm \\ date,none | date_hms | | ''time_format'' | time format for creating image ids;the time is taken from the date on which the photograph was taken | hour.min.sec \\ hour-min-sec \\ hour_min_sec | hour.min.sec | ===== Constructing the Id for Photo-Based Images===== If all the defaults are retained, the image id in the Media Manager will have this format: * Year-month-day_uploaded_image name_userid.extension For example, for an image named **sunset.jpg** with a user named **jack**, that was photographed on** November 12 2018,** the file name would be: * 2018-11-12_sunset_jack.jpg If ''enable_userid'' is set to ''false'', then the user's real name will be used instead of the userid. * 2018-11-12_sunset_jack_smith.jpg If the user belongs to one of the ''groups'' and ''enable_userid'' is set to ''false'', the group name will be used. Similarly, if **both** ''enable_userid'' and ''enable_real'' are false, the group name will be used. For instance: * 2018-11-12_sunset_hikers.jpg Without a group name and without enabling of userid and the user's real name, the image would be named : * 2018-11-12_sunset.jpg Finally, if no date is found, the image will be named as found on upload: * sunset.jpg ===== Examples ===== All media files will have tooltips styled by the jQuery tooltip widget. But all images that have photo data attached to them will have tooltips with photo data included. Below are tooltips for two photos, one with a filename that has been changed using the above options, one without filename changes. |filename|2016-02-20_18.32.41_04_final_coders.jpg|elders.jpg| |tooltip|{{https://i.imgur.com/a6xYY2h.png?300}}|{{https://i.imgur.com/1VUazie.png?300}}| |group|coders|none| |original image name|04_final.jpg|elders.jpg| |filename|non-image media tooltip| |eventcheck.tgz|{{https://i.imgur.com/DjOL1zp.png?220}}| |Expanded tooltip with Copyright and photo data((''Artist'' can be changed in lang.php using the ''creator'' setting))| |{{https://i.imgur.com/ObckTdj.jpg?400}}| For a "live" example, see: [[https://mturner.org/devel/playground/mediatooltip|]] ===== Issues ===== Please used either github or the forum to report any issues. {{rss>https://github.com/turnermm/mediatooltip/commits/layout.atom date }} {{rss>https://github.com/turnermm/mediatooltip/commits/master.atom date 4}}