Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Padrio Posted November 4, 2016 Posted November 4, 2016 Hi there, because of stupid German laws, we need to restrict the ability to create a new account so you only can create one between 23 o'Clock and 6 o'Clock. I have good PHP knowledge, but never created something for the IPBoard, so i need some help here, maybe links that may show me how the hooks are working. The Plugin itself will be simple, get current \DateTime()-Object and lookup if the current time is between 06 and 23 o'Clock, if yes, do nothing. Otherwise show a message that the Registration-Process is currently not available. Hope you understand my needs. Kind Regards, Padrio
Daniel F Posted November 4, 2016 Posted November 4, 2016 1. You'll need a plugin to override the register controller via a hook There you could override the manage method to run your time check and return an error .. 2. We have also a setting which enabled & disables registrations. You could create a plugin which implements a task which would then change the \IPS\Settings::i()->allow_reg setting to true at 06:00 am and to false at 11pm
kar3n2 Posted November 4, 2016 Posted November 4, 2016 besides me thinking such a law in Germany is dreadful I think there is definitley a market for some plugin to control registrations at certain times. Id like to let them register but get a notice to say "any registrations beween 11pm and 8am are held in moderation" I would sleep better then
CodingJungle Posted November 4, 2016 Posted November 4, 2016 34 minutes ago, Padrio said: Hi there, because of stupid German laws, we need to restrict the ability to create a new account so you only can create one between 23 o'Clock and 6 o'Clock. I have good PHP knowledge, but never created something for the IPBoard, so i need some help here, maybe links that may show me how the hooks are working. The Plugin itself will be simple, get current \DateTime()-Object and lookup if the current time is between 06 and 23 o'Clock, if yes, do nothing. Otherwise show a message that the Registration-Process is currently not available. Hope you understand my needs. Kind Regards, Padrio is this the server local time or the users local time?
Daniel F Posted November 4, 2016 Posted November 4, 2016 3 minutes ago, kar3n2 said: besides me thinking such a law in Germany is dreadful I think there is definitley a market for some plugin to control registrations at certain times. Id like to let them register but get a notice to say "any registrations beween 11pm and 8am are held in moderation" I would sleep better then Could you then just enable the admin validation feature?
kar3n2 Posted November 4, 2016 Posted November 4, 2016 18 minutes ago, Daniel F said: Could you then just enable the admin validation feature? I should think so yes.
Padrio Posted November 5, 2016 Author Posted November 5, 2016 Well, thanks for all your answers, they really help me a lot. But, is there no way i can install a second IPBoard instance for development purposes? Since i only have one license, which is in production use, the following message show up: "An installation has already been activated for this license key. Your license key entitles you to one installation only. If you need to change the URL associated with your license, contact IPS technical support."
Daniel F Posted November 5, 2016 Posted November 5, 2016 10 minutes ago, Padrio said: Well, thanks for all your answers, they really help me a lot. But, is there no way i can install a second IPBoard instance for development purposes? Since i only have one license, which is in production use, the following message show up: "An installation has already been activated for this license key. Your license key entitles you to one installation only. If you need to change the URL associated with your license, contact IPS technical support." You are allowed to run a test/development instance. Add -TESTINSTALL to the license key
Padrio Posted November 5, 2016 Author Posted November 5, 2016 I thank you all! It was so easy to create this Plugin, I've never worked with a better system than this. Amazing!
Daniel F Posted November 5, 2016 Posted November 5, 2016 8 minutes ago, Padrio said: I've never worked with a better system than this. Amazing! I'm glad to see that you like the system
Recommended Posts
Archived
This topic is now archived and is closed to further replies.