⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

[Feature Request] Automated Expert Badge System & Temporal Validation based on upcoming Granular Permission Model #3954

@d0ubIeU

Description

@d0ubIeU

Building upon the upcoming Granular Permission Model #3832 and the Custom Pages feature #3015 + Web-Push-API #3845 already integrated for version 4.2, I would like to propose the following enhancement for discussion to further strengthen phpMyFAQ’s authority management capabilities and build more trust in the published information.

Automated Expert Badge System & Temporal Validation

1. Motivation / Problem Statement

Whether in specialized professional fields (like law or medicine), corporate documentation, or large-scale community projects, users need to distinguish between general user contributions and officially verified expert knowledge.

The Challenges:

  • Authority at Scale: In any environment where information accuracy is critical, the lack of a visual certification for category-specific expertise leads to uncertainty. Users need to know: "Is this person qualified to answer this specific topic?"
  • The Freshness Gap: Guidelines, software standards, and community best practices evolve rapidly. Without a temporal validation system, authoritative knowledge "decays" silently, leading users to rely on outdated information that was correct three years ago but is obsolete today.
  • Search & AI Trust (E-E-A-T): Search engines (Google) and AI-crawlers (LLMs) increasingly prioritize content that can prove its Experience, Expertise, Authoritativeness, and Trustworthiness. Providing structured data for expert verification is a key competitive advantage for any phpMyFAQ-based project to gain visibility.

The Goal:
To transform phpMyFAQ into a High-Trust Knowledge Platform by implementing a system that actively manages and displays the authority and "freshness" of content, ensuring reliability for both human readers and automated discovery systems.


Use Case Example: IT Security Guidelines

  1. Initial Creation: A member of the Support team creates an article: "How to set up Two-Factor Authentication (2FA)". Since the author has no expert permissions, the article is published as a standard entry without any badge.
  2. Expert Review & Takeover: "Markus," a member of the Security Experts group (holding Expert permissions for the "Security" category), reviews the article. She adds a specific technical warning and clicks Save.
  3. Automatic Certification: The system recognizes the expertise of Markus for this category. It automatically attaches the "Certified Security Expert" badge and sets the valid_until date to 12 months from today.
  4. Public Trust: Users now see the article with a shield icon and a tooltip: "Expert verified by Markus (IT-Security) on Feb 8, 2026. Status: Certified".
  5. Lifecycle Alert: One year later, Markus receives a Web Push Notification: "Your verification for '2FA setup' expires in 14 days."
  6. One-Click Renewal: Markus clicks the notification, reviews the content, and confirms it is still up-to-date by clicking the "Still Accurate - Renew Badge" button.
  7. Audit Trail: The valid_until timer resets for another year. A new system-revision is automatically created in the background: "Expert re-validation by Markus (No text changes)".

2. Proposed Solution

I propose the implementation of an Expert Badge System that is natively integrated with the upcoming Granular Permission Model. Unlike static "marketing badges" or simple profile images, this system is purely logic-driven and context-aware.
Key Components:

  • Dynamic Rendering: Badges are not manually assigned as images; they are dynamically rendered based on the author’s real-time permissions for a specific category and language.
  • Role vs. Expertise: The system distinguishes between:
    1. Organizational Roles (Static): Representing a fixed rank within the organization (e.g., "Senior Editor" or "Project Lead").
    2. Subject Matter Expertise (Dynamic/Temporal): Tied to a specific category and subject to a "Verification Cycle."
  • A11y-First Design: All badges are rendered as accessible HTML/SVG components.
  1. High Contrast Adaptation: In High Contrast Mode, badges are automatically simplified. Decorative elements and gradients are stripped away, focusing on clear outlines, high-contrast typography, and distinct icons to ensure maximum legibility.
  2. Assistive Tech: Every badge includes descriptive ARIA labels, ensuring screen readers can communicate the expert status and validity to visually impaired users.

3. Functional Requirements

A. Permission-Based Badge Rendering

  • Automated Logic: A badge is only rendered if the author holds specific Publish or Expert permissions for the exact category and language of the article.
  • Context-Awareness (Integrity): The system strictly separates roles. If a "Legal Expert" writes an article in a "General IT" category where they do not hold expert status, no expertise-badge is displayed. This ensures that authority is never overextended and remains credible for both users and search engine crawlers (E-E-A-T).

