phpBB 3.1 extension to allow the use of group switches in HTML files.
Clone (or download and move) the repository into the folder phpBB3/ext/phpbbmodders/groupswitches:
cd phpBB3
git clone https://github.com/phpbbmodders/phpbb-3.1-ext-groupswitch.git ext/phpbbmodders/groupswitches
Go to admin panel -> tab customise -> Manage extensions -> enable Group Switches
To use this extension you should know the template events that are available for you. You can find these template events here toward the bottom of the page.
Once you determine the template event you want to use, simply make a new template event html file with the code you want for the group switch to display. An example can be found here you do not need the edits to the core PHP phpBB files.
Directories have been created but unpopulated in the extensions directory where you can add your html file and it will be automagically included into the forums html files (use the "all" directory if you want it displayed on every template or prosilver or subsilver if you only want it to display on those styles). Simply add your html file into the event directory of whichever style.
To achieve a list of numbers that are associated with your groups visit the user and groups tab and click on the Group Switches link.