Cookbook /
FlagTooltips
Summary: Show tool tips for flags in page.
Version: 2025-12-05
Prerequisites:
Status:
Maintainer: Anomen
License: LGPL
Categories: Markup
Discussion: FlagTooltips-Talk
Questions answered by this recipe
It's possible to insert unicode characters which will make up flag of a given country. This recipe shows tooltip with name of country.
Description
Recipe adds tooltip on all flags found in page text.
Installation
Download flagtooltips.zipΔ.
You can also download up-to-date county list https://restcountries.com/v3.1/all?fields=name,cca2,idd.
and store it as pub/flagtooltips/countries.json.
In config.php, add the following line:
include_once("$FarmD/cookbook/flagtooltips.php");
Configuration
$FlagTooltipsUseLocal = false; // You can force downloading of country list from restcountries.com each time.
Usage
Automatic, just insert flags into the text. You can use https://emojipedia.org/ or similar service.
Example:
To do / some day / maybe
- load countrylist.json only if any flag is found on the page
- automatically fetch countrylist and cache it in wiki.d
Change log / Release notes
- 2025-12-05 - initial release
See also
Contributors
- Anomen (original author)
Comments
See discussion at FlagTooltips-Talk
User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.