MyBB Community Forums

Full Version: [Tutorial] Adding Extra Content Boxes on the Index Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Go to AdminCP>Templates & Style>Templates>Your Theme Templates>Index Templates>index

and add

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr><td class="thead"><strong>Heading</strong></td></tr>
<tr><td class="trow1">
This is where you can put your content.
</td></tr>
</table><br>
for regular, non-collapsible boxes, or

<table width="100%" 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>Thead name</strong>
                </td>
            </tr>
        </tbody>
        <tbody style="{$collapsed['newbox_e']}" id="newbox_e">  
            <tr>
                <td class="trow1">** Content Here **</td>
            </tr>
        </tbody>
    </table>
<br />
(Thanks, Doobie) for collapsible boxes, obviously suiting the code for your needs.

Wherever you want it on the index, above forums is above {$forums}. Do not put this above {$header}, or under {$footer} as it will distort your board.

This can be helpful for displaying announcements on the index page. Enjoy...

Demo Link: http://www.tncgraphics.mybbnew.com
The only thing about the collapsible one, if you go to a different page, and then come back to the index, it isnt collapsed anymore...

Great tutorial though!
Probably most of the users know how to add collapsible and Non-collapsible boxes right on the index page, yet it is helpful for someone to get the *Box codes* from here... Thankyou
(2009-05-02, 03:54 AM)Josh[y] Wrote: [ -> ]The only thing about the collapsible one, if you go to a different page, and then come back to the index, it isnt collapsed anymore...

No... They an collapse and uncollapse again... If you encountering this problem then Feel Free to ask in the support forum
Could you post some screen shots?
(2009-05-02, 07:39 AM)Joshua Mayer Wrote: [ -> ]Could you post some screen shots?

oh... Don't know what these boxes codes do for you ?? It just adds boxes having colapse and Un collapse button in your index page... Just as quick reply in showthread page, boardstats in index page etc etc.
Nice. Might use this. I already knew how to, but it's easier to copy the code.
(2009-05-02, 09:35 AM)ghazal Wrote: [ -> ]
(2009-05-02, 07:39 AM)Joshua Mayer Wrote: [ -> ]Could you post some screen shots?

oh... Don't know what these boxes codes do for you ?? It just adds boxes having colapse and Un collapse button in your index page... Just as quick reply in showthread page, boardstats in index page etc etc.
Ghazal, I know what this code does, I have done this before on one of my forums. I meant screen shots so other who don't know could see what it does.
Well, I have it in action at http://www.tncgraphics.mybbnew.com
You should add that as a demo link to your first post.
(2009-05-02, 11:27 AM)Joshua Mayer Wrote: [ -> ]Ghazal, I know what this code does, I have done this before on one of my forums. I meant screen shots so other who don't know could see what it does.

okay...
Pages: 1 2 3