MyBB Community Forums

Full Version: Adding collapse/expand feature to Overview plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quote:This is my first tutorial here Blush

Go to Template Sets ยป Global Templates then
Edit the template: index_overview (note that this template will only show if you have the Overview plugin activated)

You'll see this:
<table width="100%" border="0" cellspacing="$theme[borderwidth]" cellpadding="0" class="tborder">
        <thead>
        <tr><td colspan="$num_columns">
<table  border="0" cellspacing="0" cellpadding="$theme[tablespace]" width="100%"><tr class="thead"><td><strong>$lang->overview_overview</strong></td></tr></table></td>
        </tr>
        </thead>
        <tbody>
        $trow_message
        <tr>
        $overview_content
        </tr>
        </tbody>
        </table>
        <br />

Replace everything with this:
<table width="100%" border="0" cellspacing="$theme[borderwidth]" cellpadding="0" class="tborder">
        <thead>
        <tr><td colspan="$num_columns">
<table  border="0" cellspacing="0" cellpadding="$theme[tablespace]" width="100%"><tr class="thead"><td>
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['overview']}.gif" id="overview_img" class="expander" alt="[-]" /></div>
<strong>$lang->overview_overview</strong></td></tr></table></td>
        </tr>
        </thead>
        <tbody style="{$collapsed['overview_e']}" id="overview_e">
        $trow_message
        <tr>
        $overview_content
        </tr>
        </tbody>
        </table>
        <br />

What I've added/modified:
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['overview']}.gif" id="overview_img" class="expander" alt="[-]" /></div>

<tbody style="{$collapsed['overview_e']}" id="overview_e">