# Guest Gate Theme Component

**URL:** https://meta.discourse.org/t/guest-gate-theme-component/225107
**Category:** Theme component
**Created:** [April 23, 2022, 8:31pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107 "2022-04-23T20:31:54Z")
**Posts on this page:** 20
**Page:** 8

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [February 4, 2025, 5:41pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/142 "2025-02-04T17:41:34Z")

</div>

Hello @KhoiUSA 👋 Thanks, I merged an update: [DEV: Migrate FA5 icons to FA6 by VaperinaDEV · Pull Request #25 · VaperinaDEV/discourse-guest-gate-theme-component · GitHub](https://github.com/VaperinaDEV/discourse-guest-gate-theme-component/pull/25)🙂

---

<div class="post-metadata">

### Author: ![KhoiUSA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/khoiusa/32/373010_2.png) [@KhoiUSA](https://meta.discourse.org/u/KhoiUSA)
#### Post date: [February 4, 2025, 8:08pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/143 "2025-02-04T20:08:01Z")

</div>

Thanks for the update!

---

<div class="post-metadata">

### Author: ![jasedepuit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jasedepuit/32/513610_2.png) [@jasedepuit](https://meta.discourse.org/u/jasedepuit)
#### Post date: [June 29, 2025, 11:24pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/144 "2025-06-29T23:24:26Z")

</div>

Hi there - we have attempted to install this component on a new Discourse instance however we receive an error when the modal is set to display:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/8/5/18510dc838808685d6ab77b71aa844f40743cdf8.png)

