Afit Husni
asked 10 years ago

My blog using livefyre plugin for comment, and i want to make it to DWQA Plugin, I just want to have one login system. how to replace login member DWQA plugin to livefyre?

2 Answers
Guru
answered 10 years ago

@Afit Husni,
Assuming your plugin template files are still in the plugin directory:
open the file wp-content/plugins/dw-question-answer/inc/templates/default/answers.php
and comment out the following code: 
<h3 class=”dwqa-title”>
<?php
printf(‘%1$s %2$s <a href=”%3$s” title=”%4$s”>%4$s</a> %5$s %6$s’,
__(‘Please login’,’dwqa’),
__(‘or’,’dwqa’),
site_url( ‘wp-login.php?action=register’ ),
__(‘Register’,’dwqa’),
__(‘to’,’dwqa’),
__(‘Submit Answer’,’dwqa’)
);
?>
</h3>
<div class=”login-box”>
<?php wp_login_form( array(
‘redirect’ => get_post_permalink( $question_id )
) ); ?>
</div><?php */?>
 
This will remove the login box and the text above it. Now you can get the login text of your choice and link it to the login of your plugin.
Hope this helps.

Jin
replied 10 years ago

Any update on this?
@Afit Husni: did you try out this solution?

Afit Husni
replied 10 years ago

sorry for late respond, i not yet try that solution, i will update shortly

Guru Ghantaal
replied 10 years ago

Yes, it would be nice to see how it works for you!

Afit Husni
replied 10 years ago

i just remove that script but nothing happens

Guru
replied 10 years ago

Apologies Afit, I just re-read your question and realised that I misunderstood your question. The answer provided was for allowing your to place login fields by any other plugin than that provided in the plugin. But I think your question is regarding a single login for comments.

Afit Husni
replied 10 years ago

thanks for respon Guru. Maybe i want to make it and don’t use livefyre to my comment system.

But yes, i want to make a single login for comment and dwqa plugin. but how to make ‘login’ as default instead of ‘register’.

for example: i want to this page login/register http://idwinphone.com/kirim-pertanyaan like this page http://idwinphone.com/kirim-pertanyaan

Guru
answered 10 years ago

Dear @afit,
 
Kindly apply the answer above and then place the following code in its place:
 
<?php echo do_shortcode(‘[userpro template=login max_width=100% login_heading=\’Login to Submit an Asnwer\’]’); ?>
 
This will enable userpro login/register options at the bottom of answers. 
To do the same for the submit questions page go to template-functions.php in /wp-content/plugins/dw-question-answer/inc
and find: 
<input type=”hidden” name=”login-type” id=”login-type” value=”sign-up” autocomplete=”off”>
<div class=”question-register clearfix”>
<label for=”user-email”><?php _e(‘You need an account to submit question and get answers. Create one:’,’dwqa’) ?></label>
<div class=”register-email register-input”>
<input type=”text” size=”20″ value=”” class=”input” placeholder=”<?php _e(‘Type your email’,’dwqa’) ?>” name=”user-email”>
</div>
<div class=”register-username register-input”>
<input type=”text” size=”20″ value=”” class=”input” placeholder=”Choose an username” name=”user-name-signup” id=”user-name-signup”>
</div>
<div class=”login-switch”><?php _e(‘Already a member?’,’dwqa’) ?> <a class=”credential-form-toggle” href=”<?php echo wp_login_url(); ?>”><?php _e(‘Log In’,’dwqa’) ?></a></div>
</div>
<div class=”question-login clearfix dwqa-hide”>
<label for=”user-name”><?php _e(‘Login to submit your question’,’dwqa’) ?></label>
<div class=”login-username login-input”>
<input type=”text” size=”20″ value=”” class=”input” placeholder=”Type your username” id=”user-name” name=”user-name”>
</div>
<div class=”login-password login-input”>
<input type=”password” size=”20″ value=”” class=”input” placeholder=”Type your password” id=”user-password” name=”user-password”>
</div>
<div class=”login-switch”><?php _e(‘Not yet a member?’,’dwqa’) ?> <a class=”credential-form-toggle” href=”javascript:void(0);” title=”<?php _e(‘Register’,’dwqa’) ?>”><?php _e(‘Register’,’dwqa’) ?></a></div>
</div>
 
replace the above code with: 
<?php echo do_shortcode(‘[userpro template=login max_width=100% login_heading=\’Login to Submit an Asnwer\’]’); ?>
 
You are all set now with userpro login integrated in your DWQA plugin, but where is my fee? 😉
 

Afit Husni
replied 10 years ago

i follow this tips but make my blog just show blank

Guru
replied 10 years ago

Dear Afit, the same settings are working absolutely fine for me. If you want me to check please post your ftp login details via private answer for further checking.

Best regards

Afit Husni
replied 10 years ago

okay, i will try again until give up, then i will give my ftp login. LOL!

Guru
replied 10 years ago

No seriously, the idea is for users to try things themselves. sending access details should be the last option and only if you trust the person you are sending your details too. Also always make a back up of your blog, along with the database before you do any such thing 🙂

Afit Husni
replied 10 years ago

okay, i sent it 🙂

Guru
replied 10 years ago

Dear Afit,

A one off favour! Please check you website and the pages, as I can see it working now: http://s7.postimg.org/l07esp3vv/Untitled.png

http://idwinphone.com/kirim-pertanyaan
http://idwinphone.com/question/test-question

I think you are using role manager which is preventing visitors from seeing questions. Also would be best if you backup the files mentioned above so that you modification cannot be erased in the event of an update.

Best regards

Afit Husni
replied 10 years ago

thanks for helping us, but I still waiting with my userpro plugin support to fix some bug related with this problem

Dominic Staff
replied 10 years ago

Hi Afit !
We will discuss about this issue in the next version.

Powered by DW Question & Answer Pro