PDA

View Full Version : how to make a module collapse?


nexus851
11-18-2005, 01:26 AM
Currently, i'm using a weather module that could'nt collapse, could any help me with this problem? Im using 3.50 and its on the right column side.

P.S - also seems that whenever i put any module after the weather module (CMPS module order) it messes up my table.. the modules aftter the weather module uses the whole 100% width of the screen, in which it shouldve jsut stayed in the right column width instead...

I appreciate any Help with any of those 2 problems ...=)

JOhnny P.

Lizard King
11-18-2005, 02:21 AM
<tbody>
<tr>
<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('give_a_table_id')"><img id="collapseimg_give_a_table_id" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_give_a_table_id].gif" alt="" border="0" /></a>
any information this is the header
</td>
</tr>
</tbody>
<tbody id="collapseobj_give_a_table_id" style="$vbcollapse[collapseobj_give_a_table_id]">
<tr>
<td class="alt2">any information inside the module</td>
</tr>
</tbody>

Change the give_a_table_id to anything you want and fill the rest for collapsing modules.

For your weather module i'll have to see your weather module template.

nexus851
11-18-2005, 03:00 AM
this is my weather module template:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">

<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather conditions here.<br /><br /><phrase 1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field15] !=''">
<a href="http://www.weatherroom.com/forecast/$bbuserinfo[field15].html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=$bbuserinfo[field15]&config=png&alt=hwivzone&daysonly=1" alt="Weather for $bbuserinfo[field15] provided by weatherroom.com." border="0"></a>
<else />
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show weather conditions.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>

So how would you go about adding this into a collapseable module?

Lizard King
11-18-2005, 04:42 AM
Are you using vbadvanced cmps ? In vbadvanced if you upgrade to version 2.0 then you'll have a option to add a collapse image to each module you have. If you are using cmps 2.0 then you may enabled adv_module_shell template usage in this module which may cause a problem to you.

Anyway give a shot with this.

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tbody>
<tr>
<td class="tcat"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('wheather')"><img id="collapseimg_wheather" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_wheather].gif" alt="" border="0" /><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></a></td>
</tr>
</tbody>
<tbody id="collapseobj_give_a_table_id" style="$vbcollapse[collapseobj_wheather]">
<tr>
<td class="$getbgrow"><span class="smallfont">

<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather conditions here.<br /><br /><phrase 1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field15] !=''">
<a href="http://www.weatherroom.com/forecast/$bbuserinfo[field15].html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=$bbuserinfo[field15]&config=png&alt=hwivzone&daysonly=1" alt="Weather for $bbuserinfo[field15] provided by weatherroom.com." border="0"></a>
<else />
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show weather conditions.
</if>
</if>
</span>
</td>
</tr>
</tbody>
</table>
<br/>

nexus851
11-18-2005, 05:07 AM
There's only an option to turn on/off the collapse for ALL THE MODULES or none at all.. I dont want that.. i need just 1 of the modules to close ....

Nice try.. but that didnt work...

J.P

Marco van Herwaarden
11-18-2005, 05:58 AM
This is not a general vB question. Please post your questions in the thread about this hack, or on their own support site.