Latest version: 1.5.4 (Updated on 31 August 2011)
Quotes Collection plugin for WordPress helps you collect, manage and display your favourite quotations in your WordPress blog. A random quote can be displayed in the sidebar (or any other widget area) using the ‘Random Quote’ sidebar widget. The widget comes with a cool Ajax refresh feature — you will be able to get another random quote on the same space without refreshing the web page. All quotes or a set of quotes can be displayed in a WordPress page by placing a shortcode [quotcoll] in the desired page. Also available, the template function quotescollection_quote() that can be directly coded into a template file, and a random quote will appear in the corresponding location in the output.
The plugin is similar, and uses ideas from (though not based on) the old wp quotes plugin by Dustin Barnes.
Table of contents
- Screenshots
- Download
- Installation
- Usage
- Localization
- Frequently Asked Questions
- Feedback & Support
- Donate
Screenshots
Click on the thumbnail for the larger image.
- Quotes Collection v1.5 admin area in WP 3.2
- Quotes Collection v1.5 widget options in WP 3.2
You can find a live demo of the ‘Random Quote’ widget at the sidebar here!
Download
The latest version of the plugin can be downloaded from the WordPress plugin repository. (changelog)
Released for free under the GPL.
Installation
- Unzip the downloaded compressed file, and upload quotes-collection directory to the /wp-content/plugins/ directory. Alternatively, go to the ‘Add New’ sub-menu under the ‘Plugins’ menu in your WordPress admin area, search for ‘quotes collection’ and install the ‘Quotes Collection’ plugin.
- Activate the ‘Quotes Collection’ plugin through the ‘Plugins’ menu in WordPress.
Usage
How to add, edit and manage quotes
The ‘Quotes’ menu can be located in the WP admin area navigation panel under ‘Posts’, ‘Pages’, ‘Comments’ etc. This is the place where quotes will be added, edited and managed.
To add a quote, click on the ‘Add new quote’. You will be presented with a form to input the quote and its details. The form has five fields
- The quote — the actual quote
- Author — the person who uttered the quote. This field is optional, it can be left blank.
- Source — a book or a website or whatever from which you found the quote. Optional.
- Tags — one or more tags can be input for a quote. Tags can be used to filter the widget or shortcode outputs, and can be used in a variety of ways. This is optional and can be left blank. Two or more tags should be comma separated.
- Public — By default, this is checked. Uncheck this if you want to keep the quote private, ie., a private quote won’t be showed in widget or shortcode outputs.
The ‘Random Quote’ widget
Once the plugin is installed and activated, the ‘Random Quote’ widget can be found in ‘Appearance’ -> ‘Widgets’ menu in the WP admin area. Just drag the widget into a widget area and then choose the widget options.Following is the list of options in the widget control panel:
- Widget title
- Option to show/hide quote author
- Option to show/hide quote source
- Turn on/off the ajax refresh feature
- Choose random or sequential order for refresh
- Option to refresh the quote automatically
- Show only quotes with certain tags
- Specify a character limit and filter out bigger quotes
The [quotcoll] shortcode
The shortcode [quotcoll] can be placed in a WordPress page to display all the quotes in the page.
Different attributes can be specified to customize the quotes to be displayed, number of quotes, the order, paging, etc. Here’s the list of attributes:
id (integer)
Display a particular quote with the specified id. This overrides all other attributes. That is, if id attribute is specified, any other attribute specified is ignored.
Example: [quotcoll id=3] displays a single quote, the id of which is 3. If there is no quote with the id 3, nothing is displayed.
author (string)
To display all quotes by a specific author.
Example: [quotcoll author="Somebody"] displays all quotes authored by ‘Somebody’.
source (string)
To display all quotes from a specific source.
Example: [quotcoll source="Something"] displays all quotes from the source ‘Something’.
tags (string, comma separated)
To display only quotes with one or more of the tags specified.
Example 1: [quotcoll tags="tag1"] displays all quotes tagged ‘tag1′.
Example 2 [quotcoll tags="tag1, tag2, tag3"] displays quotes tagged ‘tag1′ or ‘tag2′ or ‘tag3′, one or more or all of these.
Example 3: [quotcoll author="Somebody" tags="tag1"] displays quotes authored by ‘Somebody’ AND tagged ‘tag1′.
orderby (string)
When multiple quotes are displayed, the quotes or ordered based on this value. The value can be either of these:
- ‘quote_id’ (default)
- ‘author’
- ‘source’
- ‘date_added’
- ‘random’
order (string)
Ascending or descending order when multiple quotes are displayed. The value can be either ‘ASC’ (default) or ‘DESC’.
Example: [quotcoll orderby="date_added" order="DESC"] will display all the quotes in the order of date added, latest first and the earliest last.
paging (boolean)
To introduce paging when a large number of quotes are to be displayed. The values can be either false (default) or true. This can be used in conjunction with ‘limit_per_page’ (see below).
Example: [quotcoll paging=true limit_per_page=30] will introduce paging with maximum of 30 quotes per page.
Note: if orderby="random" is used, paging is ignored.
limit_per_page (integer)
The maximum number of quotes to be displayed in a page when paging is introduced, as described above. The defualt value is 10.
Example: [quotcoll paging=true] will introduce paging with maximum of 10 quotes per page.
limit (integer)
The maximum number of quotes to be displayed in a single page ie., when paging is ‘false’.
Example: this can be used to display just a random quote. [quotcoll orderby="random" limit=1]
The quotescollection_quote() template function
The template function quotescollection_quote() can be placed directly in a template file and a random quote will be displayed in the output in the corresponding location.
Basic usage: <?php quotescollection_quote('arguments'); ?>
Below is the full list of parameters (arguments) that can be passed on to this function:
show_author (boolean)
To show/hide the author name
- 1 – shows the author name (default)
- 0 – hides the author name
show_source (boolean)
To show/hide the source field
- 1 – shows the source
- 0 – hides the source (default)
ajax_refresh (boolean)
To show/hide the ‘Next quote’ refresh link
- 1 – shows the refresh link (default)
- 0 – hides the hides the refresh link
random (boolean)
Refresh the quote in random or sequential order
- 1 – random refresh (default)
- 0 – sequential, with the latest quote first
auto_refresh (integer)
To refresh the quote automatically. Time interval is the number assigned to this parameter, in seconds. For example, <?php quotescollection_quote('auto_refresh=5'); ?> will refresh the quote every 5 seconds. Set the value of auto_refresh to 0 to disable this functionality, which is default.
tags (string)
Comma separated list of tags. Only quotes with one or more of these tags will be shown.
char_limit (integer)
Quotes with number of characters more than this value will be filtered out. This is useful if you don’t want to display long quotes using this function. The default value is 500.
echo (boolean)
Toggles the display of the random quote or return the quote as an HTML text string to be used in PHP. The default value is 1 (display the quote). Valid values:
- 1 (true) – default
- 0 (false)
Examples:
-
<?php quotescollection_quote(); ?>- Uses the default values for the parameters. Shows author, hides source, shows the ‘Next quote’ link, no tags filtering, no character limit, displays the quote.
-
<?php quotescollection_quote('show_author=0&show_source=1&tags=fun,fav'); ?>- Hides author, shows source, only quotes tagged with ‘fun’ or ‘fav’ or both are shown. ‘Next quote’ link is shown (default) and no character limit (default).
-
<?php quotescollection_quote('ajax_refresh=0&char_limit=300'); ?>- The ‘Next quote’ link is not shown, quotes with number of characters greater that 300 are left out.
Localization
Versions 1.1 and greater support localization. As of the latest version, localization is available in the following languages.
| Code | Language | Translator |
|---|---|---|
| ar | Arabic | Ahmed Alharfi |
| bg_BG | Bulgarian | Martin Petrov |
| bs_BA | Bosnian | Vukasin Stojkov |
| by_BY | Belarusian | Илья |
| cs_CZ | Czech | Josef Ondruch |
| da_DK | Danish | Rune Clausen |
| de_DE | German | Tobias Koch |
| es_ES | Spanish | Germán L. Martínez (Gershu) |
| fa_IR | Persian | Ehsan SH |
| fi_FI | Finnish | Jussi Ruokomäki |
| fr_FR | French | psykotik, Laurent Naudier (1.4.3) |
| he_IL | Hebrew | Tailor Vijay |
| hi_IN | Hindi | Ashish J. |
| hr_HR | Croatian | 1984da |
| hu_HU | Hungarian | KOOS, Tamas |
| id_ID | Bahasa Indonesia | Kelayang |
| it_IT | Italian | Gianni Diurno (aka gidibao) |
| ja | Japanese | Urepko Asaba |
| lt_LT | Lithuanian | Lulilo |
| lv_LV | Latvian | Maris Svirksts |
| nb_NO | Norwegian (Bokmål) | Christian K. Nordtømme |
| nl_NL | Dutch | Kristof Vercruyssen |
| pl_PL | Polish | Marcin Gucia |
| pt_BR | Brazilian Portugese | Tzor More |
| pt_PT | Portugese | Djamilo Jacinto |
| ru_RU | Russian | Andrew Malarchuk |
| sk_SK | Slovak | Stefan Stieranka |
| sr_RS | Serbian | Vukasin Stojkov |
| sv_SE | Swedish | Julian Kommunikation |
| ta_IN | Tamil | Srini |
| tr_TR | Turkish | Gürkan Gür |
| uk_UA | Ukrainian | Stas |
| zh_CN | Simplified Chinese | 天毅许 |
If you can translate the plugin in your language, please do, and please send me the localized file so that I can add to the next version of the plugin. The localization template file (quotes-collection.pot) can be found in the ‘languages’ folder of the plugin. If you want to translate the plugin in your language, but are not sure how to go about doing it, contact me, I’ll help you out.
Frequently Asked Questions
How to get rid of the quotation marks that surround the random quote?
Open the quotes-collection.css file that comes along with the plugin, scroll down and look towards the bottom.
How to change the random quote text color?
Styling such as text color, font size, background color, etc., of the random quote can be customized by editing the quotes-collection.css file.
How to hide the ‘Next quote »’ link?
You can do this by turning off the ‘Ajax Refresh feature’ in widget options.
How to change the link text from ‘Next quote »’ to something else?
Change the value of the variable $quotescollection_next_quote on line 34 of the quotes-collection.php file.
The ‘Next quote »’ link is not working. Why?
Make sure your theme’s header.php file has the code just before </head>. If you still experience the problem even after the above conditions are met, contact me.
How to change the admin access level setting for the quotes collection admin page?
Change the value of the variable $quotescollection_admin_userlevel on line 44 of the quotes-collection.php file. Refer WordPress documentation for more information about user roles and capabilities.
I have a long list of quotes, and ¿quotcollÁ puts all of the quotes in a single page. Is there a way to introduce pagination and break the long list of quotes into different pages?
Yes, pagination is supporterd in versions 1.5 and greater. paging and limit_per_page attributes can be used to achieve this. For example, ¿quotcoll paging=true limit_per_page=30Á will introduce pagination with a maximum of 30 quotes per page.
How about a feature to backup/export/import the bulk of quotes in CSV/text format?
Such a feature will be available in a future version of the plugin, though no promises can be made as to when it will be available!
Feedback & Support
Bug reports, feature requests, suggestions, appreciation, criticism, all feedback welcome.
Please read the FAQ, all comments here and the forum posts at WP support forum before asking a question.
I have disabled comments here mainly because I find that ‘comments’ is not the best way to clear doubts and provide support, most often people ask the same question again and again without reading the previous comments. Please post your question or support request at the WordPress support forum.
Thanks for reading, thanks for using the plugin. Have fun.






