Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Need to edit Login/Registration page to unify users in a farm wiki site.
Avatar
teddydoors #1
Member for a month · 26 posts
Group memberships: Members
Show profile · Link to this post
Subject: Need to edit Login/Registration page to unify users in a farm wiki site.
Hello,

I have a farm wiki site with animals as subdomains. What you expect from a farm-animal wiki site is that it has the same user database for every animal subdomain.

The problem is that each animal has its own user lists.

I'm using Farmer plugin. Although we can use the option to inherit users from the farmer's list, the registration page is for the animal site only.

The only way (I think) is to force the visitors to register at the farmer site.

So I desperately need to customize the login/registration page, just to edit some URLs in there, so that the visitors can go the chosen farmer's registration page.

I'm not looking for a locationalization option.

Thank you in advance.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4733 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Dokuwiki uses an event system.  When a particular event occurs in the processing it, in effect, notifies all relevant code that this event has occurred, and you get the chance to modify what happens at this point in the processing.  One of these events is the HTML_LOGINFORM_OUTPUT event.  The following two plugins show how to use this event and to add html to the login form:

https://github.com/turnermm/captcha-login-for-Dokuwiki/arc…
https://github.com/turnermm/xtralogin/archive/master.zip

The first of these accesses the captcha plugin to add a captcha to the login form; it was replaced by the adding this feature to the captcha plugin itself.  The second is just a template to demonstrate how this event can be used.  It would not take much, even if you have minimal coding skills, to adapt the first of these -- the captcha login -- for your purposes.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
teddydoors #3
Member for a month · 26 posts
Group memberships: Members
Show profile · Link to this post
Thank you.

Your hint is very helpful.
Avatar
teddydoors #4
Member for a month · 26 posts
Group memberships: Members
Show profile · Link to this post
Hello,

I succeeded in adding more contents in the registration and login form.

I have a minor question.

By default, if registration is successful, a message of success will show up, and a login form will be triggered.

It may seem silly, but I want to edit out the post-registration "login form". Where can I delete that "event"?
Avatar
turnermm (Moderator) #5
Member since Oct 2009 · 4733 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Quote by teddydoors:
It may seem silly, but I want to edit out the post-registration "login form". Where can I delete that "event"?


You can't 'delete' an event, but you can make changes to its functioning.  You can use the xtralogin sample plugin as a model.   There is a register output event, where you can add a hidden input and check for it in the login form event.  If it appears when the login form is accessed, you can set the login event to array().  Then the form will not be printed.  You will still get the not logged in message, I haven't checked on how to by-pass that.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-06, 08:47:38 (UTC +01:00)