FANDOM


This sandbox contains the content removed from Template:Quotebox's page after completing the documentation.


1

2 2

3

4 true

5 display:none;

6 hidequotes=true


The majority of the current demonstration/testing for this template is happening on Template:Quotebox/quotes.  Experimentation with methods for constructing the /quotes pages and/or random quotation banks is taking place on Template:Quotebox/quotes/sandbox.  Here are all the subpages.  {{Quote multi}} was also developed for dialogue, and should probably be renamed to {{quote dialogue}}.  {{Quote list}}/{{quotelist}} needs to be developed for the list of quotations on, for example, a character or episode article.

Tagging Quotes on /quotes Subpages

https://regex101.com/r/J2EpRO/1

Successfully pulls in the top quotations, including the ones tagged with both ---top and ---test:
	/^(?=(---top)){{!}}(?=(---test)).*$/s

Successfully pulls in only quotations tagged with ---top and ---test, but only when written in that order:
	/^.*(?=(---top)).*$(?<=(---test)).*$/s

Successfully pulls in only quotations tagged with ---top and ---test, regardless of which order, but ---test2 would match ---test:
	/^(?=.*(---top))(?=.*(---test)).*$/s

Successfully pulls in only quotations flagged with ---top and ---test, regardless of which order, and only with flags that match the whole word:
	/^(?=.*(---top)(\n|$))(?=.*(---test)(\n|$)).*$/s
piped:	/^(?=.*(---top)(\n{{!}}$))(?=.*(---test)(\n{{!}}$)).*$/s

/^{{#if:{{{1|}}}|(?=.*(---{{{1|}}})(\n{{!}}$))}}{{#if:{{{2|}}}|(?=.*(---{{{2|}}})(\n{{!}}$))}}.*$/s
<!--  *******************************************           
      * Do not add quotations below this block. *           
      *******************************************           
-->|+++}}<<nowiki />includeonly>{{#if:{{{show|}}}
	|{{#arraydefine:Show|{{{show|}}}|,}}{{#vardefine:ParamNumShow|0}}<!--
	 -->{{#arraysearcharray:ArrayofQuotations|ArrayofQuotations
		|/^{{#while:
			|{{#expr:{{var:ParamNumShow}}<{{#arraysize:Show}}}}
			|(?=.*(---{{#arrayindex:Show|{{#var:ParamNumShow}}}})(\n{{!}}$)){{#vardefine:ParamNumShow|{{#expr:{{#var:ParamNumShow}}+1}}}}
		 }}.*$/s
	 }}{{#arrayindex:ArrayofQuotations|{{#expr:{{random number|{{#arraysize:ArrayofQuotations}}}}}}}}
	|{{#arrayindex:ArrayofQuotations|{{#expr:{{random number|{{#expr:{{#arraysize:ArrayofQuotations}}-1}}}}+1}}}}
}}<<nowiki />/includeonly><n<nowiki />oinclude>
{{Quotes subpage instructions}}<<nowiki />/noinclude>

Ideas

  • Have options for using the template in different ways.
    • {{quotebox}} for a random quotation from that page's list.
    • {{quotebox|page=Grog Strongjaw}} for a quote from Grog Strongjaw/quotes.
    • {{quotebox|quote=This is a quote.|source=This is a source.}} for a pre-defined quotation box with a user-supplied quotation/source pair.
    • hidequotes (any text will activate hiding of the quotation marks)
    • align (choose the alignment of the box)
    • width (defaults to 75% of the space available without overlapping other flex boxes; can be set absolutely (e.g., 250px) or relatively (e.g., 50% or 15em))
    • format-area (set margin, padding, or other CSS in the format format-area=margin:1em auto 5px 0;padding-left:5px; with no quotation marks and with a semicolon after each CSS property)
    • format-box (set general formatting for the whole box, like font-size, color, background-color, or other CSS in the format format-box=font-size:90%;color:lightblue;background-color:gray; with no quotation marks and with a semicolon after each CSS property)
    • format-quote (set formatting for the central column in the top half of the box, which contains the quotation itself, using CSS properties)
    • format-source (set formatting for the bottom half of the box using CSS properties)
  • Ideas not yet fully implemented.
    • edit (edit=Page on which to edit the quotation, or edit=hide to hide the button, or empty/undefined parameter to set edit=/quotes for that page's quotes subpage)

Basic Draft

This version is very outdated now, but it was the original "okay, I may just be able to do this thing!" savepoint.

Blah blah blah.
Blah blah blah.
Blah blah blah.
Blah blah blah.
Blah blah blah.
Blah blah blah.
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
Blah blah blah.
Blah blah blah.
– 
Quotation source. multiline multiline multiline multiline multiline multiline multiline multiline multiline
Community content is available under CC-BY-SA unless otherwise noted.