Add Register User link at login page

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Add Register User link at login page

Post by tonyd » Tue Nov 03, 2015 5:55 pm

Hi everyone,

How can i add a extra link next to the forget password link that allows for new users to register? when clicking on the link i want to show a form where people can fill in there name, company and email. when sending the admin will receive a email so he can create a user account to login to the secured area of the FAQ.

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Tue Nov 03, 2015 8:12 pm

Hi,

you can add a "normal" HTML link to the page "?action=register":

Code: Select all

<a href="?action=register">Register here</a>
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Tue Nov 03, 2015 8:21 pm

Thorsten wrote:Hi,

you can add a "normal" HTML link to the page "?action=register":

Code: Select all

<a href="?action=register">Register here</a>
bye
Thorsten
Hi Thorsten you mean add it to the login.tpl?

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Tue Nov 03, 2015 8:22 pm

Hi,

yes. :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Tue Nov 03, 2015 8:42 pm

Thorsten wrote:Hi,

yes. :-)

bye
Thorsten
Will give it a try :)

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Wed Nov 04, 2015 4:05 pm

Hi Thorsten,

Could you show me where to implement in the login.tpl?

Code: Select all

        <section>

            <header>
                <h2>{loginHeader}</h2>
            </header>

            [useSslForLogins]
            <p>
                <a href="{secureloginurl}">{securelogintext}</a>
            </p>
            [/useSslForLogins]

            {loginMessage}

            <form class="form-horizontal" action="{writeLoginPath}" method="post" accept-charset="utf-8">
                <input type="hidden" name="faqloginaction" value="{faqloginaction}"/>

                <div class="control-group">
                    <label class="control-label" for="faqusername">{username}</label>
                    <div class="controls">
                        <input type="text" name="faqusername" id="faqusername" required="required" autofocus="autofocus">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label" for="faqpassword">{password}</label>
                    <div class="controls">
                        <input type="password" name="faqpassword" id="faqpassword" required="required">
                        <p class="help-block">{sendPassword}</p>
                    </div>
                </div>

                <div class="control-group">
                    <div class="controls">
                        <label class="checkbox">
                            <input type="checkbox" id="faqrememberme" name="faqrememberme" value="rememberMe">
                            {rememberMe}
                        </label>
                    </div>
                </div>

                <div class="form-actions">
                    <button class="btn btn-primary" type="submit">
                        {loginHeader}
                    </button>
                </div>
            </form>

        </section>

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Wed Nov 04, 2015 8:35 pm

Hi,

maybe this way:

Code: Select all

        <section>

            <header>
                <h2>{loginHeader}</h2>
            </header>

            [useSslForLogins]
            <p>
                <a href="{secureloginurl}">{securelogintext}</a>
            </p>
            [/useSslForLogins]

            {loginMessage}

            <form class="form-horizontal" action="{writeLoginPath}" method="post" accept-charset="utf-8">
                <input type="hidden" name="faqloginaction" value="{faqloginaction}"/>

                <div class="control-group">
                    <label class="control-label" for="faqusername">{username}</label>
                    <div class="controls">
                        <input type="text" name="faqusername" id="faqusername" required="required" autofocus="autofocus">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label" for="faqpassword">{password}</label>
                    <div class="controls">
                        <input type="password" name="faqpassword" id="faqpassword" required="required">
                        <p class="help-block">{sendPassword}</p>
                        <p class="help-block"><a href="?action=register">Register here</a></p>
                    </div>
                </div>

                <div class="control-group">
                    <div class="controls">
                        <label class="checkbox">
                            <input type="checkbox" id="faqrememberme" name="faqrememberme" value="rememberMe">
                            {rememberMe}
                        </label>
                    </div>
                </div>

                <div class="form-actions">
                    <button class="btn btn-primary" type="submit">
                        {loginHeader}
                    </button>
                </div>
            </form>

        </section>
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Thu Nov 05, 2015 5:19 pm

Thorsten wrote:Hi,

maybe this way:

Code: Select all

        <section>

            <header>
                <h2>{loginHeader}</h2>
            </header>

            [useSslForLogins]
            <p>
                <a href="{secureloginurl}">{securelogintext}</a>
            </p>
            [/useSslForLogins]

            {loginMessage}

            <form class="form-horizontal" action="{writeLoginPath}" method="post" accept-charset="utf-8">
                <input type="hidden" name="faqloginaction" value="{faqloginaction}"/>

                <div class="control-group">
                    <label class="control-label" for="faqusername">{username}</label>
                    <div class="controls">
                        <input type="text" name="faqusername" id="faqusername" required="required" autofocus="autofocus">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label" for="faqpassword">{password}</label>
                    <div class="controls">
                        <input type="password" name="faqpassword" id="faqpassword" required="required">
                        <p class="help-block">{sendPassword}</p>
                        <p class="help-block"><a href="?action=register">Register here</a></p>
                    </div>
                </div>

                <div class="control-group">
                    <div class="controls">
                        <label class="checkbox">
                            <input type="checkbox" id="faqrememberme" name="faqrememberme" value="rememberMe">
                            {rememberMe}
                        </label>
                    </div>
                </div>

                <div class="form-actions">
                    <button class="btn btn-primary" type="submit">
                        {loginHeader}
                    </button>
                </div>
            </form>

        </section>
bye
Thorsten
Hi Thorsten, works good.... however it displays the register form in the same page with the header of the login page on top... can i get the register page as a pop-up?

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Thu Nov 05, 2015 9:48 pm

Hi,

it's not that easy in a popup as we need a stripped down page and layout for that.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Mon Nov 23, 2015 12:10 pm

Hi Thorsten,

I have a issue with register new users.... when creating a new account it says's you dont have enough permissions..

How can i solve this?

Regards,

Tony.

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Mon Nov 23, 2015 7:57 pm

Hi,

where do you get this notification?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Tue Nov 24, 2015 12:57 pm

As soon i filled in the register form and click on submit. any idea to solve this?

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Wed Nov 25, 2015 10:45 pm

Hi,

in frontend or admin backend?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

tonyd
Posts: 26
Joined: Tue Sep 22, 2015 9:41 pm

Re: Add Register User link at login page

Post by tonyd » Thu Nov 26, 2015 9:19 am

Hi Thorsten,

In the frontend. I have a secured FAQ.. and added the link register to the frontend at the login screen. It rederect me to the register page but as soon i fill in the field and click on submit it give me the error not enough permissions in red.

Thorsten
Posts: 15014
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Add Register User link at login page

Post by Thorsten » Thu Nov 26, 2015 8:16 pm

Hi,

now I understand. This is a bigger issue with version 2.8. This is fixed in 2.9. I will try to fix that in 2.8, too.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply