This plugin shows a dynamically updating uniform for the 16AA member showing group membership lanyard, rank, qualifications, and awards.
Debug Mode can be toggled via the site setting discourse_project_uniform_debug_enabled. Setting DEBUG_MODE at the top of assets/javascripts/discourse/lib/pu-utils.js forces it on regardless of the admin value. When enabled, the browser console logs renderer events and tooltip hitboxes render as red outlines.
- Make CMT qualification show for non 16CSMR member by having a small badge, placed in the same place as CTM badges?
- Go over all tooltip text to ensure proper line breaks (Have done all ranks so far).
- Change RAMC collar badges to RAMS.
- Readjust the collar badges for 16CSMR and 7RHA persective, based on the current parachute reg collar badges.
- RAF Enlisted (FSAcr + SAcr) uniforms + ranks + specific qualifications + awards
- 7RHA + FST graphics (Qualifications)
- Should we add more info than just 4 Platoon for the various 4 Platoon elements?
- Add and organise implementation of remaining qualifications graphics
- Make the uniform accessible externally outside the discourse forum?
- Major rank and other crowns should show the Tudor crown
-
Uniform on users Summary tab Automatically renders a British-Army/RAF style uniform on a member’s Discourse user Summary page. The uniform shows rank insignia, unit/group crests, lanyards, qualification badges, and up to 12 medal ribbons (three rows of four) with perspective-aware spacing. The canvas fades in over 0.5 s for a cleaner load.
-
Per-group visuals & lanyards (including Platoon/FSG/Signals/CSMR) Group membership adds crests and appropriate lanyard images; each lanyard has a defined tooltip region on the canvas.
-
Per-service variants for some quals and ribbons Examples: Paratrooper badge swaps to a RAF variant when the user’s highest rank is RAF, and CSA ribbons automatically switch to the RAF artwork when appropriate. 1st Class Marksman does not display for 16CSMR members, flight ranks, or BA ranks of WO2 or above.
-
Rich tooltips (hoverable hot-zones) Hovering over rank patches, qualifications, lanyards, group crests, and ribbons shows image-backed tooltips (with image + text).
-
Fast page loads via image caching Foreground and ribbon images are loaded with an in-memory cache, while the server-side cache key automatically changes whenever the plugin version or any image bytes change, ensuring updated art is fetched immediately.
Public endpoints are in development. The site setting discourse_project_uniform_public_enabled is currently locked off while the snapshot workflow is finalized:
- HTML view:
/uniform/:usernamerenders a standalone uniform page. - PNG snapshot:
/uniform/:username.pngreturns the most recently captured uniform image. If no snapshot exists yet, a placeholder PNG is returned with the URL to visit to generate it.
The HTML view automatically posts a snapshot after rendering, so the PNG endpoint will return the correct image after the page has been visited at least once for that user.
-
Admin-only toggle via site setting that blocks non-admins from seeing the plugin feature when enabled.
-
Debug toggle via site setting that adds extensive debugging console messages and red hitbox area indicators for tooltips.
- Initializer (entry point): page-change hook, data fetch, debug overlay, calls the pipeline.
assets/javascripts/discourse/initializers/discourse-project-uniform.js.es6 - Data catalog: backgrounds, ranks, groups, lanyards, quals, awards (+ tooltip metadata & hit-areas).
assets/javascripts/discourse/uniform-data.js - Prepare step: builds the “what to draw” lists (bg/fg/ribbons/quals), applies throttling and special rules.
lib/pu-prepare.js - Render step: draws canvas, composes layers, lays out ribbons, registers tooltips.
lib/pu-render.js - Tooltip engine: registers hit-regions, attaches/fades tooltip DOM, optional debug boxes.
lib/pu-tooltips.js - Styles:
.canvas-tooltipCSS.assets/stylesheets/canvas-tooltip.scss - Assets: images for uniforms, ranks, groups, lanyards, quals (incl. tooltip variants), ribbons, and medals (folder tree in the code summary).
- British Army – Officer
- British Army – Enlisted
- RAF – Officer
- RAF – Enlisted
British Army – Officers
- Major, Captain, Lieutenant, Second_Lieutenant (collar regions)
British Army – Enlisted
- Warrant_Officer_Class_2, Colour_Sergeant, Staff_Sergeant, Sergeant, Corporal, Lance_Corporal (sleeve regions)
Royal Air Force – Officers
- Squadron_Leader, Flight_Lieutenant, Flying_Officer, Pilot_Officer (sleeve braid regions)
Royal Air Force – Enlisted (Aircrew)
- Flight_Sergeant_Aircrew, Sergeant_Aircrew (sleeve regions)
- 16CSMR shows RAMC badges on the collars.
- 7RHA shows Royal Artillery badges on the collars.
- Lightblue & Maroon (Coy HQ)
- Red (1 Platoon)
- Green (2 Platoon - not in use as of this writing)
- Black (3 Pl; FSG & FSG HQ; 4-1; 13AASR; 16CSMR; 216 Para Signals)
- Red & Blue (7RHA)
- Green & Lightgrey (MI)
Pilot track (only highest shown):
- Senior Pilot
- Junior Pilot
Marksmanship track (only highest shown):
- Sniper
- Sharpshooter
- 1st Class Marksman
Leadership track (only highest shown):
- PCBC (Platoon Commander's Battle Course)
- PSBC (Platoon Sergeant's Battle Course)
- SCBC (Section Commander's Battle Course)
- CC (Commander's Course)
- FTCC (Fire Team Commander's Course)
Other notable quals:
- CMT (Combat Medical Technician) — only rendered for 16CSMR even if user in other group has the qualification.
- Paratrooper with RAF-specific art variant. Swaps if flight rank.
- Meritorious Service Medal
- Most Valuable Soldier
- Mention in Dispatches with Four Oak Leaves (5× award)
- Mention in Dispatches with Three Oak Leaves (4× award)
- Mention in Dispatches with Two Oak Leaves (3× award)
- Mention in Dispatches with Oak Leaf (2× award)
- Mention in Dispatches (single award)
- Significant Effort Gold
- Significant Effort
- Long Service and Good Conduct Medal with Two Silver Clasps (10 years)
- Long Service and Good Conduct Medal with Silver Clasp (5 years)
- Long Service and Good Conduct Medal (2 years)
- Mission Maker First Class (3rd Operation)
- Mission Maker Second Class (2nd Operation)
- Mission Maker Third Class (1st series of missions)
- Technical Excellence
- RRO Excellence Award
- Recruiter Medal
- Esprit de Corps with Gold Clasp
- Esprit de Corps
- Citation with Four Oak Leaves (5× award)
- Citation with Three Oak Leaves (4× award)
- Citation with Two Oak Leaves (3× award)
- Citation with Oak Leaf (2× award)
- Citation (single award)
