|
MyBB CSS Postbit Buttons
|
|
02-12-2012, 03:25 PM
(This post was last modified: 03-04-2012 01:54 AM by Detrition.)
|
|||
|
|||
|
MyBB CSS Postbit Buttons
This tutorial is going to show you how to replace the default MyBB image buttons (postbit, new reply, new thread, etc) with CSS buttons. Why is this an amazing trick?
So let me try and explain the process. We'll use postbit_email for the example [located at Templates -> YourTemplates -> Post Bit Templates -> postbit_email] This is what you see by default: Code: <a href="member.php?action=emailuser&uid={$post['uid']}"><img src="{$theme['imglangdir']}/postbit_email.gif" alt="{$lang->postbit_email}" title="{$lang->postbit_email}" /></a>This is what we'll be changing it too: Code: <a href="member.php?action=emailuser&uid={$post['uid']}" class="postbit">email</a>First we will need to create our CSS button. You can do this by yourself, but why stress when there is tools on the internet designed to make css buttons? This is the css button generator I recommend: http://www.cssbuttongenerator.com/ After you customize your button, click on it to get your code. This is the default button code on the website (and what we will be using): Code: .myButton {Rename the classes to 'postbit' and you'll have this: Code: .postbit {Add this in your global.css file. We're almost done! Navigate back to your postbit_email template and replace all of the text with the following code: Code: <a href="member.php?action=emailuser&uid={$post['uid']}" class="postbit">email</a>So what did we just do? The button links to the email function and then calls for the class "postbit." This is the class we just added to the global.css, and then the text "email" is added onto the button. Now view it on your forum by viewing a thread. You now have a css button! You'll need to modify the following templates for a sitewide re-do, which is 100% worth it:
This can be done with 15 minutes of work. It will save you so much time in the future: do it now! Thanks for reading. |
|||
|
02-12-2012, 03:33 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
wow this is something i have never thought of before. i have wasted so much time in GIMP editing my buttons >.<
RAINFALL - PM ME TO CHAT |
|||
|
02-15-2012, 12:19 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
....So the 3-4 hours I spent editing images in Photoshop was all for nothing?! D:
Everything I knew was a lie... still, pretty dang good tutorial. |
|||
|
02-15-2012, 12:34 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
You'd be surprised at the images you can replace by just using css.
![]() Not only will it save you time, it will also help speed loading times of your forum if your theme uses a lot of images. |
|||
|
02-15-2012, 10:17 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
Yeah, all of the default images (thead, tborder, etc) are css gradients on here.
|
|||
|
02-21-2012, 05:07 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
I don't know if you are missing anymore, but if they want to edit the closed button they would need to edit
showthread_newreply_closed Kris Trammell kris@kristrammell.x10.mx http://kristrammell.x10.mx http://kristrammell.x10.mx/forum |
|||
|
02-22-2012, 10:29 AM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
I used this tutorial to make buttons on my site. Thank you very much!
|
|||
|
02-22-2012, 11:44 AM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
No problem, glad it helped you
|
|||
|
02-22-2012, 12:45 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
i hope to implement this on all of my future forums!
|
|||
|
02-22-2012, 10:08 PM
|
|||
|
|||
|
RE: Replacing MyBB Buttons to CSS Buttons
Thanks for the tutorial this helps me out a lot since I am new into making themes
|
|||
|
« Next Oldest | Next Newest »
|

Home
Members
Twitter
Downloads
Donate


.png)
![[Image: 21cinih.png]](http://i40.tinypic.com/21cinih.png)
![[Image: sig.png]](http://www.moviesandpopcorn.net/images/movie/sig.png)

