Henrik Gregersen
asked 9 years ago

Hi.

I am setting up DWQA, and I need to know if there is a way I can remove the login form on the QA page, and instead show a link to my login page..

![Screenshot](https://dl.dropboxusercontent.com/u/3809836/use-my-own-login-page-and-remove-form.jpg "Screenshot")

Second.. Can I change the editor to be something more like this editor?

Third.. I have translated the plugin to Danish.. Where can I upload the translation?

Kind Regards

Henrik

1 Answers
DominicStaff
answered 9 years ago

Hi,

  • You can open the \wp-content\plugins\dw-question-answer\inc\template-functions.php file and then find the line 503. $submit_question_link = wp_login_url( $submit_question_link ); You can add your link here: $submit_question_link = "....";

Open the \wp-content\plugins\dw-question-answer\inc\templates\default\answer.php file and then find the line 107. printf( '%1$s <a href="%2$s" title="%3$s">%3$s</a> %4$s', __( 'Please login or', 'dwqa' ), wp_registration_url(), __( 'Register', 'dwqa' ), __( 'to Submit Answer', 'dwqa' ) );
Note: change the href='#'

  • We’ve used the tinyMCE editor of wordpress default, if you want to remove several unused icons, you can add the following code to the function.php file:
add_filter("mce_buttons", "tinymce_editor_buttons", 99); //targets the first line
add_filter("mce_buttons_2", "tinymce_editor_buttons_second_row", 99); //targets the second line

function tinymce_editor_buttons($content) {
return array(
    "undo", 
    "redo", 
    "separator",
    "bold", 
    "italic", 
    "underline", 
    "strikethrough", 
    "dwqaCodeEmbed",
    "separator",
    "bullist", 
    "separator",
    //add more here...
    );
}

function tinymce_editor_buttons_second_row($content) {
   //return an empty array to remove this line
    return array();
}

The button control list can be found here: http://www.tinymce.com/wiki.php/TinyMCE3x:Buttons/controls

abja
replied 9 years ago

Dominic I tried to put in my URL into the code you specified in your first bullet point and my site crashed. Could you give me some guidance as to how I could fix it? its questionitt.com

dominic Staff
replied 9 years ago

@abja, you can send me username & password of your site via private answer and your link, I will check and help you resolve this issue.

abja
replied 9 years ago

Hi Dominic, I went to file manager in my cpanel and reversed out what i did wrong. Thank you very much!!

abja
replied 9 years ago

Although I am back to where I started: puzzled as to how I can change the Login links in the DW Question Answer Plugin?

dominic Staff
replied 9 years ago

You can open the \wp-content\plugins\dw-question-answer\inc\template-functions.php file and then find around the line 503.
$submit_question_link = wp_login_url( $submit_question_link );
You can change to look like this: $submit_question_link = "http://your-site.com/login-page";
Regards,

henrik gregersen
replied 9 years ago

How do you protect your changes then from future updates, if you have to edit the template-functions.php?

henrik gregersen
replied 9 years ago

And also what I really am looking for is to remove the login form that is inserted on the DWQA pages.. I need to insert a link to the login page instead.

dominic Staff
replied 9 years ago
  • In case you want update without losing the customization you made with the older Q&A plugin version. Before updating the latest version, please mark and copy all files that you edited, then update to new version
    After finishing, you add all customized code to your plugin.
  • To remove the login box, you can add the following code to the style.css file:
    .dwqa-container .login-box { display: none;}
    Regards,
Powered by DW Question & Answer Pro