PDA

View Full Version : Module: Basic collapsing module


58sniper
08-16-2004, 11:39 PM
Okay, I don't think this version has been posted anywhere, so.....

This module is a "blank" collapsible module that doesn't require editing of ANYTHING other than the content inside of it. No need to modify the name, etc.


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat smallfont" style="font-weight: bold;"><a style="float: $stylevar[right]" href="#" onclick="return toggle_collapse('forumhome_$mods[filename]')"><img id="collapseimg_forumhome_$mods[filename]" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" width="15" height="15" border="0" alt="Collapse/Expand" /></a>$vba_options[portal_blockbullet] $mods[title]</td>
</tr>
</thead>
<tfoot style="display: none;"><tr><td></td></tr></tfoot>
<tbody id="collapseobj_forumhome_$mods[filename]">
<tr style="$vbcollapse[collapseobj_forumhome_randomtopic]">
<td class="$getbgrow">
<!-- put module content here -->
</td>
</tr>
</tbody>
</table>
<br />


When you create a new module using this code, the Module Title (in ACP> vBa Settings) will automatically be used as the title when viewing the module. Also, this validates 100% as XHTML 1.0, something many of the others don't do (and my primary reason for creating this version).

Keep in mind that this uses the collapsible image from the default image set. If you're going to use an image of a different size, you'll need to adjust the width and height accordingly.

You can see this in use at a site I'm working on at demo (http://dev.defensivetactics.com/).

I'd appreciate any comments.

Edit: updated code to get rid of annoying "double" bottom border. All I did was add the code in red. Tested and validates fine.

mholtum
08-16-2004, 11:41 PM
Nice job!

Our Sponsors
 

Natch
08-17-2004, 11:48 AM
Excellent work - this is really a much better solution than any I've seen - nice use of existing variables and just a great bit of work!

The simple things in life are often the best (tm) ;)

Note: u can't use class="tcat smallfont" - it just doesn't work that way ;) Nice thinking tho'

58sniper
08-17-2004, 03:43 PM
Note: u can't use class="tcat smallfont" - it just doesn't work that way ;) Nice thinking tho'
Since when? That works in both IE and Firefox.

Our Sponsors
 

Richard
08-17-2004, 10:24 PM
doesn't remember the collapse state, mine does....

58sniper
08-17-2004, 11:06 PM
But yours doesn't come close to validating.

WAR
08-20-2004, 11:31 PM
I don't suppose someone could come up with a way that validates AND remembers the collapsed state?

mholtum
08-20-2004, 11:48 PM
Sniper, thank you.. I use your code and like it..

58sniper
08-21-2004, 10:49 AM
I don't suppose someone could come up with a way that validates AND remembers the collapsed state?
I'm working on that, but it's presenting a few problems of its own.

WAR
08-22-2004, 02:48 AM
I didn't mean to sound unappreciative towards either of you or your contributions to the rest of us. I think it was just confusion or frustration as to why hack author's seem opposed to collaboration as often as they do... This is of course coming from an observer who has yet to contribute anything himself...

Either way, both of your work is appreciated.

mholtum
08-22-2004, 02:59 AM
Seems like a pissing contest to me.. I use snipers code. Works for me.

58sniper
08-22-2004, 10:24 AM
I didn't mean to sound unappreciative towards either of you or your contributions to the rest of us. I think it was just confusion or frustration as to why hack author's seem opposed to collaboration as often as they do... This is of course coming from an observer who has yet to contribute anything himself...

Either way, both of your work is appreciated.
It's not a problem, really. I'd love to have the collapse state remembered between visits. I am/was more concerned with optimizing/streamlining the existing code, and getting it to validate correctly.

Now I'm going to try to get the collapse state remembered, although when I try the other methods posted here, I run into some unexpected problems. I'm forging ahead - we'll get there.

58sniper
09-01-2004, 10:45 PM
Okay - a minor issue that popped up when using some skins. I updated the code in post #1. All you need to do is add the code in red. Minor fix.

theMusicMan
11-04-2004, 06:49 PM
Great module - thanks all!

Is there a way I can easily replace the 'Collapse/Expand' text with a small image instead please...?

J

Deviant++
02-15-2005, 05:28 AM
dosn't work for me

theMusicMan
02-15-2005, 05:47 AM
Why...? what error are you seeing?

Deviant++
02-15-2005, 06:27 AM
dont worry, got another module working. :)

Alderwazeh
02-17-2005, 12:46 PM
Copy the basic model to frontpage...add in the design window your favoraite links with glance ..and pic the codes ... from html >>make template ..adv_portal_links >> :cool: