This is an old revision of the document!
Table of Contents
Improved quote (pun_quote)
- Status: stable
- Current version: 2.0
General idea
- Allow user to select the part of the message to quote and other quoting improvements.
Specification
pun_quote 2.1
Main
- On the viewtopic page there are two links: “Quick post” and “Reply”. When a user clicks on the “Quick post” link, a selected portion of text is copied to the “Quick post” form; when a user clicks on “Reply”, the selected text is copied to the reply form.
- When “Quick post” is enabled
- “Quick quote” link.
- If no text is selected, copy the
[quote=Post Author]whole message[/quote]
to theQuick reply
form. - If user has selected some text of a post, copy the
[quote=Post Author]selected text[/quote]
to theQuick reply
form.
- “Reply” link.
- If no text is selected, copy the
[quote=Post Author]whole message[/quote]
to the reply form. - If user has selected some text of a post, copy the
[quote=Post Author]selected text[/quote]
to the reply form.
- When “Quick post” is disabled
- “Quick quote” link.
- Don't show up
- “Reply” link.
- If no text is selected, copy the
[quote=Post Author]whole message[/quote]
to the reply form. - If user has selected some text of a post, copy the
[quote=Post Author]selected text[/quote]
to the reply form.
- If JavaScript is disabled:
- “Quick quote” and “Reply” links:
- Copy the
[quote=Post Author]whole message[/quote]
to the reply form.
Technical details
- Posts of the topic are stored at the viewtopic page in the JavaScript array.
- “Quick post” link.
- Initial post is cleared from all symbols, except letters and numbers.
- If a selected text is inside a cleared post, the extension only quotes this selected text, if not - the whole post.
- If JavaScript is disabled, standard quoting mechanism will redirect the user to the reply form.
- “Reply” link.
- Implements the standard quoting mechanism.
- Even though JavaScript is disabled, this link is displayed on the page.
Bugs
- When message starts with
[quote]test[/quote] other text
and no text selected, onQuick Quote
click the message pasted intoQuick reply
form is incorrect. — Anatoly 2008/11/18 06:46 — fixed - Quick quote is including the user's signature into the quote (forums post). Maybe actually similar to previous bug. — fixed
- If pun_quote is enabled, then those who have javascript disabled can not quote at all. (Forums post by 8k84) — fixed
- Reply to post is broken, when URL rewriting is enabled. (Forums topic by hcgtv) — fixed
- If the whole message is citing BB-codes are ignored. — Denis 2008/12/2 17:50 — fixed
Feature requests
Links
- Trac ticket: #178
- Browse code:
- Forums topic: [extension release] JS post quote (pun_quote)
- Inspired by the 1.2 mod used at punbb.ru.
- Visit PunBB extension repository to download this extension.