- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
ED:Collapsing Objects
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.
<a name="Writing_the_Code" id="Writing_the_Code"></a>
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>
<a name="One-to-One" id="One-to-One"></a>
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>
<a name="One-to-Many" id="One-to-Many"></a>
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>
<a name="Many-to-One" id="Many-to-One"></a>
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>
<a name="Many-to-Many" id="Many-to-Many"></a>
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>
<a name="Changing_Link_Color" id="Changing_Link_Color"></a>
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>
<a name="Using_Templates" id="Using_Templates"></a>
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.
<a name=".7FUNIQ386dec0573cc59c4-nowiki-00000007-QINU.7Fco.7FUNIQ386dec0573cc59c4-nowiki-00000008-QINU.7F:_Object" id=".7FUNIQ386dec0573cc59c4-nowiki-00000007-QINU.7Fco.7FUNIQ386dec0573cc59c4-nowiki-00000008-QINU.7F:_Object"></a>
<a href="/Template:Co" title="Template:Co">[{{{3}}}]
</a>: 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:
<a name=".7FUNIQ386dec0573cc59c4-nowiki-0000000B-QINU.7Fcs.7FUNIQ386dec0573cc59c4-nowiki-0000000C-QINU.7F:_Section" id=".7FUNIQ386dec0573cc59c4-nowiki-0000000B-QINU.7Fcs.7FUNIQ386dec0573cc59c4-nowiki-0000000C-QINU.7F:_Section"></a>
<a href="/Template:Cs" title="Template:Cs">[+]{{{2}}}
{{{3}}}</a>: 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:
<a name="Test_Section_One" id="Test_Section_One"></a>
Test Section One
<a name=".7FUNIQ386dec0573cc59c4-nowiki-0000000F-QINU.7Fcs2.7FUNIQ386dec0573cc59c4-nowiki-00000010-QINU.7F:_Subsection" id=".7FUNIQ386dec0573cc59c4-nowiki-0000000F-QINU.7Fcs2.7FUNIQ386dec0573cc59c4-nowiki-00000010-QINU.7F:_Subsection"></a>
<a href="/Template:Cs2" title="Template:Cs2">
[+]{{{2}}}
{{{3}}}</a>: 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:
<a name="Test_Section_Two" id="Test_Section_Two"></a>
Test Section Two
<a name=".7FUNIQ386dec0573cc59c4-nowiki-00000013-QINU.7Fcg.7FUNIQ386dec0573cc59c4-nowiki-00000014-QINU.7F:_Gallery" id=".7FUNIQ386dec0573cc59c4-nowiki-00000013-QINU.7Fcg.7FUNIQ386dec0573cc59c4-nowiki-00000014-QINU.7F:_Gallery"></a>
<a href="/Template:Cg" title="Template:Cg">
</a>: 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 | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
<a name="See_Also" id="See_Also"></a>
See Also
- <a href="/Encyclopedia_Dramatica:Morphing_Objects" title="Encyclopedia Dramatica:Morphing Objects">Morphing Objects</a>