vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   how to make a module collapse? (https://vborg.vbsupport.ru/showthread.php?t=101052)

nexus851 11-18-2005 01:26 AM

how to make a module collapse?
 
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

Code:

<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&pan ds=$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.
Code:

<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.


All times are GMT. The time now is 08:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01645 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete