MyBB Community Forums

Full Version: Replace buttons with formatted text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, ¿Its possible to replace the img buttons using formatted text, or any button made with html or something similar?

Thx
It's possible as I did it with my Novus theme but there are compatibility issues with plugins.

To edit the buttons, replace the Postbit > postbit_[buttonname] template with this (the postbit_pm template):
<a class="postbit-button" href="private.php?action=send&amp;uid={$post['uid']}">pm</a>

Then in global.css:
a.postbit-button, a.postbit-button:visited, a.postbit-button:active {
        background: #c60000;
        padding: 5px;
        text-transform: uppercase;
        font-size: 10px;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
        border-radius: 5px;
        color: #fff;
        font-weight: bold;
	text-decoration: none;
}

a.postbit-button:hover {
        background: #333;
        text-decoration: none;
        color: #fff;
}

Obviously you can change the class names and colors in the CSS but this is just a template.
Mmm, i understand. ¿Its possible to do it related to the translations? I have a multi-language forum, and that was my idea.
(2010-11-20, 08:02 PM)iagovar Wrote: [ -> ]Mmm, i understand. ¿Its possible to do it related to the translations? I have a multi-language forum, and that was my idea.

Yes, it will translate. The code for postbit_pm should have been with a language variable:
<a class="postbit-button" href="private.php?action=send&amp;uid={$post['uid']}">{$lang->postbit_pm}</a>

The language variable for each button is in its alt and title attributes by default so you can get each one from there.
(2010-11-20, 10:38 PM)Ferron Wrote: [ -> ]
(2010-11-20, 08:02 PM)iagovar Wrote: [ -> ]Mmm, i understand. ¿Its possible to do it related to the translations? I have a multi-language forum, and that was my idea.

Yes, it will translate. The code for postbit_pm should have been with a language variable:
<a class="postbit-button" href="private.php?action=send&amp;uid={$post['uid']}">{$lang->postbit_pm}</a>

The language variable for each button is in its alt and title attributes by default so you can get each one from there.

Ok, i will try, thanks.
I have a new problem. I dont understand how to do with multiquote. How can i use +Q / -Q as text, not as img?

Replace the image to text in postbit_multiquote template.
(2010-11-24, 10:05 AM)Yaldaram Wrote: [ -> ]Replace the image to text in postbit_multiquote template.

Yep, but how can i do to have the same effect? I mena, how i do to do a changing text? (+Q / -Q)
You have to change two templates;

postbit_quote
postbit_multiquote