How to change "Post Buttons" from image to text
3 posters
Page 1 of 1
How to change "Post Buttons" from image to text
I would like to know how to change "Post Buttons" from image to text also give a class for them...
Re: How to change "Post Buttons" from image to text
You mean Replay, New Topic, Locked, Quote and all others or what? I don't understand it at all.
Re: How to change "Post Buttons" from image to text
levy wrote:You mean Replay, New Topic, Locked, Quote and all others or what? I don't understand it at all.
Yes, levy
I'm using PunBB
Re: How to change "Post Buttons" from image to text
Well for the reply / new topic buttons you can just edit the templates. An example with the viewtopic_body template :
Find the above and just replace the image element ( for example <img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /> ) with text and add a class to the link.
I'm not entirely sure about the post options, but you could just do something like this for example :
Modules > JS codes management > new script
Placement : In the topics
Then some CSS to style the class added via JavaScript :
- Code:
<p class="posting">
<!-- BEGIN switch_user_authpost -->
<a href="{U_POST_NEW_TOPIC}" rel="nofollow"><img src="{POST_IMG}" class="{POST_IMG_CLASS}" alt="{L_POST_NEW_TOPIC}" /></a>
<!-- END switch_user_authpost -->
<!-- BEGIN switch_user_authreply -->
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /></a>
<!-- END switch_user_authreply -->
</p>
Find the above and just replace the image element ( for example <img src="{REPLY_IMG}" class="i_reply" alt="{L_POST_REPLY_TOPIC}" /> ) with text and add a class to the link.
I'm not entirely sure about the post options, but you could just do something like this for example :
Modules > JS codes management > new script
Placement : In the topics
- Code:
$(function() {
for (var opts = $('.post-options'), i = 0, j = opts.length, k, l, c; i < j; i++) {
for (c = opts[i].childNodes, k = 0, l = c.length; k < l; k++) {
c[k].className += ' post-button'; // add class
c[k].tagName == 'A' ? c[k].innerHTML = c[k].firstChild.alt : c[k].src = ''; // change content depending on tag type
}
}
});
Then some CSS to style the class added via JavaScript :
- Code:
.post-button {
background:#EEE;
border:1px solid #CCC;
padding:3px;
}
Re: How to change "Post Buttons" from image to text
Sorry @Ange Tuteur I'm using PhpBB3
And I want to change from Post new topic : to View IP address of poster : in text
And I want to change from Post new topic : to View IP address of poster : in text
Re: How to change "Post Buttons" from image to text
Same methods I posted should apply. However, for the script, it just needs a few changes to the selected elements.
- Code:
$(function() {
for (var opts = $('.profile-icons'), i = 0, j = opts.length, k, l, c; i < j; i++) {
for (c = opts[i].getElementsByTagName('A'), k = 0, l = c.length; k < l; k++) {
c[k].className += ' post-button'; // add class
c[k].innerHTML = c[k].firstChild.alt; // change content depending on tag type
}
}
});
Similar topics
» change the picture, the text and the backround of the buttons
» Text change in image
» How can I change the post-color text?
» How to change forum post's to a image?
» Change to Buttons and Who Is Online Image
» Text change in image
» How can I change the post-color text?
» How to change forum post's to a image?
» Change to Buttons and Who Is Online Image
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum