You are here: start » snippets » dokuwiki » blockquote

Blockquote Plugin

Description

The blockquote plugin provides an environment for (semantically correct by using the blockquote XHTML tag) quotes. In contrast to the default wiki markup for quoting, the content of the quote can contain any wiki markup which then gets interpreted as it would outside of the quote environment. Thus, also nested quotes are possible.

In case you come across any bugs in this plugin, don't hesitate to report them.

The Darcs repository of the plugin can be found here.

Updates

Last updated: 2008/05/04

  • 2008/05/04:
  • 2008/04/06:
    • Now produces valid XHTML again (blockquote output was placed inside paragraphs, those are now closed and reopened properly)
  • 2008/02/13:
    • :!: Security fix, please update ASAP :!:
    • Fixed XSS vulnerabilities in both cite and blockquote commands, big thanks to the Oracle Corporation's Ethical Hacking Team for discovering this and giving me a heads up
  • 2008/01/26:
    • :!: When updating, please first delete the old installation of the plugin, otherwise not all components might be registered properly.
    • Added a toolbar icon as proposed by Tobias Deutsch.
    • Added syntax for adding a citation source (extension of the blockquote command as well as addition of a new cite command).
  • 2007/10/27:
    • Initial release

Syntax

The plugin provides two additional pairs of markup tags, the blockquote and the cite markup. The blockquote allows an additional citation source to be given after the blockquote keyword in the opening tag. The cite markup was mainly created to allow the addition of more complex citation sources (including links, text formatting etc) inside the blockquote environment, although it can also be used standalone. See the examples below.

Examples

Loads of markup

The following code

<blockquote>
Test with loads of markup...

Another paragraph with a little [[http://nowhere|link]] to nowhere. Oh, and while we are at it, what about some **bold**, some //italic// and some __underlined__ text? And finally, an itemization:

  * item 1
    * item 1.1
    * item 1.2
  * item 2
    - ordered item 2.1
    - ordered item 2.2
      - ordered item 2.2.1
  * item 3

Works :-)
</blockquote>

results in

Test with loads of markup…

Another paragraph with a little link to nowhere. Oh, and while we are at it, what about some bold, some italic and some underlined text? And finally, an itemization:

  • item 1
    • item 1.1
    • item 1.2
  • item 2
    1. ordered item 2.1
    2. ordered item 2.2
      1. ordered item 2.2.1
  • item 3

Works :-)

The cite attribute

The following code

<blockquote J. Random Hacker>Test with a cite attribute...</blockquote>

results in

Test with a cite attribute…

The cite command

The following code

<blockquote>Test with a cite command...<cite>J. Random Hacker, [[http://localhost/~jrhacker]]</cite></blockquote>

results in

Test with a cite command…

J. Random Hacker, http://localhost/~jrhacker

Installation

When updating from 2007/10/27, please first delete the old installation of the plugin, otherwise not all components might be registered properly.

With plugin manager

Let the manager do the dirty work, just give him this link to eat: plugin-blockquote.tar.gz

Without plugin manager

  1. Download the plugin: plugin-blockquote.tar.gz
  2. Extract it into your dokuwiki plugin folder (eg lib/plugins)

Discussion

FredFred, 2007/11/23 22:13

Nice plugin

ioio, 2007/12/06 23:48

Thanks for your work!

You should include:

blockquote.blockquote-plugin p {

margin: 0 !important;

}

in the CSS file. It makes the blockquote look more convenient.

RederReder, 2008/03/24 07:00

Strange but this plugin will make the page not Valid XHTML 1.0 Transitional.

The validator said,

document type does not allow element "blockquote" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<blockquote class="blockquote-plugin">

I am a beginner to XHTML, so I paste the information here to look up for more help.;-)

fooselfoosel, 2008/04/06 23:15

The problem should be resolved with the current release :-)

RederReder, 2008/04/08 16:08

Wow, really nice. Thanks a lot for this nice plugin. I use it frequently. :-)

DavidDavid, 2008/04/09 07:11

After installing this using Plugin Manager, all the commands get me is the standard quote line not to desired box.

What should I check in order to make this work?

RaymondRaymond, 2008/05/06 21:56

nice plugin! is it also resizable? cause it doesn't seem to consider left or right aligned images

fooselfoosel, 2008/05/12 22:25

Could you give an example as a test case?

webwesenwebwesen, 2008/05/12 22:15

installed the plugin - the resulting html code looks fine:

<p> aaa </p> <cite class=“blockquote-plugin”>aaa</cite>

but it sems that style.css in the plugin folder is not picked up by my template(wiki engine?). any pointers? thanks!

fooselfoosel, 2008/05/12 22:26

Probably a caching issue. Try Shift-Reloading, appending purge=1 to your URL or – if all else fails – touching conf/local.php

Enter your comment (wiki syntax is allowed):
TGAFP
snippets/dokuwiki/blockquote.txt · Last modified: 2008/05/12 22:56 by foosel