kedinn turpo
asked 10 years ago

Hi I have a problem, I have tried to change but I can not 
dw-question-answer.php from line 428
image will understand
http://www.comoprogramar.org/wp-content/uploads/ere.jpg

4 Answers
kedinn turpo
answered 10 years ago

 
 
I just want the button to appear around, I’ll take care of the rest, and modify
here I have to change?
<pre>

function dwqa_tinymce_addbuttons() {
if ( ! current_user_can(‘edit_posts’) && ! current_user_can(‘edit_pages’) )
return;
if ( get_user_option(‘rich_editing’) == ‘true’ && !is_admin() ) {
add_filter(“mce_external_plugins”, “dwqa_add_custom_tinymce_plugin”);
add_filter(‘mce_buttons’, ‘dwqa_register_custom_button’);
}
}
add_action(‘init’, ‘dwqa_tinymce_addbuttons’);
function dwqa_register_custom_button($buttons) {
array_push($buttons, “|”, “dwqaCodeEmbed”);
return $buttons;
}
function dwqa_add_custom_tinymce_plugin($plugin_array) {
global $dwqa_options;
if( is_singular(‘dwqa-question’) || ($dwqa_options[‘pages’][‘submit-question’] && is_page( $dwqa_options[‘pages’][‘submit-question’] ) )
){
$plugin_array[‘dwqaCodeEmbed’] = DWQA_URI . ‘assets/js/code-edit-button.js’;
}
return $plugin_array;
}
</pre>

kedinn turpo
answered 10 years ago

problem solved, change the code if you want one 😀
 
 
function dwqa_tinymce_addbuttons() {
if ( get_user_option(‘rich_editing’) == ‘true’ ) {
add_filter(“mce_external_plugins”, “dwqa_add_custom_tinymce_plugin”);
add_filter(‘mce_buttons’, ‘dwqa_register_custom_button’);
}
}
add_action(‘init’, ‘dwqa_tinymce_addbuttons’);
function dwqa_register_custom_button($buttons) {
array_push($buttons, “|”, “dwqaCodeEmbed”);
return $buttons;
}
function dwqa_add_custom_tinymce_plugin($plugin_array) {

$plugin_array[‘dwqaCodeEmbed’] = DWQA_URI . ‘assets/js/code-edit-button.js’;

return $plugin_array;
}

DominicStaff
answered 10 years ago

Awesome ! I appreciate it.

harsh deshmukh
answered 10 years ago

Hi Kedinn,
Even I was looking for this since year for image attachment feature
However I have asked for the same in below thread.
http://www.designwall.com/question/image-attachment-feature/
As I can see you have successfully Implemented the Image attachment feature in you blog(http://www.comoprogramar.org).
It will be a great help, If you can share the code or give some idea, How did you achieve the same ? I am sure This feature will be add -on to  Dw-Qa.
Looking for your response.Keep the good work going.. 🙂
 
Regards,
Harsh Deshmukh
 

Powered by DW Question & Answer Pro