MyBB Community Forums

Full Version: Collapse, expand code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can we use this code to display the collapse, expander for the custom templates we create?

<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
Try this;

<table width="50%" cellpadding="6" cellspacing="1" border="0" class="tborder">
<tbody>
<tr>
<td class="thead" colspan="2">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['newbox_e']}.gif" id="newbox_img" class="expander" alt="[-]" title="[-]" /></div>
<strong><span class="smalltext">BOX_TITLE</span></strong>
</td>
</tr>
</tbody>
<tbody style="{$collapsed['newbox_e']}" id="newbox_e">  
<tr>
<td class="trow1">BOX_CODE</td>
</tr>
</tbody>
</table>
thanks yaldaram
using this code for prostats

<div id="prostats_table">
                <table width="100%" border="0" cellspacing="{$theme[borderwidth]}" cellpadding="{$theme['tablespace']}" class="tborder">
        <thead>
        <tr>                                
                <td class="thead" colspan="{$num_columns}">                         
                        <div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['prostats_e']}.gif" id="prostats_img" class="expander" alt="[-]" title="[-]" /></div><div style="float: right; vertical-align: middle; padding: 0px 3px 0px 0px;"><a href="" onclick="return prostats_reload();"><img src="{$mybb->settings['bburl']}/images/ps_reload.png" alt="Reload" /></a></div>
                        <div><strong>{$lang->prostats_prostats}</strong></div>   
                </td>
        </tr>
        </thead>        
                <tbody style="{$collapsed['prostats_e']}" id="prostats_e">
        {$trow_message_top}
        <tr valign="top">
        {$prostats_content}
        </tr>
        {$trow_message_down}
        </tbody>
        </table>
        <br />
        </div>
and when we click on refresh button on right and then if we click the minimize button, it is throwing error and not resizing.
error
Type: 2
File: inc/plugins/benzerkonu.php (Line no. 128)
Message
Cannot modify header information - headers already sent by (output started at /home/fds435/public_html/forum/inc/plugins/prostats.php:1680)
The error shows that you are using the code above <?php tags.