Support Thread

Hide content (spoiler)

📅 👤 ASP Playground
Hide content (spoiler) — APG vNext Guide

This archived community thread from the APG vNext support forum discusses: Hide content (spoiler).

About This Topic

Here is a custom PGDCode you can put into the control panel that allows you to hide some content in a message for whatever purpose you want, for example, spo...

Getting Help with APG vNext

APG vNext is a powerful ASP.NET forum and community platform. For questions related to this topic:

If you need direct assistance, the support team is active in the community forum.

Spoiler Tags in APG vNext

Hide content behind click-to-reveal toggles using BBCode spoiler tags. Popular in gaming and Q&A communities.

Usage

[spoiler]Hidden content[/spoiler]
[spoiler title="Show answer"]SELECT COUNT(*) FROM apg_Posts[/spoiler]

Enable

<add key="APG.BBCode.Spoiler.Enabled" value="true" />

CSS

.apg-spoiler-content { display:none; }
.apg-spoiler-content.revealed { display:block; }

Related Resources

Spoiler Tags and Hidden Content in APG vNext

APG vNext supports spoiler tags that hide content behind a click-to-reveal mechanism, allowing members to share plot spoilers, exam answers, or sensitive information without forcing it on readers who don't want to see it. The spoiler tag syntax in the APG vNext editor is [spoiler]hidden content here[/spoiler]. The hidden content is rendered as a blurred or collapsed section with a "Reveal" button that members click to view the content. Configure the spoiler appearance in Admin Panel → Editor → Content Tags → Spoiler Style. For communities with heavy spoiler culture (film/TV discussion forums, gaming communities, book clubs), ensure the spoiler tag is prominently featured in the post editor toolbar so members can easily access it without knowing the BBCode syntax.

Code Block Hiding for Long Technical Content

Similar to spoiler tags, APG vNext supports collapsible content blocks for long technical content such as configuration files, stack traces, or log outputs that would otherwise dominate the visual space of a forum thread. Use the collapsible block tag to hide long content behind a toggle button, with a descriptive label that tells members what the hidden content contains. Collapsible blocks improve thread readability by reducing the visual length of technically-dense posts without removing the content — members who need to see the full configuration or log output can expand it, while those who are just reading the discussion can skim past it.

Accessibility Considerations for Hidden Content

Hidden and collapsible content requires careful accessibility implementation to ensure screen reader users can access it. APG vNext's spoiler and collapsible implementations use ARIA attributes (aria-expanded, aria-controls) to convey the expanded/collapsed state to screen readers, and all toggle buttons have descriptive labels that communicate both the action and the content category. Test hidden content behaviour with a screen reader (NVDA, VoiceOver, JAWS) after any customisation to verify that the accessibility attributes are preserved and that the toggle interaction works correctly for keyboard-only navigation.

Moderating Spoiler Tag Abuse

Some members abuse spoiler tags to hide content that violates community guidelines, knowing that moderators may not expand every spoiler tag during content review. Configure APG vNext to include spoiler tag contents in the full-text search index and in the post moderation queue's text view, ensuring that spoiler-hidden content is visible during moderation review. You can also configure the moderation tools to automatically flag posts containing spoiler tags for moderator review in communities where spoiler misuse has been a problem, allowing targeted oversight without requiring moderators to manually check every spoiler-tagged post. Train moderators to always expand spoiler tags when reviewing content for guideline compliance, and include a clear policy in the community guidelines that spoiler tags do not exempt content from guideline enforcement.

Custom Spoiler Labels for Community Context

APG vNext's spoiler tag supports a custom label that tells readers what kind of content is hidden before they choose to reveal it. The label syntax is [spoiler=Movie Title]hidden content[/spoiler], which renders as a button labeled "Spoiler: Movie Title - Click to Reveal." Use custom labels to help readers make an informed decision about whether to reveal the spoiler. For gaming communities, common label conventions include the game name and chapter number. For TV communities, the season and episode number. Custom spoiler labels significantly improve the user experience because readers can avoid specific spoilers they care about while being comfortable revealing others, creating a much better shared viewing experience than unlabeled spoilers where every hidden block is a gamble.

Spoiler Formatting in the Rich Text Editor

APG vNext's rich text editor includes a Spoiler button in the editor toolbar that wraps selected text in spoiler tags without requiring members to know the BBCode syntax. The Spoiler button dialog includes an optional Label field where members can enter the spoiler label. Make the Spoiler button prominently visible in the editor toolbar for communities where spoiler culture is strong, and include a brief guide in the community FAQ explaining how to use spoilers correctly. A well-understood spoiler culture where members consistently use spoiler tags for potentially sensitive content creates a more welcoming environment for both experienced fans and newcomers discovering content for the first time.


Looking for more help? Browse the support forum or check the Knowledge Base.