rss_suparchive

Plugin Details

Download:
rss_suparchive  v0.18
Textpattern Forum:
View discussion
Plugin Type:
Regular
Current Version:
0.18
Status on this site:
Active

The rss_suparchive Textpattern plugin contains 3 tags that can be used to generate a variety of article listings. The following are some of the applications of the plugin:

  • Article list sorted and grouped by date.
  • Article list based on URL pattern.
  • Article list sorted and grouped by category/section.
  • Archive menu grouped and totaled by month or year.

Revision History

// Version 0.1 – 11/02/2004 – Initial release
// Version 0.2 – 11/04/2004 – Added showsubdate, subdateformat, subdatesep based on Manfre’s day display mod.
// Version 0.3 – 11/06/2004 – Added category support, limit attribute, alternating article styles
// Version 0.4 – 11/07/2004 – Added title to article URL, use global category if set, converted query to use getRows() based on suggestions from philipashlock, compooter and proph3t
// Version 0.5 – 11/08/2004 – Added support for messy URLs on article, section and category links, added author, showauthor and authorsep attributes based on philipaslock’s author filter
// Version 0.6 – 11/12/2004 – Added support for forms using the form attribute.
// Version 0.7 – 12/09/2004 – Added rss_suparchive_bycat. Generates an article listing by category/section and related articles by category.
// Version 0.8 – 12/10/2004 – Added ability to limit rss_suparchive_bycat by section.
// Version 0.9 – 02/21/2005 – Added offset. Updates for RC3. Minor bug fixes.
// Version 0.10 – 02/24/2005 – Added rss_suparchive_menu. Added timeframe to suparchive and suparchive_bycat as suggested by txfrog1999.
// Version 0.11 – 03/03/2005 – Added showexcerpt to suparchive. Added filtering by global category to suparchive_bycat. Added linktosection to suparchive_bycat. Added sortby to suparchive.
// Version 0.12 – 03/22/2005 – Added showcatsonly to suparchive_bycat. Updated permlink calls to use new RC3 functions.
// Version 0.14 – 03/29/2005 – Added form to suparchive_bycat. Added filtering by day in addition to year and month to rss_suparchive. Fixed timeframe filter. Permlink/forms updates.
// Version 0.15 – 05/01/2005 – Added formwraptag, addbreak, showdate, dateformat, datesep, showexcerpt, showauthor, authorsep and date filtering to suparchive_bycat. Fixed jump to link on suparchive_bycat. Current article removed from related list using suparchive_bycat. Fixes for form usage on suparchive_bycat. Changed rssMenu id to a class.
// Version 0.16 – 01/03/2005 – Made archive filtering by date compatible with TXP 404 handling.

Notes

NOTE: The archive can be filtered by day, month or year by generating URLs in the format /yourarchivesection/yyyy/mm/dd or /yourarchivesection/yyyy/mm or /yourarchivesection/yyyy, which is done by using the rss_suparchive_menu tag or the rss_posted plugin.

Plugin Attributes

section
Accepts a comma separated list of sections. NO spaces after commas.
Default: “article”
Example: section=”sectionOne,sectionTwo”

category
Accepts a comma separated list of categories. NO spaces after commas. If currently browsing by category, the global category will be used as the default.
Default: ”$c (global category)”
Example: categories=”catOne,catTwo”

author
Accepts a comma separate list of author ids. NO spaces. Also looks for a query string parameter named “author” if no author is set in the tag. (i.e, /?author=rob)
Default: “”
Example: author=”rob,joe,jason”

timeframe
Accepts one of 3 options “PAST”, “FUTURE” or “ALL”. By default (PAST) will display articles with a posted date before the current date/time.
Selecting FUTURE will display articles with a posted date after the current date/time. Selecting ALL will display all articles regardless of posted date.
Default: “PAST”
Example: timeframe=”FUTURE”

form
Uses the form to format the results. When using a form, section, category, author and limit are the only other properties that can be used. Paging using the newer and older tags is supported.
Default: “”
Example: form=”lofi”

dateformat
Accepts PHP date format.
Default: “F j, Y”
Example: dateformat=”j/m/Y”

class
Assigns a CSS class to the <dl> tag.
Default: “”
Example: class=”classname”

showsection
Displays a link to the section the article appears in.
Default: “0”
Example: showsection=”1”

showcats
Displays a link to the categories the article appears in.
Default: “0”
Example: showcats=”1”

showauthor
Displays a link to the current section filtered by the author of the current article.
Default: “0”
Example: showauthor=”1”

showexcerpt
Displays the excerpt of the article.
Default: “0”
Example: showexcerpt=”1”

secstart
Places the given text before the section link.
Default: “in”
Example: secstart=”Posted In:”

catstart
Places the given text before the category links.
Default: “under”
Example: catstart=”Under:”

catsep
Places the given text in between the category links if there is more than one.
Default: “and”
Example: catsep=”::”

authorsep
Places the given text before the author link.
Default: “by”
Example: authorsep=”posted by”

addbreak
Adds an HTML line break after the article link.
Default: “0”
Example: addbreak=”1”

showsubdate
Displays a date preceeding the article title.
Default: “0”
Example: showsubdate=”1”

subdateformat
Accepts PHP date format.
Default: “d”
Example: subdateformat=”d, Y”

subdatesep
Places the given text in between the subdate and the article title.
Default: ”: ”
Example: subdatesep=” – ”

limit
Limits the number of articles listed. When in forms mode, limits the number of articles per page.
Default: “”
Example: limit=”5”

sortby
Determines how the result list is sorted. Sorted by DATE by default based on the timeframe selected. “RANDOM” is the only other option.
Default: “”
Example: sortyby=”RANDOM”

offset
Excludes x number of articles from the beginning of the article listing.
Default: “”
Example: offset=”1”

Additional Features

  • inclusion of title attributes on the link tags
  • the addition of a class named rssArticle to the article link
  • the addition of a class named rssAlt to every other article link to allow for use of a flip/flop effect
  • the addition of a class named rssAuthor to the author name
  • the addition of a class named rssSubdate to the subdate
  • the addition of a class named rssSection to the section link
  • the addition of a class named rssCat to the category links

Textpattern Solutions

Textpattern Solutions

Textpattern Solutions is the first book published on Textpattern.

details at friends of ED or the official book website.

buy it at amazon.com