B. Multiple Badge Types & Group Administration

  • Expertise Badges (Temporal): Linked to specific categories and languages (e.g., "Legal Expert: Labor Law"). These are subject to a verification cycle and can expire.
  • Role Badges (Static): Linked to organizational status (e.g., "Senior Partner" or "Official Support"). These represent a permanent rank and do not expire.
  • Centralized Asset Management: Administrators define badges globally. To ensure full A11y compliance, the system allows storing two distinct graphic assets (SVGs) for each badge:
    1. Standard Mode: Rich, branded version (color, gradients).
    2. High-Contrast Mode: Simplified, high-visibility version (solid outlines, no noise).
  • Assignment: Admins do not "attach" badges to articles. Instead, they assign users to Badge Groups within the Permission Matrix. The system handles the rest dynamically during rendering.

C. Multiple Badge Types & Priority Logic

Expertise Badges (Temporal / High Priority): Linked to specific categories and languages. These represent the highest level of authority in the system.
Role Badges (Static / Normal Priority): Linked to organizational status.

Authority Hierarchy:

  • Expert > Role: If a qualified expert edits an article written by someone with only a Role Badge (e.g., "Official Support"), the change is applied immediately, and the article is elevated to "Expert Verified" status.
  • Role > Expert (Safety Buffer): If a user with only a Role Badge edits an article currently verified by an expert, the changes are saved as a draft/revision, but the system automatically triggers a high-priority notification to the expert. The expert must review and "re-validate" the changes to maintain the badge's integrity.
  • Role-Badged Articles: If a standard editor edits an article with an Organizational Role Badge, the changes are saved, and the badge remains (as it is tied to the author's rank, not the content's specific technical proof). Original author with role status receives a notification.
  • Expert-Badged Articles: If a standard editor modifies an Expert-Verified article, the Expert Badge is immediately set to "Review Pending" (Grey-out mode with the expiry icon). The factual "seal of approval" is potentially broken by the new unverified edits.

Automated Notification: The original Expert (the verifier_id) or the entire Expert Group for that category receives an immediate notification (Email/Web-Push): "Your verified article [ID] was modified by [Editor Name]. Please review the changes to restore the Expert Status."
Restoration: The Expert Badge only returns to the "Verified" (Active) state once a qualified expert clicks the "Re-Validate" button or performs their own edit.

D. Temporal Validation (Verification Cycle)

Logic-Driven Status: Expert badges are never assigned manually. The system automatically derives the "Expert" status by checking if the author’s permissions in the Granular Permission Matrix match the article's category and language.

Automatic "Verified" Activation:

  • When a qualified expert publishes or updates an article, the system automatically tags the version as "Expert Verified". This action sets a valid_until timestamp based on the badge's pre-defined validity period (e.g., 6/12 months).

Automated Expiry ("Review Pending"):

  • Logic: Once the valid_until date is reached, the system automatically switches the badge to a "Review Pending" state.
  • Normal Mode: Visualized via a CSS grayscale filter and reduced opacity.
  • High Contrast Mode: Since color changes are insufficient for A11y, the badge must undergo a structural change. It receives a dashed border and an "Expiry Icon" (e.g., a warning triangle) to ensure legibility and clear communication of the status.
    Trust Maintenance (SEO): The lastReviewed and reviewBy fields in the Schema.org metadata are automatically synced. This signals to search engines (E-E-A-T) exactly how "fresh" the expert's validation is.

Standard Articles: Content by authors without matching expert permissions follows "normal" rules (no badge, no expiry logic), ensuring a clean separation between general and authoritative content.

Expert Review & Takeover:

  • If a standard user creates an article, it initially has no badge.
  • If a qualified expert subsequently edits and saves this article (within their permitted category), the system automatically elevates the article's status to "Expert Verified".
  • The verifier_id is updated to the expert's ID, and the valid_until timer starts fresh. This allows experts to "vouch" for community-generated content by reviewing and finalizing it.

E. Expert Self-Service: Low-Friction Maintenance

To ensure the knowledge base stays fresh without overwhelming the experts, the system focuses on minimal administrative overhead:

Proactive Notifications (Multi-Channel):

  • Automated Email: Standard cronjob-triggered reminders 14 days before expiry.
  • Web-Push-API: For a more integrated experience, experts receive real-time browser notifications. This allows them to jump directly to the pending article without checking their inbox.

The "One-Click Re-Validation" (High Efficiency): If the expert reviews the article and determines the content is still accurate, they can renew the validity with a single click.

  • Workflow: A prominent "Still Accurate - Renew Badge" button appears in the expert's dashboard and on the article page itself (for authorized experts).
  • Effect: This resets the valid_until timer and updates the updated timestamp. No editor, no manual text changes, and no admin intervention required.
  • Mandatory Revision Integrity: Every "One-Click" renewal or article edit automatically creates a article revision.
    This ensures that the audit trail shows exactly who vouched for the content at what time, even if the text remained identical.
  • Dashboards: A dedicated "My Expiring Expertise" view in the admin panel lists all articles that need a quick "One-Click" check, sorted by urgency.

