Registration has been disabled and the moderation extension has been turned off.
Contact an admin on Discord or EDF if you want an account. Also fuck bots.

ED:Collapsing Objects

From Encyclopedia Dramatica
This is an old revision of this page, as edited by imported>OhSoSimple at 20:59, 19 April 2011. It may differ significantly from the current revision.
Jump to navigation Jump to search


ED is using a new Collapsing Objects code. You will see some familiar concepts, but the syntax and end results have been changed around a great deal. Just like before, you can either write the code yourself (much easier than version 1) or use a template.

Writing the Code

In the previous version of the code, there was a one-to-one ratio between links and collapsing content. This new release allows for greater flexibility in four different ratios.

You pass information to the script using the class tag of the container that will hold the link. Arguments are separated by semicolons and the ordering is mandatory. For instance:

<span class="co;ctext;etext;state;classname;linkcolor"></span>

co - This designates a collapsing object. It is mandatory and case sensitive.
ctext - This is the collapsing link text. It can contain any special characters or spaces except a semicolon.
etext - This is the expanding link text. It can contain any special characters or spaces except a semicolon.
state - This is the initial state. 0 is collapsed; 1 is expanded. God help you if you put a 2.
classname - The target class of this link. See the following sections for an explanation.
linkcolor - Optional parameter that lets you customize the link's color. Don't include the preceeding semicolon if you're not changing the color.

You mark the target object(s) by setting the class equal to classname. For example:

<div class="classname">Content!</div>

One-to-One

This is the standard one link to one content region relationship.

Example:

    What's up?

Code:

<span class="co;[Collapse];[Expand];0;test1"></span>

<span class="test1">What's up?</span>

One-to-Many

This is one link to multiple content regions.

Example:

    What's up?    What's up?

Code:

<span class="co;[Collapse];[Expand];0;test2"></span>

<span class="test2">What's up?</span>

<span class="test2">What's up?</span>

Many-to-One

This is multiple links to one content region.

Example:

    What's up?    

Code:


<span class="co;[Collapse];[Expand];0;test3"></span>

<span class="test3">What's up?</span>

<span class="co;[Collapse];[Expand];0;test3"></span>

Many-to-Many

This is multiple links to multiple content regions.

Example:

    What's up?    What's up?    

Code:

<span class="co;[Collapse];[Expand];0;test4"></span>

<span class="test4">What's up?</span>

<span class="test4">What's up?</span>

<span class="co;[Collapse];[Expand];0;test4"></span>

Changing Link Color

This collapsing link is red.

Example:

    My link is red.

Code:

<span class="co;[Collapse];[Expand];0;test5;red"></span>    <span class="test5">My link is red.</span>

Using Templates

The templates require you to specify a target class name. This allows you to extend the functionality of each template by adding more links or content regions to suit your need. A target class name must be unique to the page and contain no spaces.

{{co}}: Object

Generic collapsing object. More or less the same as writing out the one-to-one code by hand.

{{co|A|B|C|D|E|F}}

A: Unique name to the page, no spaces.
B: The text to be displayed on the collapse link.
C: The text to be displayed on the expand lnk.
D: The initial state. 0 = collapsed, anything else = expanded.
E: The content to collapse and expand.
F: Style information for the collapsing content.

For instance,

{{co|qwerty|[Collapse Me]|[Expand Me]|1|Here's some stuff.|color: red; background-color: black; padding: 5px;}}

gives you:


Here's some stuff.


{{cs}}: Section

Level 2 collapsing section header.

{{cs|A|B|C|D}}

A: Unique name to the page, no spaces.  Hint: The section name with no spaces works.
B: The section name.
C: The section content.  May contain nested collapsable sections.
D: The initial state. 0 = collapsed, anything else = expanded.

For instance,

{{cs|testSectionOne|Test Section One|Here's some sample content under a large header.|0}}

gives you:


[-+]Test Section One


Here's some sample content under a large header.
Here's some sample content under a large header.

{{cs2}}: Subsection

Level 3 collapsing section header.

{{cs2|A|B|C|D}}

A: Unique name to the page, no spaces.  Hint: The section name with no spaces works.
B: The section name.
C: The section content.  May contain nested collapsable sections.
D: The initial state. 0 = collapsed, anything else = expanded.

For instance,

{{cs2|testSectionTwo|Test Section Two|Here's some sample content under a small header.|0}}

gives you:



[-+]Test Section Two

Here's some sample content under a small header.
Here's some sample content under a small header.

{{cg}}: Gallery

{{cg|A|B|C|D|E}}

A: Gallery title to be displayed in the black box
B: Unique name to the page.  Hint: The gallery title with no spaces works fine.
C: Horizontal alignment of gallery on page.  "left", "right", or "center".
D: Teaser gallery images.  Must be enclosed in <gallery></gallery> tags and should be a multiple of four images.
E: Remaining gallery images.  Must be enclosed in <gallery></gallery> tags.

Example:

{{cg|Galleria de Furfaggotry|furryGallery|center|<gallery>
Image:Sickfuckfurryhumor1.jpg|Typical furry's daily comic strip
Image:Lolanimalsex.jpg|Furries like sex with animals, as drawn by Arania
Image:Yiffinhellfurfag.jpg|Pro-yiffer propaganda disguised as harmless kiddie comics. WAKE UP AMERICA 
Image:Judge Doom M 03.jpg|Scientists are currently thinking of ways to exterminate furfags.
</gallery>|<gallery>
Image:Furrybarf.jpg|Neutered furry without spaceballs?
Image:Times Travelled.jpg
Image:FurrySuck.jpg|Suck the furry's [[cock|rod]], [[bitch]]!
Image:Wheregodfurry.jpg|Where is your [[God]] now?
...
</gallery>}}

gives you:


Galleria de Furfaggotry About missing Pics
[Collapse GalleryExpand Gallery]



See Also