message editor icons/buttons
Quote from ray on August 17, 2018, 11:24 amThe last icon on the message editor toolbar has a tool tip of “insert/edit image(Shift+Alt+M)”.
On my forum I have disabled uploads it doesn’t make sense (to me) to be able to ‘insert/edit image’ when uploads are disabled. Also the dialog box that pops up on clicking the button is lacking in usability instructions. I have worked it out but my forum users are just confused. So I need it to be able to remove it and I can’t find CSS code that I think will work consistently on the toolbar.
It does not appear on my editor toolbar at other places eg add new post.
I have installed WPedit plugin and it is not listed on its toolbars so i can’t remove it there, But I do see it is a ‘standard WP’ button I can add to my toolbar using WPedit and it does get added so WPedit is working just fine. Therefore it appears to me to be something you have added.
Suggestions?
Thanks
The last icon on the message editor toolbar has a tool tip of “insert/edit image(Shift+Alt+M)”.
On my forum I have disabled uploads it doesn’t make sense (to me) to be able to ‘insert/edit image’ when uploads are disabled. Also the dialog box that pops up on clicking the button is lacking in usability instructions. I have worked it out but my forum users are just confused. So I need it to be able to remove it and I can’t find CSS code that I think will work consistently on the toolbar.
It does not appear on my editor toolbar at other places eg add new post.
I have installed WPedit plugin and it is not listed on its toolbars so i can’t remove it there, But I do see it is a ‘standard WP’ button I can add to my toolbar using WPedit and it does get added so WPedit is working just fine. Therefore it appears to me to be something you have added.
Suggestions?
Thanks
Quote from Asgaros on August 18, 2018, 4:51 pmHello @ray
This button can be used to include images inside of posts via their links. Users cannot use this functionality for uploading any files/images.
Currently there is no filter available to remove this button but if you are fine with editing a core-file you can have a look into the following file:
- asgaros-forum/includes/forum-editor.php
- Around line 19 you will find: $buttons[] = ‘image’;
- Replace it with: //$buttons[] = ‘image’;
Hello @ray
This button can be used to include images inside of posts via their links. Users cannot use this functionality for uploading any files/images.
Currently there is no filter available to remove this button but if you are fine with editing a core-file you can have a look into the following file:
- asgaros-forum/includes/forum-editor.php
- Around line 19 you will find: $buttons[] = ‘image’;
- Replace it with: //$buttons[] = ‘image’;
Quote from ray on August 19, 2018, 2:44 amok I can do that.
i’ll just have to remember to check and do ait again as appropriate as updates are release. I usually deploy updates to my development site before my production site so that should be ok.
thanks
ok I can do that.
i’ll just have to remember to check and do ait again as appropriate as updates are release. I usually deploy updates to my development site before my production site so that should be ok.
thanks
Quote from Asgaros on August 19, 2018, 1:55 pmHello again @ray
The next version will come with a new filter called asgarosforum_filter_editor_buttons. You can use this filter to modify the editor buttons used inside the forum editor, for example in your case:
function remove_img_button($buttons) { // Remove the read-more button. $searchKey = array_search('image', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } return $buttons; } add_filter('asgarosforum_filter_editor_buttons', 'remove_img_button');You can find the changeset here:
https://github.com/Asgaros/asgaros-forum/commit/bbb160b9a2b6d7e59265751fc4af6345c207590c
Hello again @ray
The next version will come with a new filter called asgarosforum_filter_editor_buttons. You can use this filter to modify the editor buttons used inside the forum editor, for example in your case:
function remove_img_button($buttons) { // Remove the read-more button. $searchKey = array_search('image', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } return $buttons; } add_filter('asgarosforum_filter_editor_buttons', 'remove_img_button');
You can find the changeset here:
https://github.com/Asgaros/asgaros-forum/commit/bbb160b9a2b6d7e59265751fc4af6345c207590c
Quote from Asgaros on February 6, 2019, 8:59 pmHello @ivan
If you want to remove multiple buttons of the editor and dont have coding-experience, I recommend you to use a plugin like the following:
https://wordpress.org/plugins/tinymce-advanced/
With this extension you can fully customize the WordPress editor and its functionality (buttons).
Hello @ivan
If you want to remove multiple buttons of the editor and dont have coding-experience, I recommend you to use a plugin like the following:
With this extension you can fully customize the WordPress editor and its functionality (buttons).
Quote from Ivan on February 6, 2019, 9:15 pmQuote from Asgaros on February 6, 2019, 8:59 pmHello @ivan
If you want to remove multiple buttons of the editor and dont have coding-experience, I recommend you to use a plugin like the following:
https://wordpress.org/plugins/tinymce-advanced/
With this extension you can fully customize the WordPress editor and its functionality (buttons).
Thanks for the quick response! Could you tell me how to do this with functions.php
Quote from Asgaros on February 6, 2019, 8:59 pmHello @ivan
If you want to remove multiple buttons of the editor and dont have coding-experience, I recommend you to use a plugin like the following:
With this extension you can fully customize the WordPress editor and its functionality (buttons).
Thanks for the quick response! Could you tell me how to do this with functions.php
Quote from Ivan on February 6, 2019, 9:39 pmSo it will be right?
function remove_img_button($buttons) { // Remove the read-more button. $searchKey = array_search('image', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } $searchKey = array_search('fullscreen', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } $searchKey = array_search('link', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } return $buttons; } add_filter('asgarosforum_filter_editor_buttons', 'remove_img_button');Or you can make it easier?
So it will be right?
function remove_img_button($buttons) { // Remove the read-more button. $searchKey = array_search('image', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } $searchKey = array_search('fullscreen', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } $searchKey = array_search('link', $buttons); if ($searchKey !== false) { unset($buttons[$searchKey]); } return $buttons; } add_filter('asgarosforum_filter_editor_buttons', 'remove_img_button');
Or you can make it easier?
Quote from Asgaros on February 12, 2019, 7:17 pmHello @ivan
Sorry for the late reply! Yes, your code looks fine.
Just add it to the end (before the closing ?> tag if there is one) of your themes functions.php file.
Hello @ivan
Sorry for the late reply! Yes, your code looks fine.
Just add it to the end (before the closing ?> tag if there is one) of your themes functions.php file.