jgujgu
30 Gennaio 2017, 11:39pm
1
In April 2022, the Guest Gate plugin was converted into a theme component by @Don . This plugin is now deprecated .
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.
[Screenshot 2022-04-23 at 22.05.29]
Tip: If you use the …
This is a more permanent post for a plugin that @vinothkannans created and I forked recently. Many thanks to @vinothkannans for doing the hard work of wiring up the main logic, @ljpp for stirring the original conversation, and @DiscourseMetrics.com for providing the impetus behind a customized modal.
You have two main gate options:
Generic gate
Custom gate
And tertiary options:
Number of topic views until gate displays. After the gate first appears, it appears randomly between 1 and this number.
Disable x button
Various styling options for custom gate
Here is a screenshot of the admin panel:
And of the plugin in action:
The desire for a plugin like this was discussed in this topic . I hope to add functionality as time goes on, but here is a short list:
Timer
Inverse Timer (Read time > t)
Display on every page
Stubbornness (after x many times closed, give up asking during this session/use default discourse functionality)
Track how often it gets closed, other metrics
Track whether user signed up through overlay (could just put user in specific group)
Appear given a specific url (eg https://yourdiscourse.com?iscool&referrer=reddit ). Like an invite link, but could put signups in particular group, like the above
55 Mi Piace
kam44
31 Gennaio 2017, 10:53am
2
This is the best solution to boost signup, because visitors want to “see” before “buy”.
I used this method on my forum for 1 year. And now i have 35 signups per day, instead of 3-4 before the plugin.
10 Mi Piace
Interesting and thanks for sharing. I don’t mean to sound skeptical, but this increase in signups may relate to other factors including the organic growth of your forum over time.
Can I propose a better test? If you were to alternate between Guest Gate and normal signups each week for a month we’d have some good comparative data to show that Guest Gate works.
5 Mi Piace
kam44
31 Gennaio 2017, 12:15pm
4
The subscription bump was from one day to the next (not after one year)
You know, with the SEO, many came to read about their keyword search, but don’t want to signup. It’s a good way to convert search traffic.
4 Mi Piace
Fer_Nando
(Fer Nando)
31 Gennaio 2017, 2:49pm
5
Have an option to disable for GoogleBot?
This plugin is a good idea, thanks for share it.
6 Mi Piace
jgujgu
1 Febbraio 2017, 2:37am
6
I made 2 more additions today
Per @Fer_Nando ’s suggestion, I added a list of bots that should not open the modal. I found the list in this Stackoverflow answer
I added gate_show_only_once
as an option, which will, as it says, only show the user the gate once per hard refresh.
I’ll keep my eye on the poll for the next feature to add.
7 Mi Piace
Thanks for the sweet plugin! I’ve installed it on my community and really like it.
Those are unfortunately all equally good ideas. All worthy of implementation, and I couldn’t tell you the priority of each.
4 Mi Piace
I guess no need to exclude bots here. Since Discourse uses crawler layout for bots. Also there is function to detect bots and layout. Check below
after_action :conditionally_allow_site_embedding
after_action :ensure_vary_header
after_action :add_noindex_header,
if: -> { is_feed_request? || !SiteSetting.allow_index_in_robots_txt }
after_action :add_noindex_header_to_non_canonical, if: :spa_boot_request?
after_action :set_cross_origin_opener_policy_header, if: :spa_boot_request?
after_action :clean_xml, if: :is_feed_response?
after_action :add_early_hint_header, if: -> { spa_boot_request? }
HONEYPOT_KEY ||= "HONEYPOT_KEY"
CHALLENGE_KEY ||= "CHALLENGE_KEY"
layout :set_layout
def has_escaped_fragment?
SiteSetting.enable_escaped_fragments? && params.key?("_escaped_fragment_")
end
def show_browser_update?
@show_browser_update ||= CrawlerDetection.show_browser_update?(request.user_agent)
end
4 Mi Piace
I appreciate this @jgujgu ’s forked plugin and I recommend it because of his active development in new features. Also if anyone need simplified version of this plugin with minimal features you can still use my original repo at https://github.com/vinothkannans/discourse-guest-gate . It will give you output like in screenshot below and you can configure how many topics a guest can view before displaying the guest gate.
10 Mi Piace
veer
(Veer)
16 Marzo 2017, 10:36pm
11
@vinothkannans i want the same popup plugin but not for sign up, but for facebook page likes, or for twitter followers. i can pay to you for this.
What would you like done?
I want on discourse, A popup Lock plugin which popup a box which Opens after a fixed time or after scrolling Down middle.
Either close after a fixed time
Or Closes When Facebook or Twitter page is followed.
Or Closes when Visitor share the post on facebook or any social page.
Or closes when people click close.
A kind of lock popup which force users to share or follow.
When do you need it done?
15 days
What is your budget, in $ USD that you can offer for this task…
Please check this.
Shrike
10 Aprile 2017, 5:33pm
12
Hi!
The plugin has incorrect (outdated?) modal.hbs
template:
<div class="modal-inner-container">
<div class="modal-header">
<a class="close" {{action "closeModal"}}>{{fa-icon "times"}}</a>
<h3>{{title}}</h3>
<div class="clearfix"></div>
</div>
The .close
anchor should be wrapped in div with modal-close
class.
It has several consequence:
https://meta.discourse.org/t/dialog-close-button-design/60727/
https://meta.discourse.org/t/dialog-and-esc-handling/60725
PR: https://github.com/jgujgu/discourse-guest-gate/pull/3
6 Mi Piace
nixie
18 Settembre 2017, 12:47pm
13
@jgujgu
@Shrike
@vinothkannans
Could you please remove the bottom block that says “Log in | Create New Account”
Reason:
Users are clicking on that link and then in the next screen, they are finding the close button. That way they click on the close button and read the content without registering for an account.
3 Mi Piace
Just updated to Discourse v1.9.0.beta11 +12 - this plugin breaks site.
4 Mi Piace
I did the installation and broke the site.
The site has been left blank for members, nothing uploaded.
Only I with my admin account logged in I was able to access the site normally.
VERSION: v1.9.0.beta11 +12
4 Mi Piace
Once I logged out of admin I had the same issue - then couldn’t log back in. SSH in - remove plugin - rebuild.
nixie
30 Settembre 2017, 9:34pm
17
I also just removed this plugin.
After the new Discourse Update - I’m getting a blank page - because of this plugin - So, I had to remove this plugin to fix it.
@jgujgu
Thought of letting you know - so that you can fix it, if you have some free time.
3 Mi Piace
bholst
(Bryan Holst)
30 Settembre 2017, 11:21pm
18
I’d love to know when this works again! I’d love to have this working on my site!!
3 Mi Piace
exetico
(Tobias)
1 Ottobre 2017, 3:05pm
19
We’re also facing the same problem after the latest update. From our end, it was possible to fix, by disabling the plugin in the Admin-panel.
3 Mi Piace
erlend_sh
(Erlend Sogge Heggen)
2 Ottobre 2017, 8:50am
20
Seems like @jgujgu has abandoned this. The website he was using this on is no longer operational.
@vinothkannans are you still maintaining your original plugin for this ?