MyBB Community Forums

Full Version: Can someone make this code css instead of image?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
CSS: (taken from warning postbit)

<a href="warnings.php?action=warn&amp;uid={$post['uid']}&amp;pid={$post['pid']}" class="buttons" alt="WARN" title="WARN"><img src="images/envy/english/pbf.png" style="vertical-align: middle;"> WARN</a>

I'm using a thanks plugin, and I want it to say Like with this image next to it (http://g-eazy.net/forum/images/rose.gif)

code for plugin:
$post['thanks'] = "<a id=\"a{$post['pid']}\" onclick=\"javascript:return thx({$post

['pid']});\" href=\"showthread.php?action=thank&tid={$post['tid']}&pid={$post['pid']}\">
<img src=\"{$mybb->settings['bburl']}/{$theme['imgdir']}/postbit_thx.gif\" border=\"0\"

alt=\"$lang->thx_main\" title=\"$lang->thx_main\" id=\"i{$post['pid']}\" /></a>";

Thanks guys
Could you explain yourself some more? I can't quite understand what you want to do.
(2014-12-07, 03:51 AM)Greg Winston Wrote: [ -> ]Could you explain yourself some more? I can't quite understand what you want to do.

Trying to replace the image code in postbit to a CSS button

http://puu.sh/dkdlW/ae1435d1df.png

That broken image should say Like in CSS button like the rest. It's a plugin but I don't know how to edit the CSS of that certain thing
replies here might help
(2014-12-07, 03:55 AM).m. Wrote: [ -> ]replies here might help

I know where to modify it, I just need the code
(2014-12-07, 04:36 AM)geazy Wrote: [ -> ]
(2014-12-07, 03:55 AM).m. Wrote: [ -> ]replies here might help

I know where to modify it, I just need the code

If I understand you correctly:

Add class=\"buttons\" to the PHP code (the backslashes escape the quotation marks). Also, change "/postbit_thx.gif" to "/rose.gif".

So it should look something like this:


$post['thanks'] = "<a  id=\"a{$post['pid']}\" class=\"buttons\" onclick=\"jreturn thx({$post

['pid']});\" href=\"showthread.php?action=thank&tid={$post['tid']}&pid={$post['pid']}\">
<img src=\"{$mybb->settings['bburl']}/{$theme['imgdir']}/rose.gif\" border=\"0\"

alt=\"$lang->thx_main\" title=\"$lang->thx_main\" id=\"i{$post['pid']}\" /></a>";

Once you've done this, please come back with an image or screenshot of how it looks like, so we can help you further.