Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text to bbcode buttons #126

Open
itsrachelfish opened this issue Aug 1, 2020 · 3 comments
Open

Add text to bbcode buttons #126

itsrachelfish opened this issue Aug 1, 2020 · 3 comments

Comments

@itsrachelfish
Copy link
Member

I think a simple way to improve the usability of the bbcode buttons would be to put the word next to each icon. I used the browser inspector to add some text next to the icons as an example

example-buttons

Ideally the text and icon would both be a clickable button, giving you a large area to click instead of a tiny little icon. It's more readable and more mobile friendly! Yay

@mozai
Copy link

mozai commented Dec 2, 2022

Buttons are actually images, and they're hardcoded at 23x22 in the default theme. And themes aren't per-user they're site-wide. >_<

Try this

--- a/forum/Themes/default/GenericControls.template.php
+++ b/forum/Themes/default/GenericControls.template.php
@@ -213,7 +213,7 @@ function template_control_richedit($editor_id, $smileyContainer = null, $bbcCont
                        echo '
                                        ],
                                        sButtonTemplate: ', JavaScriptEscape('
-                                               <img id="%buttonId%" src="%buttonSrc%" align="bottom" width="23" height="22" alt="%buttonDescription%" title="%buttonDescription%" />
+                                               <img id="%buttonId%" src="%buttonSrc%" align="bottom" width="23" height="22" alt="%buttonDescription%" title="%buttonDescription%" />%buttonDescription%
                                        '), ',
                                        sButtonBackgroundImage: ', JavaScriptEscape($settings['images_url'] . '/bbc/bbc_bg.gif'), ',
                                        sButtonBackgroundImageHover: ', JavaScriptEscape($settings['images_url'] . '/bbc/bbc_hoverbg.gif'), ',

@itsrachelfish
Copy link
Member Author

@mozai can you please open a PR for this change? Maybe you could collaborate with someone in chat to get a local instance of this running on someone's computer so you can test it out?

@ddeevviiaanntt
Copy link

While adding text to the button is a challenge, adding text to the image which comprises the button is easy. Would that be acceptable as a solution?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants