MyBB Community Forums

Full Version: how make hidden ads button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i add some advertisement in my header.
now i like to add hidden button in the thead of ads box that user can hidden ads if they want .
i use some code just like somethings that mybb use for forum thead :

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tabliq">
<thead>
<tr>
<td class="thead" colspan="2">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse.gif" id="cat_138_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="http://www.r30.ir/thread-448.html">adv</a></strong></div>
</td>
</tr>
</thead>
<tbody  id="cat_138_e">
MY ADS 

</tbody>
</table>

now when i click to hidden button it works good. but when i refresh the page view ads .
how can i do it ?
any suggestion?
Use a cookie to remember a user has clicked to hide the ad.
how ?
any suggestion!
i can probably code that in jquery however their is a probably a more efficient and cleaner way using php or even prototype