The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to setup Wpdisq...
 
Share:
Notifications
Clear all

How to setup Wpdisquz User Registration & Login

15 Posts
3 Users
1 Reactions
2,801 Views
OpEx
Posts: 10
 OpEx
Topic starter
(@opex)
Active Member
Joined: 3 years ago

Hi there, I have a couple of issues that I would greatly appreciate some assistance with. 

My site has yet to launch and go live, and before doing so, I wanted to get some help with setting up my site's user registration and login for wpDisqus. When it comes to web development/WordPress, I would consider myself a level above beginners so please forgive me if I ask a newbie question.

Question 1: Above the chat area, I used to see a "register" and "login" link, but recently users would only be able to access the "login" link. The "register" link has disappeared (see attached image). Would you have any input on why that happened or how I can provide my users with both?

Question 2: My ideal setup for user registration and login would be to have a popup (I've created a login and registration popup form via Elementor and wpforms), allowing users to enter their credentials. After they've successfully entered their credentials, the popup would go away, and they'll be redirected back to the page.

I would be extremely grateful if someone could assist me in addressing my issues. I wouldn't mind compensating someone for their time and effort in providing technical service. If there's Thank you.

 

14 Replies
OpEx
Posts: 10
 OpEx
Topic starter
(@opex)
Active Member
Joined: 3 years ago

Sorry forgot to add image attachment.

wpDisquz Screenshot
Reply
2 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@opex,

Question 1: Above the chat area, I used to see a "register" and "login" link, but recently users would only be able to access the "login" link. The "register" link has disappeared (see attached image). Would you have any input on why that happened or how I can provide my users with both?

Please follow this support topic, the same question is discussed here: https://wpdiscuz.com/community/postid/3625/

Question 2: My ideal setup for user registration and login would be to have a popup (I've created a login and registration popup form via Elementor and wpforms), allowing users to enter their credentials. After they've successfully entered their credentials, the popup would go away, and they'll be redirected back to the page.

The solution is provided here: https://wpdiscuz.com/community/wpdiscuz-integration/elementor-popup-login/

Reply
OpEx
 OpEx
(@opex)
Joined: 3 years ago

Active Member
Posts: 10

@asti Thank you for the reply. Based on the link you referenced it states to add the hook below to my functionphp. But what would my "custom registration link" be for the popup?

add_filter("wpdiscuz_login_link", function ($login) {
return $login . " or <a href='your_custom_registration_link'> register</a>" ;
});
Reply
OpEx
Posts: 10
 OpEx
Topic starter
(@opex)
Active Member
Joined: 3 years ago

So I my "open by selector" for the elementor login popup is a[href="#login"]

When I include it to the code provided (exactly as seen below) I'm getting an error message:

add_filter("wpdiscuz_login_link", function ($login) {
return $login . " or <a href='a[href="#login"]'> register</a>" ;
});

 

Error Message:

Your PHP code changes were rolled back due to an error on line 221 of file wp-content/themes/hello-elementor/functions.php. Please fix and try saving again.

syntax error, unexpected '}', expecting ';'

 

Am I doing something wrong here? Thank you. 

 

Reply
4 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@opex,

Please copy the code directly from this post: https://wpdiscuz.com/community/postid/3625/

It works fine, please watch this video: https://www.screencast.com/t/OKYNufZk

Reply
OpEx
 OpEx
(@opex)
Joined: 3 years ago

Active Member
Posts: 10

@asti what exactly is my “ custom registration link”?

“open by selector" for the elementor login registration popup is a[href="#login"]

So does that me in my case the “custom registration link”  is a[href="#login"] ?

Thank you

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

@opex,

You should add the \ before the " signs. 

add_filter("wpdiscuz_login_link", function ($login) {
    return $login . " or <a href='a[href=\"#login\"]'> register</a>" ;
});
Reply
OpEx
 OpEx
(@opex)
Joined: 3 years ago

Active Member
Posts: 10

@asti Im getting a little closer to solving the problem.... I entered this code and when someone clicks on the "login" link my popup will show for a split second but then it goes straight back to the default wordpress login page. Do you have any suggestions? Thanks

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='wpd-popup-login-form' href=", $login);
});

 

