WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Quotes Collection

Quotes Collection plugin with Ajax powered Random Quote sidebar widget helps you collect and display your favourite quotes in your WordPress blog.

The [quotcoll] shortcode

Quotes can be displayed in a page by placing the shortcode [quotcoll]. This will display all the public quotes ordered by the quote id.

Different attributes can be specified to customize the way the quotes are displayed. Here's the list of attributes:

  • id (integer)

    • For 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.
    • This overrides all other attributes. That is, if id attribute is specified, any other attribute specified is ignored.
  • author (string)

    • [quotcoll author="Somebody"] displays all quotes authored by 'Somebody'.
  • source (string)

    • [quotcoll source="Something"] displays all quotes from the source 'Something'.
  • tags (string, comma separated)

    • [quotcoll tags="tag1"] displays all quotes tagged 'tag1'.
    • [quotcoll tags="tag1, tag2, tag3"] displays quotes tagged 'tag1' or 'tag2' or 'tag3', one or more or all of these.
    • [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'
      • 'time_added'
      • 'random'
  • order (string)

    • The value can be either 'ASC' (default) or 'DESC', for ascending and descending order respectively.
    • For example, [quotcoll orderby="time_added" order="DESC"] will display all the quotes in the order of date added, latest first and the earliest last.
  • paging (boolean)

    • The values can be:
      • false (or 0) (default)
      • true (or 1) -- introduces paging. This is used in conjunction with limit_per_page (see below).
    • For 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. For 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'.
    • This can be used, for example, to display just a random quote. [quotcoll orderby="random" limit=1]

The quotescollection_quote() template function

The quotescollection_quote() template function can be used to display a random quote in places other than sidebar.

Usage: <?php quotescollection_quote('arguments'); ?>

The 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)

Example usage:

  • <?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 current version, localization is available in the following languages (code / language / author):

You can translate the plugin in your language if it's not done already. The localization template file (quotes-collection.pot) can be found in the 'languages' folder of the plugin. After translating send the localized files to the plugin author so that it's included in the next update. If you are not sure how to go about translating, contact the plugin author.

Requires: 2.8 or higher
Compatible up to: 3.5.2
Last Updated: 2012-12-16
Downloads: 235,079

Ratings

4 stars
4.5 out of 5 stars

Support

1 of 5 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,4,4
100,2,2 100,1,1
71,7,5
100,1,1 100,8,8
100,1,1 100,1,1 100,2,2 100,3,3 100,10,10 100,1,1
100,14,14 50,2,1 100,1,1
75,4,3
80,5,4
67,3,2
0,1,0 100,7,7
33,3,1
100,1,1
67,3,2
80,5,4
100,1,1 50,2,1 100,4,4 100,4,4
75,4,3
100,9,9 100,2,2 100,3,3
100,4,4
100,8,8
60,5,3 100,1,1
100,1,1
100,3,3
100,1,1
100,5,5
100,1,1
100,1,1
100,1,1
100,5,5
0,1,0
0,1,0