4. Technical Specifications

A. Database Schema Updates

Table faqdata (Extension):

  • verified_at (datetime): Timestamp of the last expert validation.
  • valid_until (datetime): Calculated expiration date of the expertise.
  • verifier_id (int): User ID of the expert who last vouched for the content.

Table faq_badges (New):

  • id(int): Primary Key.
  • name (string): Label of the badge (e.g., "Legal Expert").
  • *explanationUrl(string): link to the badge page
  • icon_standard (text/svg): SVG source for normal display.
  • icon_high_contrast (text/svg): Simplified SVG for A11y/High-Contrast Mode.
  • color_scheme (string): Stores a HEX color or a CSS variable name. It defines the visual identity of the badge group in standard mode, while allowing the High-Contrast engine to override it with accessible system colors
  • validity_duration (int): Duration in days (e.g., 365) until re-verification is required.
  • type (enum): static (roles) or temporal (expertise).

B. Permission & Badge Service

Expertise Evaluation: The PermissionService must perform a real-time cross-reference check: User Permissions + Group Assignment + CategoryID + Language

Automated Trigger: On Faq::save(), if the CurrentUser holds expert permissions for the category, the valid_until and verifier_id are automatically populated.

C. Frontend & Template Engine

Template Variables: To ensure a flexible and accessible UI, the following variables are exposed to the articles.tpl via an expertBadge and expertValidation object:

  • hasValidExpertBadge (bool): A global flag to determine if any expertise-related UI elements should be rendered.
  • expertBadge (object):
  1. name (string): The display label of the badge (e.g., "Legal Expert: Labor Law").
  2. icon (string): The pre-rendered SVG source, automatically selected by the server based on the active theme (Standard vs. High-Contrast).
  3. color (string): The value from the color_scheme (either a HEX code or a CSS variable name).
  4. type (string): static (organizational roles) or temporal (subject matter expertise, used for CSS-based "Grey-out" logic).
  5. status (string): verified (active) or review_pending (expired).
  6. explanationUrl (string): A permalink to a dedicated Custom Page where badge levels are defined and the experts' credentials/biographies are presented.
  • expertValidation (object):
  1. verifierName (string): The display name of the subject matter expert who last vouched for the content.
  2. verifiedAt (string): The localized and formatted date of the last successful verification.
  3. expirationDate (string): The localized and formatted date when the current verification period ends/ended.Support).

A11y-Tooltip: A rich ARIA-supported tooltip displaying:

  • Last verified date (formatted via phpMyFAQ's date helper).
  • Expert’s display name.
  • Current status (e.g., "Certified" or "Needs Re-check").

Badge Transparency & Authority Link
To ensure maximum credibility, each badge is linked to a specific Custom Page (leveraging the new feature from #3015). This page serves as a "Trust Center" for the knowledge base. It provides:

  • Definition of Standards: A detailed explanation of what each badge signifies (e.g., the criteria for becoming a "Legal Expert").
  • Expert Profiles (Vita): A presentation of the subject matter experts, including their professional backgrounds, certifications, and areas of expertise.
  • Portfolio View: A list or link to all articles currently verified by that specific expert, allowing users to browse all "High-Trust" content from a single authoritative source.

D. Notification & Web-Push Logic

  • Service Worker Integration: Implementation of the Web-Push-API to notify experts directly in the browser.
  • Cronjob: A daily task checking valid_until < (NOW + 14 days) to trigger both Email and Push-Notifications.

E. SEO & Grounding (Metadata)

The internal linking structure to custom pages (badge page) strengthens the site's authority in the eyes of search engines (Google E-E-A-T) by connecting high-quality content directly to verified author profiles.

Schema.org Integration: The JSON-LD generator is extended to include:

  • reviewedBy: Linking to the expert's profile/name.
  • lastReviewed: Mapping to verified_at.

This ensures E-E-A-T visibility for Google and LLMs.

5. Business Value & Added Value

This feature elevates phpMyFAQ into a Professional Authority Management System:

  • Trust & Authority (E-E-A-T): The badges provide immediate visual trust and reduce liability risks by signaling "Currentness." This directly boosts SEO rankings (Google E-E-A-T) and AI-discoverability.
  • Automated Content Lifecycle: It prevents the "rotting" of information. Instead of silent decay, the system actively forces experts to maintain content, ensuring long-term reliability.
  • Zero Admin Overhead: Once the initial setup is complete, the entire quality assurance process is automated between the experts and the system.
  • A11y Excellence: By providing specific high-contrast assets, the system ensures that authority and trust remain accessible to all users, regardless of visual impairment.
  • Competitive Advantage: This granular, time-sensitive verification is a premium feature usually found in expensive enterprise solutions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions