Quoter allows users to quote a comment or a post in their comments, in a similar way to forums.
Comments can be quoted by clicking a link which pastes them (real-time with Javascript, or, if it is disabled, refreshing the page) in the comment form. Once the comment is submitted, the quoted part is preceded by customizabile infos (author, date, URI…).
It’s also possible to quote a post or any other part of text in a page, by selecting it and clicking a link.
You can try it out in the comments section in this page. The plugin is totally customizable via Admin Panel. It requires WordPress 2.0 or higher, it’s not guaranteed to work correctly under older versions.
wp-content/plugins/). If you have downloaded a localization file, decompress and copy it into the same folder;The three functions that you have to add are the following:
quoter_comment() Generates the link to be clicked to quote a comment. It must be inserted in the comments loop, for example in the commentmetadata section.
Example:
(already existing code is grayed and is from WordPress default theme; the code to add is in black)
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php if (function_exists('quoter_comment')) { quoter_comment(); } ?> <?php edit_comment_link('e','',''); ?></small>
quoter_comment_server() Generates quoted text inside the comment textarea for users that don’t have Javascript enabled. It’s dependant from quoter_comment(). It must be inserted inside the <textarea></textarea> tag in the comment form.
Example:
(already existing code is grayed and is from WordPress default theme; the code to add is in black)
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"><?php if (function_exists('quoter_comment_server')) { quoter_comment_server(); } ?></textarea></p>
quoter_page() Generates a link that allows users to quote any text in a page, not only a comment. It can be inserted in any part of the file (outside the loop), preferably in the comment form, near the textarea. It’s totally independent from the other two functions.
Example:
<?php if (function_exists('quoter_page')) { quoter_page(); } ?>
The plugin is localized in the following languages:
insertatcursor function[quote="comment-#"] is now [quote comment="#"], and [quote="post-#"] is now [quote post="#"]. This will allow more attributes to be added in the future%id%rel="nofollow" to quote linksNo support available at the moment. I haven't got the time to update the plugin, which is of course totally customizable (GPL).
Quoter permette agli utenti di citare (quotare) un commento o un post nei loro commenti, in modo simile ai forum.
La citazione di un commento avviene tramite un link che serve ad incollarla (via Javascript o, se quest’ultimo è disabilitato, lato server) nel modulo di inserimento commenti. Una volta inviato il commento, la parte quotata viene formattata secondo gli standard XHTML e preceduta da una riga di informazioni (autore, data, uri…) personalizzabili.
La citazione di un post, o di altro testo in una pagina, è invece possibile solo tramite Javascript e funziona selezionando il testo che si desidera quotare, e cliccando un link.
Il plugin può essere testato nella sezione dei commenti di questa pagina, ed è totalmente configurabile dal Pannello di Amministrazione. Richiede WordPress 2.0 o superiore, il funzionamento con versioni precedenti non è garantito.
wp-content/plugins/). Se si è scaricato un file di localizzazione, decomprimerlo e caricarlo nella stessa cartella;Le funzioni di cui è composto Quoter sono le seguenti tre:
quoter_comment() Genera il link da cliccare per quotare un commento. Da inserire nel loop nei commenti, ad esempio nella sezione commentmetadata
Esempio:
(il codice già esistente è in grigio, ed è preso dal tema di default di WordPress; il codice da aggiungere è in nero)
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php if (function_exists('quoter_comment')) { quoter_comment(); } ?> <?php edit_comment_link('e','',''); ?></small>
quoter_comment_server() Genera il testo quotato all’interno della textarea dei commenti quando il quote avviene lato server e non dinamicamente. È dipendente da quoter_comment() e, se omessa, impedirà agli utenti sprovvisti di Javascript di quotare un commento. Va inserita all’interno del tag <textarea></textarea> del form di commento.
Esempio:
(il codice già esistente è in grigio, ed è preso dal tema di default di WordPress; il codice da aggiungere è in nero)
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"><?php if (function_exists('quoter_comment_server')) { quoter_comment_server(); } ?></textarea></p>
quoter_page() Genera il link tramite cui quotare qualsiasi porzione di testo di una pagina, ad esempio una parte di un post. Può essere inserita in qualsiasi punto del file (al di fuori del loop), ma è preferibile posizionarla all’interno del form di commento, vicino alla textarea. È totalmente indipendente dalle altre due funzioni.
Esempio:
<?php if (function_exists('quoter_page')) { quoter_page(); } ?>
Il plugin è localizzato nelle seguenti lingue:
insertatcursor di Alex King[quote="comment-#"] diventa [quote comment="#"], e [quote="post-#"] diventa [quote post="#"]. Questo permetterà di aggiungere altri attributi al tag in futuro %id%rel="nofollow" ai link per quotareNessun supporto disponibile al momento: non ho tempo di aggiornare il plugin (che acconsentite di utilizzare a vostro rischio). Il plugin è ovviamente liberamente modificabile (GPL).