Easily display your own quote or pull one from the following services:
- Le Figaro (fr).
- Le Monde (fr);
- Quotes on Design (en);
- They Said So (en);
oui_quote’s minimum requirements:
- Textpattern 4.6+
- Paste the content of the plugin file under the Admin > Plugins, upload it and install;
- Click Options or visit your Admin>Preferences tab to fill the plugin prefs.
- Service — Default: none – The service you want to use to pull the quote;
- Quote — Default: unset – The quote in use (automatically filled if a service is selected);
- Reference — Default: unset – The reference of the quote in use (automatically filled by Le Monde only);
- Author — Default: unset – The author of the quote (automatically filled if a service is selected);
- Url — Default: unset – The url of the quote source (automatically filled if a service is selected);
- Cache time — Default: 60 – Duration of the cache in minutes; avoid too many external queries.
<txp:oui_quote />or
<txp:oui_quote>
[…]
</txp:oui_quote>Displays the quote.
(Alphabetical order)
class="…"– Default: unset – The css class to apply to the HTML tag assigned towraptag.label="…"– Default: unset – The label used to entitled the generated content.labeltag="…"– Default: unset – The HTML tag used around the value assigned tolabel.service="…"– Default: 1 if a service is selected, or 0 – display the name/link of/to the service from which the quote was pulled (usually required, read terms and conditions of use of the service in use);wraptag="…"– Default: figure (see here) – The HTML tag to use around the generated content.
<txp:oui_quote_body />Displays the body of the quote.
(Alphabetical order)
class="…"— Default: unset – The css class to apply to theimgHTML tag or to the HTML tag assigned towraptag.wraptag="…"— Default: blockquote – The HTML tag to use around the generated content.
<txp:oui_quote_author />Displays the author.
(Alphabetical order)
class="…"— Default: unset – The css class to apply to the HTML tag assigned towraptag.wraptag="…"— Default: span – The HTML tag to use around the generated content.
<txp:oui_quote_cite />Displays the refernce of the quote and the service from which it was pulled.
If an the url preference is filled, it will wrap the service or the source into a link.
(Alphabetical order)
class="…"— Default: unset – The css class to apply to the HTML tag assigned towraptag.service="…"– _Default: 1 (inherited from the container tag) – display the name/link of the service from which the quote was pulled (usually required, read terms and conditions of use of the service in use);wraptag="…"— Default: cite – The HTML tag to use around the generated content.
<txp:oui_quote label="Citation du jour" labeltag="h1" />when used with Le Monde will return:
<h1>Citation du jour</h1>
<figure>
<p>Ce n'est pas parce-que vous êtes nombreux à avoir tort que vous avez raison.</p>
<figcaption>
<span>Bernard Werber</span>
<cite>Le Mystère des dieux (2007) via <a href="http://dicocitations.lemonde.fr/item-5133.html">Le Monde</a></cite>
</figcation>
</figure>The previous example with the use of a container tag would look like:
<txp:oui_quote label="Citation du jour" labeltag="h1">
<txp:oui_quote_body />
<figcaption>
<txp:oui_quote_author />
<txp:oui_quote_cite />
</figcaption>
</txp:oui_quote>Nicolas Morand
Thank you to the Textpattern community and the core team.
This plugin is distributed under GPLv2.