The link is to [this post](https://meta.discourse.org/t/converting-modals-from-legacy-controllers-to-new-dmodal-component-api/268057).

Given the post is from 2023 it seems surprising that this update would be required for this component. So I’m wondering if we’ve done something wrong with our installation?

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [June 30, 2025, 12:50pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/145 "2025-06-30T12:50:23Z")

</div>

Hello 👋 Can you remove the component and reinstall this: [GitHub - VaperinaDEV/discourse-guest-gate-theme-component: Forced login / registration popup insired by Quora · GitHub](https://github.com/VaperinaDEV/discourse-guest-gate-theme-component) to make sure you use the correct component?

---

<div class="post-metadata">

### Author: ![jasedepuit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jasedepuit/32/513610_2.png) [@jasedepuit](https://meta.discourse.org/u/jasedepuit)
#### Post date: [July 11, 2025, 1:40am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/146 "2025-07-11T01:40:37Z")

</div>

Thanks for that. It’s working now!

That said, I’m struggling to update the text on the modal. I can update the title successfully but can’t seem to edit the main text. Am I editing the wrong fields?

 ![Screenshot 2025-07-11 at 11.38.50 am](https://global.discourse-cdn.com/meta/original/4X/8/f/9/8f9a803b09989dd190a9a0defec3840a936d513e.jpeg)

---

<div class="post-metadata">

### Author: ![jasedepuit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jasedepuit/32/513610_2.png) [@jasedepuit](https://meta.discourse.org/u/jasedepuit)
#### Post date: [July 25, 2025, 12:49am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/147 "2025-07-25T00:49:20Z")

</div>

Turns out we just needed to enable the appropriate setting:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/d/9/cd9823c113b14274ea1ddf2f3e1dc525374904d3.png)

---

<div class="post-metadata">

### Author: ![Marcello\_Iaia](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@Marcello\_Iaia](https://meta.discourse.org/u/Marcello_Iaia)
#### Post date: [July 25, 2025, 4:42pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/148 "2025-07-25T16:42:26Z")

</div>

Hello @Don Thank you for such a nice component. I see the intention (in fact the title) of the component is to be triggered by guest/anonymous users. Could settings for group or trust-level based conditions be added? I am trying to present a modal for logged in users who visit any topic in a specific category. This would compliment [Discourse-subscriptions](https://meta.discourse.org/t/discourse-subscriptions-plugin/140818) and [category-lockdown](https://meta.discourse.org/t/discourse-category-lockdown/70649?page=4).

---

<div class="post-metadata">

### Author: ![DenisDoroshchuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denisdoroshchuk/32/516109_2.png) [@DenisDoroshchuk](https://meta.discourse.org/u/DenisDoroshchuk)
#### Post date: [August 5, 2025, 7:14am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/149 "2025-08-05T07:14:54Z")

</div>

Hello @Don  
Thank you for the component. We use your plugin on the forum [https://community.escapecollective.com/](https://community.escapecollective.com/). But we have a problem: when setting the **max\_guest\_topic\_views** parameter to more than **1** (in our case, **3** ), the modal window appears for a moment and then immediately disappears. I believe this is because Discourse performs a “soft” page refresh (Ember SPA routing) when loading JS, and at that moment the view counter is reset and the modal window disappears immediately. I think this happened after updating Discourse to version 3.5.0.beta9-dev. Please help me figure this out.

![ezgif-5e4b84ca418b8a](https://global.discourse-cdn.com/meta/original/4X/d/f/c/dfc3661950a15db4162268f8a4f9ba375127ffbb.gif)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 5, 2025, 10:45am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/150 "2025-08-05T10:45:31Z")

</div>

As one datapoint, I’m trying to repro this and unable to.

I’ve just updated to latest and this Theme Component seems to be working as intended.

Have you tried using it in a default theme?

---

<div class="post-metadata">

### Author: ![DenisDoroshchuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denisdoroshchuk/32/516109_2.png) [@DenisDoroshchuk](https://meta.discourse.org/u/DenisDoroshchuk)
#### Post date: [August 5, 2025, 11:22am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/151 "2025-08-05T11:22:25Z")

</div>

@merefield Thank you for your reply, but yes, we are using the default theme. You can check it yourself at [https://community.escapecollective.com/](https://community.escapecollective.com/). Here is another video showing the problem:

![ezgif-7af28737d709fa](https://global.discourse-cdn.com/meta/original/4X/3/b/c/3bcf0651473e3c92f06f41c8ebe30380a0a97f83.gif)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 5, 2025, 11:23am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/152 "2025-08-05T11:23:54Z")

</div>

Anything showing on your javascript console?

---

<div class="post-metadata">

### Author: ![DenisDoroshchuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denisdoroshchuk/32/516109_2.png) [@DenisDoroshchuk](https://meta.discourse.org/u/DenisDoroshchuk)
#### Post date: [August 5, 2025, 11:26am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/153 "2025-08-05T11:26:03Z")

</div>

@merefield nothing

 ![Screenshot 2025-08-05 at 13.25.23](https://global.discourse-cdn.com/meta/original/4X/3/9/6/396b1cf11606ffd4f84d7a0dc7638d63c8e4b8f9.jpeg)

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 5, 2025, 11:59am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/154 "2025-08-05T11:59:53Z")

</div>

Hello 👋

This looks like an issue with [Topic Cards](https://meta.discourse.org/t/topic-cards/296048) theme component. When you click the topic title it will force a full page load too which cause the issue here. If you open a topic with clicking somewhere outside the title than the Guest Gate can works normally because it won’t force a page reload, so only the SPA loading happens.

Please report the problem in the [Topic Cards](https://meta.discourse.org/t/topic-cards/296048) theme component topic.

---

<div class="post-metadata">

### Author: ![DenisDoroshchuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denisdoroshchuk/32/516109_2.png) [@DenisDoroshchuk](https://meta.discourse.org/u/DenisDoroshchuk)
#### Post date: [August 5, 2025, 12:10pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/155 "2025-08-05T12:10:48Z")

</div>

Hello @Don  
Yes, you’re right, if I disable the Topic Cards component, everything works as expected. I’ll write in the Topic Cards thread since we need both of these components.  
Thank you!

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 5, 2025, 12:14pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/156 "2025-08-05T12:14:33Z")

</div>

[Topic List Previews](https://meta.discourse.org/t/topic-list-previews-tlp/209973) also has a wide format option for Tiles similar to Topic Cards … and it’s working with GG currently. Perhaps you can try that out whilst you wait for a fix to Topic Cards …

---

<div class="post-metadata">

### Author: ![Jerome-cockpitLAB](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerome-cockpitlab/32/492992_2.png) [@Jerome-cockpitLAB](https://meta.discourse.org/u/Jerome-cockpitLAB)
#### Post date: [August 14, 2025, 7:19am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/157 "2025-08-14T07:19:26Z")

</div>

Hello everyone,  
Thank you for the plugin, it works perfectly.  
I just have one question: I haven’t seen any settings to center the title. Is that normal?

 ![Capture d’écran 2025-08-14 à 09.18.40](https://global.discourse-cdn.com/meta/original/4X/4/5/0/45004592ea0251ad0540ddedc8639ae119c3d755.png)

---

<div class="post-metadata">

### Author: ![gilles](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gilles/32/549022_2.png) [@gilles](https://meta.discourse.org/u/gilles)
#### Post date: [July 28, 2026, 8:10am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/158 "2026-07-28T08:10:32Z")

</div>

Super component 👍, I wanted to know if it was possible to insert line breaks or paragraphs in the custom\_gate.little\_text field

Thanks for your feedback

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 13, 2026, 12:28am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/159 "2026-08-13T00:28:10Z")

</div>

Hello 👋

Yes, absolutely. Since `custom_gate.little_text` is rendered as `htmlSafe`, you can use HTML there. For example, you can use `<br>` for line breaks or `<p>` tags for separate paragraphs.

For example:

```html
First line.<br>
Second line.

```

or

```html
<p>First paragraph.</p>
<p>Second paragraph.</p>

```

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 13, 2026, 12:38am UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/160 "2026-08-13T00:38:11Z")

</div>

Hello 👋

Sorry for the delay.

Yeah, there is no setting for this yet but you can achieve this with a simple theme component.

```scss
.d-modal.gate {
  .d-modal__title {
    margin: auto;
  }
}

```

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 13, 2026, 5:54pm UTC](https://meta.discourse.org/t/guest-gate-theme-component/225107/161 "2026-08-13T17:54:23Z")

</div>

## Guest Gate 2.0 is coming soon! 🚀

A new version of **Guest Gate** is currently in development, and this is a much bigger update than a simple version bump.

Version **2.0** brings a redesigned trigger system, a more modern implementation, significantly more customization options, and better compatibility with current Discourse versions.

### 🚀 New trigger system

The biggest change in 2.0 is that you are no longer limited to page views.

You can now choose how the Guest Gate should be triggered:

- **Page views** - show the gate after a configurable number of page views

- **Time** - show it after spending a certain amount of time on a page

- **Scroll** - show it after the visitor reaches a configurable percentage of the page

- **Lightbox** - show it when a guest opens an image

- **Any** - allow multiple trigger types to trigger the gate

This makes it possible to create much more sophisticated guest-gating strategies.

### 🔁 New repeat behavior

You can now control what happens after the Guest Gate has been displayed:

- **Repeat trigger** - show it again whenever the configured trigger occurs

- **Random page views** - show it again after a random number of page views

- **Once per session** - show it only once during the browser session

There is also a new configurable threshold for random page-view repeats.

The existing **“Show only once”** setting is still supported for backwards compatibility.

### ⏱ Delayed display

The gate can now be displayed with a configurable delay after a trigger fires.

For example, you can trigger the gate after 50% scroll depth but wait another 750ms before opening the modal.

This can make the experience feel much less intrusive.

### 🎨 More control over the modal

Version 2.0 adds several new customization options:

- Compact, standard, or wide modal

- Show or hide the modal title

- Configurable title positioning

- Improved responsive behavior

### 🖼 Improved Custom Gate

The Custom Gate has also received a substantial update.

You can now:

- Add alternative (`alt`) text to the custom image

- Better control the custom text content

- Use HTML content in the custom little text field, including paragraphs and line breaks

- Better control colors and spacing

The custom content is also handled more cleanly in the new implementation.

### ⚙ Modernized implementation

Under the hood, Guest Gate 2.0 has been significantly modernized.

The old implementation relied on the legacy plugin initializer, Discourse page tracking and jQuery-based lightbox handling.

2.0 now uses Discourse’s modern API initializer and page-change APIs, with a dedicated gate controller responsible for managing triggers, timers, scroll listeners, session state and modal state.

This also makes the component easier to maintain and extend going forward.

### 🔄 Existing installations are taken into account

One of the important goals of 2.0 was to avoid forcing existing users to manually rebuild their configuration.

The new version includes a settings migration that converts the old Guest Gate settings to their new equivalents.

For example, the old `max_guest_topic_views` setting is automatically migrated to the new page-view configuration and repeat behavior.

The old lightbox setting is also automatically mapped to the new trigger system.

So upgrading should preserve the behavior of existing installations as closely as possible.

### 🧹 Cleaner configuration

A number of existing settings have also been cleaned up and their descriptions rewritten to make the administrator interface easier to understand.

The Login / Sign Up, [Discourse Connect](https://meta.discourse.org/t/13045?silent=true), custom URL and button logic has also been reorganized internally.

* * *

## What’s next?

Guest Gate 2.0 is currently being finalized and tested.

This release is intended to be a solid foundation for future Guest Gate features while giving administrators much more control over **when, where and how** the gate appears.

If you are already using Guest Gate, your existing configuration should be migrated automatically when upgrading.

* * *

🧪 **Want to test v2.0 early?**

You can try the branch here: [GitHub v2.0 Branch](https://github.com/VaperinaDEV/discourse-guest-gate-theme-component/tree/v2.0)

[Previous page](https://meta.discourse.org/t/guest-gate-theme-component/225107.md?page=7)

[Next page](https://meta.discourse.org/t/guest-gate-theme-component/225107.md?page=9)
