soo_modified
This is a plugin for Textpattern.
soo_modified
Overview
Inspired by ob1_modified, soo_modified includes tags for dealing with article modification information. These supplement the basic function offered by the core modified tag.
soo_modified_author
Output the name of the author who most recently modified the current article.
<txp:soo_modified_author />
Attributes
fullname
(boolean) Whether to output the author’s full name or id. Default 1, output the author’s full name.
soo_if_modified
Conditional tag that compares the current article’s modification date to its posted date.
<txp:soo_if_modified> ... <txp:else /> ... </txp:soo_if_modified>
Attributes
format
(strftime() format string) Date format to use for comparing the dates. Defaults to site preference for date format in the current context.
By using a date format that doesn’t include the time of day, this tag will evaluate to true only if the last-modification stamp is on a different day than the posted stamp.
soo_if_modified_author
Conditional tag that compares the author who most recently modified the current article to the article’s author, or to the specified author.
<txp:soo_if_modified_author> ... <txp:else /> ... </txp:soo_if_modified_author>
Attributes
If neither attribute is used, the tag will compare the author who last modified the article to the author who posted it.
id
(Txp author id) Txp ID of author to compare. Default empty.name
(Txp author id) Full name of author to compare. (This must exactly match a full name from the txp_users table.) Default empty.
Notes
Two of the tags, soo_modified_author
and soo_if_modified_author
, can generate one or more database queries. This is unlikely to have a noticeable effect on performance, except possibly for very large article lists. (The plugin uses static variables to minimize the number of calls, but each distinct article on the page still generates at least one call.)
Version History
0.1.2 (2017/2/15)
- Textpattern 4.6 compatibility update
0.1.1 (2011/1/1)
- Performance improvements (fewer database queries) for certain situations:
- When both
soo_if_modified_author
andsoo_modified_author
are called - When using
soo_if_modified_author
orsoo_modified_author
in an article list
- When both
0.1.0 (2010/12/31)
- Initial release
soo_modified_author
soo_if_modified
soo_if_modified_author