vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Collapsing (https://vborg.vbsupport.ru/showthread.php?t=88634)

HRM Web Service 12-13-2005 04:44 PM

I would also like to know how to get the cookie file to remember my custom collapses etc.

I can get any thing to collapse just fine.. but when I refresh it goes back to its default state.

Can someone help please.

noppid 12-13-2005 05:11 PM

Quote:

Originally Posted by HRM Web Service
I would also like to know how to get the cookie file to remember my custom collapses etc.

I can get any thing to collapse just fine.. but when I refresh it goes back to its default state.

Can someone help please.

Post your table code.

HRM Web Service 12-13-2005 06:04 PM

That's the block below. I know that only part of it is relevant but I figured it's better all than not.

The functional portion can be seen here ("Icon Meanings" at the bottom of the screen):
http://eservices.halifax.ca/forum2/index.php

HTML Code:

<div align="center">
<table width="100%"  border="0" class="tborder" cellpadding="5" cellspacing="1" >
<!-- Added the following for collapsible menus -->
<tbody>
        <tr>
                <td class="tcat" align="left" colspan="3">
                        <a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('iconLegend')"><img id="collapseimg_iconLegend" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_iconLegend}.gif" alt="" border="0" /></a>
                        <a href="#top" onClick="return toggle_collapse('iconLegend')">Icon Meanings</a>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_iconLegend">
  <tr class="alt1">
      <td align="center" valign="middle"><table width="100%"  border="0" cellpadding="1" cellspacing="0">
        <tr class="alt1">
            <td bgcolor="#FFFFFF" align="center" valign="middle"><table width="100%"  border="0" cellpadding="4" cellspacing="1">
                  <tr class="alt1">
                    <td class="custom_alt2" align="center" valign="middle">

<img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[contains_new_posts]" border="0" /></td>
                        <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_new_posts]</td>

                        <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" /></td>
                        <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_no_new_posts]</td>

                        <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_new_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
                        <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_is_closed_for_posting]

                    </td>
                  </tr>
              </table></td>
        </tr>
      </table></td>
  </tr>
  </tbody>
  </table>
</div>

Thanks for the help :)

Incase you're wondering....

It works fine other than the fact that it doesn't recall whether or not it was collapsed. i.e. the cookies are not being set correctly.

Being able to customize collapsing menus is very important to the layout I wish to achieve.

G

noppid 12-13-2005 07:58 PM

Your table is out of balance. Two opens, three closes and the tbody tag not nested properly.

I did this quickly, but it may work. I did not check the collapse code, just the table code.

HTML Code:

<div align="center">
<table width="100%"  border="0" class="tborder" cellpadding="5" cellspacing="1" >
<!-- Added the following for collapsible menus -->
        <tbody>
        <tr>
                <td class="tcat" align="left" colspan="3">
                        <a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('iconLegend')"><img id="collapseimg_iconLegend" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_iconLegend}.gif" alt="" border="0" /></a>
                        <a href="#top" onClick="return toggle_collapse('iconLegend')">Icon Meanings</a>
                </td>
        </tr>
        </tbody>
        <tbody id="collapseobj_iconLegend">
        <tr class="alt1">
    <td align="center" valign="middle">
                <table width="100%"  border="0" cellpadding="1" cellspacing="0">
        <tr class="alt1">
            <td bgcolor="#FFFFFF" align="center" valign="middle"><table width="100%"  border="0" cellpadding="4" cellspacing="1">
        <tr class="alt1">
                <td class="custom_alt2" align="center" valign="middle">

                                        <img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[contains_new_posts]" border="0" />
                                </td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_new_posts]
                                </td>

                                <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" />
                                </td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_no_new_posts]
                                </td>

                                <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_new_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" />
                                </td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_is_closed_for_posting]
                </td>
        </tr>
      </table>
        </td>
    </tr>
        </tbody>
</table>
</div>


HRM Web Service 12-14-2005 10:41 AM

Hey,

Thanks for reviewing the code Noppid.

I have checked the code I posted using DW8 (Dreamweaver 8). I see no problem with the tags. They are all XHTML compliant and there are equal number of open and close tags for everything in the right locations.

The code you posted however has errors in as you described. Specifically the section below:

HTML Code:

                <table width="100%"  border="0" cellpadding="1" cellspacing="0">
        <tr class="alt1">
            <td bgcolor="#FFFFFF" align="center" valign="middle">
                       
                        <table width="100%"  border="0" cellpadding="4" cellspacing="1">
                        <tr class="alt1">
                <td class="custom_alt2" align="center" valign="middle"><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[contains_new_posts]" border="0" /></td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_new_posts]</td>
                                <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" /></td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_no_new_posts]</td>
                                <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_new_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_is_closed_for_posting]</td>
                        </tr>
                    </table>
        </td>
    </tr>
        </tbody>

Any other suggestions? The problem is not the code (well it could be the collapsing code - but it appreas fine). Just wondering why cookie or caching isn't taking place.

utw-Mephisto 12-14-2005 10:47 AM

There is an official tutorial on vb.com

http://www.vbulletin.com/forum/showthread.php?t=127499

Should apply to almost every version ..

noppid 12-14-2005 01:58 PM

Quote:

Originally Posted by HRM Web Service
Hey,

Thanks for reviewing the code Noppid.

I have checked the code I posted using DW8 (Dreamweaver 8). I see no problem with the tags. They are all XHTML compliant and there are equal number of open and close tags for everything in the right locations.

The code you posted however has errors in as you described. Specifically the section below:

HTML Code:

                <table width="100%"  border="0" cellpadding="1" cellspacing="0">
        <tr class="alt1">
            <td bgcolor="#FFFFFF" align="center" valign="middle">
                       
                        <table width="100%"  border="0" cellpadding="4" cellspacing="1">
                        <tr class="alt1">
                <td class="custom_alt2" align="center" valign="middle"><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[contains_new_posts]" border="0" /></td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_new_posts]</td>
                                <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" /></td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_contains_no_new_posts]</td>
                                <td class="custom_alt2" align="center"><img src="$stylevar[imgdir_statusicon]/forum_new_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
                                <td class="smallfont" bgcolor="#F6F8FA" align="left">&nbsp; $vbphrase[forum_is_closed_for_posting]</td>
                        </tr>
                    </table>
        </td>
    </tr>
        </tbody>

Any other suggestions? The problem is not the code (well it could be the collapsing code - but it appreas fine). Just wondering why cookie or caching isn't taking place.


Yep, I missed one. Sorry. :o

To get your cookies to work, change the second <tbody> to....

HTML Code:

<tbody id="collapseobj_iconLegend" style="$vbcollapse[collapseobj_iconLegend]">
You left out the style.

HRM Web Service 12-15-2005 11:02 AM

Wow. That easy eh!! lol

I guess sometimes you just miss something so simple you think nothing of it!

Thanks a lot Noppid!

And thanks utw-Mephisto for the link!


All times are GMT. The time now is 10:54 AM.

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.01407 seconds
  • Memory Usage 1,794KB
  • 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
  • (5)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete