Hello This theme component is created from Guest Gate (Sign Up Popup Plugin). It can lock topics for anon visitors with a modal and force them to Sign Up or Login. The component can be use for an alert modal, encouraging visitors to sign up but allowing them to close the modal (for this, leave the dismissable false setting unchecked). Options include changing the number of topics that can be viewed before the modal is displayed.
Tip: If you use the “custom gate” option and want to hide the modal header (as on the image above) you have to delete the guest_gate.title field and hit a space. It will remove the modal title, so that you instead can use a title below the image.
max guest topic views Number of topic views until gate displays. After the gate first appears, it appears randomly between 1 and this number.
dismissable false Removes the close button, which prevents visitors from closing it.
use gate buttons Use buttons on modal footer instead of links.
custom url enabled Enable the custom login url and custom signup url options. The normal behaviour (if you leave this option unchecked) is for the Login or Sign Up modal to appear on the current topic page.
custom login url For example, /login is the home page with the “Login” modal displayed.
custom signup url For example, /signup is the home page with the “Sign Up” modal displayed.
gate footer position Footer buttons/links position.
gate show only once Guest Gate modal show only once per session.
custom gate enabled Enable it if you want to customize the modal.
custom gate image Upload an image to display at the top of the modal.
custom gate image width The uploaded image width. You can use px, % etc, e.g. 100% will add a full modal width (minus padding) image.
custom gate big text color The “big text” appears below the image. You can set the color of the text.
custom gate little text color The “little text” appears below the big text. You can set the color of the text.
custom gate background color Change the modal background color.
custom gate footer text color Change the footer text color. This applies if the use gate buttons setting is disabled and you have set up a custom gate.
custom gate link color Change the footer link color. This applies if the use gate buttons setting is disabled and you have set up a custom gate.
I really like that the log in / sign up links can be replaced with buttons.
I’d suggest that perhaps the sign up button should be the highlighted (blue) color with the ‘I already have an account’ button being grey. That seems to be more standard, at least from my observations of popular sites. Likely most people seeing the modal don’t have an account, so it probably makes sense.
Fantastic, thanks so much @Don! Updated it now and it’s working awesome
My only other suggestion would be to be able to customise the frequency of recurring prompts.
Setting: max guest topic views “Number of topic views until gate displays. After the gate first appears, it appears randomly between 1 and this number.”
Having max guest topic views set to 1 or 2 is nice, encouraging sign up early - but if the user declines (and show once per session isn’t enabled), it would be nice to be able to show the modal again at a less frequent rate so it isn’t too aggressive on lurkers. Like every 5 or more topic views for example.
Hey Don, great component! Any chance you could make the sign up button be customizable so a url could be inserted? I use Memberful for SSL so the normal sign up link doesn’t work, just throws you to the login page. Thanks!
That’s what I thought too, cleared my cache, tried 4 different browsers and all were the same, very strange! If you don’t mind trying again, I just changed the guest_gate.title to be ‘Test’, do you see this update?
Same results over vpn, on my phone, different network. This is the strangest thing ever! I guess as long as everyone else can see the correct text it’s okay!
I think that’s not normal. Maybe there is a locale bug. My best tip is the set locale from accept language header setting.
As I see you using this on your site and maybe that’s why you see the default texts on modal because your browser language different and Discourse return it to the default text.
Can you turn off this setting and try again?
Now I can replicate this. I changed the Chrome language from English (United Kingdom) to English (United States) and this happened.
Thank you Don, you are incredibly helpful! I think there is a bug in my install with languages. Since this doesn’t seem to be caused by your component I’ll start a new topic. I appreciate you looking into this.
EDIT: I figured out that my admin locale had somehow been changed to UK instead of US, very strange! Switched it back and filled out the fields again, now all is well in the world.
I’ve made some minor edits to make the first post easier to read. There was one sentence I couldn’t understand at all, though:
custom url enabled
Add custom url to Login and Signup buttons / links by default this is redirect the visitor after click the Login or Signup button to the homepage and open Login or Signup modal. Note: If you leave unchecked this than the visitor left on topic page after click the buttons and the Guest Gate modal changes with Login or Signup modal which is dismissable so the visitor can close it and read the topic.
Thank you Jonathan I really appreciate it Unfortunately my english is not the best Sorry for this! I will change these in the Theme Component or of course you could send a PR too.
The custom url enabled site setting means.
You can add custom urls to the Guest Gate Login and Signup buttons/links which by default use these custom urls /login and /signup these redirect the visitor to the homepage and open the Login or Signup modal. So if you checked it, it will activate the two settings below this. The custom login url and custom signup url.
If you leave this setting unchecked then it will keep the visitor on topic page after click the Guest Gate Login or Signup buttons/links and open the Login or Signup modal on the same topic page. After this the visitor can close the modal.
I hope it helps to understand and again thank you for your time to makes it more understandable
Your English is fine, and there’s nothing wrong with your JavaScript, which is the important thing What about this?
custom url enabled – Enable the custom login url and custom signup url options. The normal behaviour (if you leave this option unchecked) is for the Login or Sign Up modal to appear on the current topic page.
custom login url – For example, /login is the home page with the “Login” modal displayed.
custom signup url – For example, /signup is the home page with the “Sign Up” modal displayed.
Hey all,
I recently installed this component and it works like a charm but I am not sure if the gating mechanism slows down the google bot from crawling the topics.
I am having some configuration issues with Guest Gate when I am using SSO with Discourse Connect.
The user is able to login in the main site and then appears to be logged in Discourse but after clicking a few topics the guest gate modal shows up. This is unusual as the user is logged in.
I have custom URLs for login so when user clicks on I am already logged in they are taken based custom login page and the cycle repeats itself.
Only way around this is when user clicks on the native login button in Discourse and is automatically logged in.
It appears that for some reason Guest Gate is not honoring the login from SSO and requires native login to activate.
Have other people faced this issues? Any suggestion on a solution or a workaround?