"wpd-popup-login-form" is my elementor popup open by selector name. 

 

 

 

 

Reply
OpEx
Posts: 10
 OpEx
Topic starter
(@opex)
Active Member
Joined: 3 years ago

(I tried adding the changes that you suggested but users will still get the default wordpress login screen)

But I did just see another post with an identical issue https://wpdiscuz.com/community/wpdiscuz-integration/elementor-popup-login/#post-13630

I copied every step in the post but when I get to adding the code the user provided (as seen below) to my function theme I get an error stating

Your PHP code changes were rolled back due to an error on line 219 of file wp-content/themes/hello-elementor/functions.php. Please fix and try saving again.

Do you know what I'm doing wrong here? Thank you. 

syntax error, unexpected '$', expecting variable (T_VARIABLE)
(function($){
    $('.wpd-popup-login-form').on('click', function(e){
        e.preventDefault();
        var popuplink = $('wpd-popup-login-form"]');
        if ( popuplink.length > 0 ) {
            popuplink.each(function(i,e){
                var element = $(e);
                if ( element.attr('href') === 'wpd-popup-login-form"]' ) {
                    element.trigger('click');
                    return false;
                }
            })
        }
    });
})(jQuery);
Reply
OpEx
Posts: 10
 OpEx
Topic starter
(@opex)
Active Member
Joined: 3 years ago

I dont have a lot of time is it possible we can expediate this ticket and get my issue resolved asap. 

Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

Dear @opex,

Please note we don't provide support for any kinds of customizations, we may help with 1-2 simple questions related to colours and background but not more. We can not help you customize the components of the website, these are custom requirements and should be done by website owners. We only help with general questions and issues. The hooks are already provided so the rest of the customizations should be done yourself. 

Thank you for your understanding.

Reply
Posts: 12
(@nico39)
Active Member
Joined: 3 years ago

First, instal woody snippet plugin, after create a PHP snippet and clic "Run everywhere" :

add_filter("wpdiscuz_login_link", function ($login) {
return str_replace(" href=", " class='wpd-popup-login-form' href=", $login);
});

After, always in Woody Snippet, create a JS snippet and select "Automatic insertion", in insertion location choose "Footer" :

(function($){
    $('.wpd-popup-login-form').on('click', function(e){
        e.preventDefault();
        var popuplink = $('wpd-popup-login-form"]');
        if ( popuplink.length > 0 ) {
            popuplink.each(function(i,e){
                var element = $(e);
                if ( element.attr('href') === 'wpd-popup-login-form"]' ) {
                    element.trigger('click');
                    return false;
                }
            })
        }
    });
})(jQuery);

 

So now go to Elementor, modal Windows, and before creating the login form, go to the wheel, at the bottom left, go to advanced and in "Open via selector" put and don't forget the dot before : 

.wpd-popup-login-form

After that put Elementor Connect widget and save.

If you follow that, there's no reason it shouldn't work

Reply
2 Replies
OpEx
 OpEx
(@opex)
Joined: 3 years ago

Active Member
Posts: 10

@nico39 Wow! Thank you so much Nico for taking the time and helping me. After all the false alarms your method actually worked! 

I have one last question. When the login in screen pops Ups there’s a registration link and when clicked on it shows the wordpress default screen. Is there a way I can use the same popup for the registration screen?

 

Thanks again!

Reply
(@nico39)
Joined: 3 years ago

Active Member
Posts: 12

@opex since elementor don’t have a dedicated register module it’s not possible. You have to use addon plugin like (if a remember right) ultimatelementor or essentialaddons…

It’s possible with elementor default form with a lot of php….but never really interest in

 

 

Reply
Share: