MyBB Community Forums

Full Version: MyBB portal hide block (collapse and show blocks)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
dam i have a problem Sad something doesnt seem to be closed correctly as my 2nd block is going to the bottom

dont worry though i will work it out lol i hate tables Sad

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
<table style="margin-top: -16px;" width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">
<tr><td valign="top" width="200">
{$welcome}
{$pms}
{$stats}
{$whosonline}
</td>
<td>&nbsp;</td>
<td valign="top">
{$announcements}
<br />
<center>{$multipage}</center>
</td>
<td>&nbsp;</td>
<td valign="top" width="180">
{$search}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>Current Projects</strong>
<div class="expcolimage"><img src="images/collapse.gif" id="custom_1_img" class="expander" alt="[-]" title="[-]" /></div>
</td>
</tr>
<tbody style="" id="custom_1_e">
<tr>
<td class="trow1" align="center">
<table border="0" cellpadding="5" cellspacing="0" style="border-radius: 5px;">
<tr>
        <td><a href="/forumdisplay.php?fid=10">SACNR KeyBinder</a></td>
        <td>V1.4B</td>
    </tr>
    <tr>
       <td><a href="/forumdisplay.php?fid=8">RA3 Map Manager</a></td>
        <td>V1.0</td>
    </tr>
    <tr>
       <td><a href="/forumdisplay.php?fid=14">Lock Me Evolution</a></td>
        <td>V1.0</td>
    </tr>
    <tr>
        <td><a href="/forumdisplay.php?fid=18">FC Browser</a></td>
        <td>V1.1</td>
    </tr>
    <tr>
        <td colspan="2" style="text-align:center;"><a href="/projects.php">More Detailed Information</a></td>
    </tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>Previous Projects</strong></td>
</tr>
<tr>
<td class="trow1" align="center">
<table border="0" cellpadding="5" cellspacing="0" style="border-radius: 5px;">
<tr>
       <td><a href="/forumdisplay.php?fid=12">P2Map Launcher</a></td>
        <td>V1.6</td>
    </tr>
    <tr>
        <td><a href="/forumdisplay.php?fid=16">SAMP Log Manager</a></td>
        <td>V1.0 </td>
    </tr>
    <tr>
        <td><a href="/forumdisplay.php?fid=14">Lock Me</a></td>
        <td>V2.3.4</td>
    </tr>
    <tr>
        <td colspan="2" style="text-align:center;"><a href="/projects.php">More Detailed Information</a></td>
    </tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{$footer}
</body>
</html>
(2012-07-10, 05:24 PM)fma965 Wrote: [ -> ]dam i have a problem Sad something doesnt seem to be closed correctly as my 2nd block is going to the bottom

Yes, that's what I just told you Toungue
Yes, I noticed but i did type that before you wrote your message but forgot to send it Sad

i fixed it.

one lot of this code needed to be removed from the first block
</td>
</tr>
</table>

here you can see i fixed it Smile

http://forgottencoders.co.uk/

havent added the collapse to announcments yet, just the image so far.

ok yep added announcements collapsing aswell now.

this looks weird like this Big Grin

[Image: ylhek.png]
Looks good FMA - it is of course cookiefied. Now lets see you do it with a sidebar Toungue
lol seriously leefish do you like come on mybb and think 'now to find and stalk all fma965's threads' Toungue. sidebar for what? do you mean the boxs on that image? i haven't got to that yet but i assume its easy. did you say this was cookiefied as mine isn't Sad but i dont think i want it to any way but i may change my mind

And no next is my custom use of the forum rules to display a sort of project page with changelog, info, screenshots etc, using jquery ofc

http://forgottencoders.co.uk/forumdisplay.php?fid=12 < thats what i mean btw
* Leefish stalks FMA965 Big Grin

It will be cookiefied if you hook it up correctly, like on index, so closed is CLOSED when you go back to look at it.
You can see how it works in the index_boardstats template:

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" title="[-]" /></div>
<div class="strong">Online today</div>
</td>
</tr>
</thead>
<tbody style="{$collapsed['boardstats_e']}" id="boardstats_e">
{$online_today}

</tbody>
</table>
<br />

try changing all the "boardstats" to "mybox" and it should hold it's state on page refresh
OK THANKS got it all working Smile
Make sure you have both gifs in the target folder for the images.

Try changing all of the instances of the word boardstats to mybox. Try find replace in notepad.
(2012-07-10, 10:05 PM)Leefish Wrote: [ -> ]Make sure you have both gifs in the target folder for the images.

Try changing all of the instances of the word boardstats to mybox. Try find replace in notepad.

Yeah like i said was tired last night but got it all working and am restored back to my full capacity now lol.
Pages: 1 2