vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Making Boxes Collapsible (https://vborg.vbsupport.ru/showthread.php?t=221565)

cellarius 07-16-2011 10:40 AM

Then you need to find a way to add one. Likely in the template used by whatever you want to collapse.

Bandit8007 07-30-2011 09:10 AM

hmm im totatlly confused now.....
did try to collapse the wgo in forumhome template
but failed big time...
dunno what i did wrong...

cellarius 07-30-2011 10:02 AM

I don't know either.

radiofranky 08-02-2011 08:20 PM

Hi,
I was wondering if someone could explain how the collapsible box works when clicked to the box background it expands? Something like in slickdeals.net, when someone clicks the background, it expands.

thanks

cellarius 08-02-2011 08:44 PM

vB's collapse method does not allow for this, so this is not for this tutorial, really. You should open your own thread in an appropriate forum. Anyway, you'd have to fire the javascript on the click event of the background, not a link, generally speaking. But a tutorial on how to do that is really too much for this topic.

radiofranky 08-03-2011 04:13 PM

thanks. I was wondering if there is a tutorial that shows how to store variables to DB during the post new thread session. And also how to retrieve those data from DB and render to a template.

cellarius 08-04-2011 08:10 AM

Quote:

Originally Posted by radiofranky (Post 2228793)
thanks. I was wondering if there is a tutorial that shows how to store variables to DB during the post new thread session. And also how to retrieve those data from DB and render to a template.

Sorry, bit that really has nothing to do with this tutorial at all. This is about collapsing boxes using the vB provided method, nothing else.

Chavi 12-30-2011 03:22 PM

Thanks for the guide. I thought I'll share something:
I had to find a way to collapse more than one element at the same time. Tried using the same ID for every element as you suggest but without luck - only the first one collapses. At the end I've added an empty collapse-triggering <A> tags for every additional element I need collapsed and chained their click events like this:

<a class="collapse" id="collapse_elem1" href="{vb:raw relpath}#top" onClick="document.getElementById('collapse_elem2') .click();"><img ...... /></a>
<a class="collapse" id="collapse_elem2" href="{vb:raw relpath}#top" onClick="document.getElementById('collapse_elem3') .click();"></a>
<a class="collapse" id="collapse_elem3" href="{vb:raw relpath}#top"></a>

Only the first <A> tag has the changing button image, the others are empty.
This way I was able to collapse the elements with IDs "elem1", "elem2" and "elem3" simultaneously.
Its not very elegant but does the trick ;)

BRotondi 12-30-2011 04:02 PM

Nice workaround :) thanks for sharing!

lilgezuz 01-11-2012 03:50 AM

I tried to use this in a bbcode but its not converting {vb:raw relpath} to the correct path. it just leave it as %7bvb:raw relpath %7d any ideas on how to make it work in a bbcode?


All times are GMT. The time now is 11:41 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.02590 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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