Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: FireDitto on April 13, 2014, 12:24:27 PM

Title: Popup on Login for single Membergroup
Post by: FireDitto on April 13, 2014, 12:24:27 PM
Hello!

I have a guest/Visitor account that allows passers by to log in and view the forum.

What I'd really like to be able to do, is force a popup to occur upon log in, with some information in it, that a user could ideally click "Ok/Agree" or "Decline" and the latter would log them out again, while the former would allow them to continue browsing the forum to their leisure.

I only want it to affect this one usergroup, and it must work for every time the account is logged in to.

Would anyone be able to assist with something like this?
Title: Re: Popup on Login for single Membergroup
Post by: kat on April 13, 2014, 12:41:28 PM
Would this do it?

http://custom.simplemachines.org/mods/index.php?mod=3279
Title: Re: Popup on Login for single Membergroup
Post by: FireDitto on April 13, 2014, 12:50:25 PM
I missed that one, when I did my search.

Everything (that one included) seems to require updates or adjustments in the admin panel in order to be sent out again, or they are demanded of all members (such as the redirect on log in or forced read on log in mod/s). I really just want the one membergroup affected, with minimal requirements from me or my team, excluding the initial setup.
Title: Re: Popup on Login for single Membergroup
Post by: kat on April 13, 2014, 12:55:22 PM
Ah. You could be right. I saw this:

Allowing you to force (all|groups|members)

and took it as

Allowing you to force all OR groups OR members.

Maybe you could ask for clarification, of that, in the mod's support topic?

http://www.simplemachines.org/community/index.php?topic=464255.0

If you read through it, this might've already been clarified, if you're lucky. ;)
Title: Re: Popup on Login for single Membergroup
Post by: FireDitto on April 13, 2014, 01:47:09 PM
From what I saw, that is what it does, but it only does so the once after updating - so the first guest the logs into the Visitor account would be the recipient of that forced response, but anyone else that happened to log in, would not, unless it was updated by a team member in the mean time and RE-sent out.
Title: Re: Popup on Login for single Membergroup
Post by: kat on April 13, 2014, 02:29:54 PM
You could well be right. Can't help to ask, though. The mod's author's a good lad. If you tell him what you need, he might well help you out.

Tell him I sent you. ;)

To save you typing this out, all over, again, you could always post a link, to this, there. ;)
Title: Re: Popup on Login for single Membergroup
Post by: Kindred on April 13, 2014, 03:44:02 PM
no...  you are not right....

the mod keeps track of WHO has read and clicked agree.   Which means that - if you force a group to re-read and agree -- then each member of that group will be asked to read and sign.
Title: Re: Popup on Login for single Membergroup
Post by: FireDitto on April 13, 2014, 04:01:58 PM
Except I am right, because I'm not talking about a group of accounts - I'm talking about a single - one - account that is available for guests to access to view the site, and I want a pop up to occur EVERY time someone logs into that account, regardless of if they've logged into it before or not.

The mod in question won't do that for me.
Title: Re: Popup on Login for single Membergroup
Post by: Kindred on April 13, 2014, 04:07:15 PM
well, then you have an utterly bizarre configuration which is contrary to every standard used on any other SMF site...   so - it's no wonder that none of the mods will work for you.
Title: Re: Popup on Login for single Membergroup
Post by: FireDitto on April 13, 2014, 04:47:36 PM
I don't believe you understand what I'm talking about, and I'm quite offended by what I am reading as a snide comment, so I'll explain for you what I am talking about.

My forum has restricted access areas that aren't visible to the average guest. In order to see them, ask questions, etc a guest can log into the Visitor account, and interact with the members thus.

For that account (and/or it's membergroup of the same name) I wish to create a forced pop up whenever a guest logs into that public account.

I do not wish it to affect or touch my regular members, it is to enforce a "by logging in as a visitor you agree to XYZ, yes/no"  on the Cisitor account ONLY.
Title: Re: Popup on Login for single Membergroup
Post by: Kindred on April 13, 2014, 05:36:24 PM
Not a snide comment at all. A statement of fact, that your configuration is unique from any other SMF implementation... Which means that there is unlikely to be any mods which does what you are asking for.
Title: Re: Popup on Login for single Membergroup
Post by: FireDitto on April 15, 2014, 06:18:01 AM
That's why I wasn't looking for a mod, though?  I already said I went through them and couldn't find somethig suitable. I'm really not sure why you're telling me things I already know?

The configuration really isn't that unique at all. I've seen a lot of RP forums that do something similar. I haven't seen one that forces a pop up, which is what I'd like to do to the public account, though.

Title: Re: Popup on Login for single Membergroup
Post by: Kindred on April 15, 2014, 06:23:22 AM
except is really is unsualy, if not unique.
I have NEVER seen a forum do that - in over 30 years of cruising forums.

and hat you are aksing goes well beyond support. What you are asking for is custom coding for your specific implementation - which would not be applicable to any other site...   as such, I am moving this out of support.
Title: Re: Popup on Login for single Membergroup
Post by: FireDitto on April 15, 2014, 06:37:05 AM
Lol, that doesn't mean it hasn't existed in other circles ;)

I've been cruising forums for a while myself and there are always things that pop up that I've never seen before. In the circles I roam, having a guest account for visitors to view a site on is pretty common ground.

Thanks for the shift; I'm honestly never sure where to post things, even after the time I've been here xD
Title: Re: Popup on Login for single Membergroup
Post by: margarett on April 15, 2014, 06:58:02 AM
OK, I see what you mean. While I agree it is unusual, it's your setup and I'd say you should be able to do what you want to.

That being said, a popup is easily bypassed if, eg, JS is disabled in browser. My suggestion would be to try and adapt one of "guest registration warning" MODs:
http://custom.simplemachines.org/mods/index.php?mod=2607
http://custom.simplemachines.org/mods/index.php?mod=3107
(probably many others I'm missing)

So that it is changed for your specific account instead of guests and, of course, to adapt the text shown.