MyBB Community Forums

Full Version: HOw to add class attribute in the following code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am trying to add class attribute in thx.php file

here is the default code :

$post['thanks'] = "<a id=\"a{$post['pid']}\" onclick=\"var uno = thx({$post['pid']});var dos = hideuntilthanks_reload(); return uno && dos;\" href=\"showthread.php?action=thank&tid={$post['tid']}&pid={$post['pid']}\"><img border=\"0\" alt=\"$lang->thx_main\" title=\"$lang->thx_main\" id=\"i{$post['pid']}\" /></a>";

In the above code I want to add

class="threadbt2"

I tried to add code like this :


$post['thanks'] = "<a id=\"a{$post['pid']}\" class="threadbt2" onclick=\"var uno = thx({$post['pid']});var dos = hideuntilthanks_reload(); return uno && dos;\" href=\"showthread.php?action=thank&tid={$post['tid']}&pid={$post['pid']}\"><img border=\"0\" alt=\"$lang->thx_main\" title=\"$lang->thx_main\" id=\"i{$post['pid']}\" /></a>";

But it is showing error. How can I add the class attribute in this code?

Thanks.
Add it like this...

class=\"threadbt2\"
Thanks. It worked.