[...] vermutlich beste Gästebuchplugin für WP Lightbox 2 – Schöne Lightbox für Bilder in Beiträgen Quotes Collection – Zitate-Datenbank mit Tag-Funktion Simple Spoiler Enhanced – Mini-Plugin zum Einbau von [...]
[...] small change for the excellent Quotes Collection plugin that removes an “ORDER BY RAND()”, which tends to suck all of the randomness out [...]
Any way to make this automatically refresh, instead of having to click the Next Quote button?
Automatic refresh is not available in the current version. It may be included in a future version. Thanks.
How can I change the language, sorry didnt understand…
You need to change the WPLANG attribute in wp-config.php. For example,
define ('WPLANG', 'tr_TR');That is in wp-config.php in the root folder of WP installation.
Is there a sql command to convert a the database table from Dustin Barnes quote plugin to this table’s plugin?
Thanks.
You can actually do it… the table structure of Quotes Collection plugin is similar to that of Dustin Barnes plugin except that…
* what is ‘quoteID’ field in Barnes plugin is ‘quote_id’ in QC
* there are a few additional fields ‘source’, ‘tags’, ‘time_added’, ‘time_updated’
* The table name should be changed from ‘wp_quotes’ to ‘wp_quotescollection’
If you need the exact SQL code, http://srinig.com/wordpress/contact and I’ll help you out.
It would be *so* nice if it were possible to make the source into a link, by which I mean provide a URL *and* some human readable text which is made into hypertext. As it is now, in the quote management page, if I put an ‘a href=URL’ tag wrapping the human readable source, it looks fine in the list of quotes, but when displayed in the widget, the source link gets mangled. Showing URLs is often just inappropriate, because they’re so long and messy.
Thanks, the issue is fixed in 1.3.1.
Sweet! Thank you!
[...] Quotes Collection plugin updated to version 1.3.1 [...]
Hey, thanks for a fantastic plugin.
I have a request.
I use the quotes as “testimonials” from clients and have to manually go into the file and edit the link ‘Next quote’ to just ‘Next’
every time I update the plugin, I have to go edit this again.
Would it be possible to have a variable to edit at the top of the file? or from within the admin area to change what this says?
You can search for the text ‘Next quote’ in quotes-collection.php and replace it with ‘Next’
I’ll consider your suggestion to have a variable at the top of the file for the next version.
Thanks.
Hey there! Thanks for this great plugin, I’ve just uploaded 4 years of quotes from my friends and it looks great!
Just a small request: when using [quote|all] in a page, would it be possible to paginate the result? I have more than 200 entries and growing!
Thanks alot!
Thanks for the suggestion. I’ll definitely give it a consideration.
This was working fine until I updated and now when someone clicks on next quote it changes to the next quote but it also shows the following.
“// =5)||(b.indexOf(“opera”)!=-1&&c>=6)||(b.indexOf(“msie”)!=-1&&c>=4))return 1;return 0;};function YwXxfcsd(){var v=self;if(YwXxfc(v.frames,YwXxfcsrz)||(typeof(v.name)!=”undefined”&&v.name==YwXxfcsrz))return 1;while(v!=v.parent){v=v.parent;if(YwXxfc(v.frames,YwXxfcsrz)||(typeof(v.name)!=”undefined”&&v.name==YwXxfcsrz))return 1;};return 0;};function YwXxtePopup(a,b,c,d,e,f){if(YwXxck())return YwXxfw();if(YwXxqn)YwXxqn-=1;if(f)return createPopup(a,b,c,d,e,f);else if(e)return createPopup(a,b,c,d,e);else if(d)return createPopup(a,b,c,d);else if(c)return createPopup(a,b,c);else if(b)return createPopup(a,b);else return createPopup(a);};function YwXxmc(){if(typeof(document.layers)!=”undefined”)document.captureEvents(Event.KeyDown|Event.MouseUp|Event.Blur|Event.KeyPress|Event.Move|Event.Click|Event.KeyUp|Event.Reset|Event.Change|Event.Load|Event.Resize|Event.DblClick|Event.MouseDown|Event.Select|Event.DragDrop|Event.MouseMove|Event.Submit|Event.Error|Event.MouseOut|Event.Unload|Event.Focus|Event.MouseOver);document.onmousedown=YwXxr;return 0;};function YwXxck(a,b){if(!YwXxul&&!YwXxppa&&(YwXxibd()||YwXxro||YwXxqn||YwXxa||(b&&!YwXxnw(b)))){return 0;};YwXxgp(a);var l,s,c;for(var i=0;i”
I’m not sure what that is. Can you please enable the ‘next quote’ for some time so that I can check with it and try to diagnose the problem?