DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:wp_most_recent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Both sides next revision
plugin:wp_most_recent [2009-01-02 20:15]
70.103.232.219
plugin:wp_most_recent [2018-06-03 13:40] (current)
Aleksandr
Line 1: Line 1:
-====== WordPress Most Recent Entries ======+====== WordPress Most Recent Entries Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: Show recent (or all) entries from any WordPress blog using a template.+description: Show recent (or all) entries from any WordPress blog using a template
 author     : Peter DeWeese author     : Peter DeWeese
 email      : peterdeweese@earthlink.net email      : peterdeweese@earthlink.net
 type       : syntax type       : syntax
-lastupdate : 08-26-2005+lastupdate : 2005-26-08
 compatible :  compatible : 
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : WordPress+tags       : embed, changelog 
 + 
 +downloadurl:  
 +bugtracker :  
 +sourcerepo :  
 +donationurl:  
 + 
 +screenshot_img: 
 ---- ----
  
 See [[http://peter.deweeses.net/doku.php?id=programming:wp_most_recent]].  FIXME: transfer more information here. See [[http://peter.deweeses.net/doku.php?id=programming:wp_most_recent]].  FIXME: transfer more information here.
  
 +===== Description =====
 +
 +FIXME: Broken Download Link
 +
 +Wordpress Most Recent Entries allows you to show the most recent entries from wordpress blogs in any Dokuwiki page. The display and many properties are completely customizable, and polish can be added. For example, dates can be displayed as “1 day 7 hours ago”, and summeries are ended with “[...]”. This is my first PHP project, so please give me tips! For bugs and tips (not gripes), email mailto:peterdeweese@earthlink.net. Please include the exact versions of dokuwiki and wordpress that you are using with a full description of any issue. FIXME (add a compatibility chart)
 +
 +===== Download =====
 +
 +^ Version    ^  Status  ^  Link  ^
 +| 08-26-2005 |  alpha   | [[http://peter.deweeses.net/lib/exe/fetch.php?cache=cache&media=programming%3Awp_most_recent-20050826.tgz|programming:wp_most_recent-20050826.tgz]] FIXME |
 +| 08-18-2005 |  alpha   | [[http://peter.deweeses.net/lib/exe/fetch.php?cache=cache&media=programming%3Awp_most_recent-20050818.tgz|programming:wp_most_recent-20050818.tgz]] FIXME |
 +| 08-17-2005 |  alpha   | [[http://peter.deweeses.net/lib/exe/fetch.php?cache=cache&media=programming%3Awp_most_recent-20050817.tgz|programming:wp_most_recent-20050817.tgz]] FIXME |
 +| 08-16-2005 |  alpha   | wp_most_recent-20050816.tgz        |
 +
 +===== Features =====
 +
 +  * custom template for blog entry display
 +  * connection aliases
 +  * summary or full article view
 +  * category constraint
 +  * max settings for entries, categories, and summary length
 +
 +===== Installation =====
 +
 +  - Under your wiki installation, create the directory ''lib/plugins/wp_most_recent''.
 +  - Place ''syntax.php'' into this directory.
 +  - Configure using the instructions below.
 +
 +===== Configuration =====
 +
 +Configure wp_most_recent in your DokuWiki installation under ''conf/local.php''.
 +
 +==== Caching ====
 +
 +Since WordPress blogs are databased as dynamic, the semi-static nature of DokuWiki rendering can get in the way.
 +
 +  * Set the maximum cache length to a reasonable value. For many sites, a half hour to a one day period will be reasonable.
 +  * Time-ago strings are generated on the client side, so they should not be considered when configuring cache settings.
 +  * If real-time posts are required, the cache must be turned off. Performance test your site without caching. If the performance is an issue, question why you require a static style collaborative website to be so dynamic. If performance is not acceptable, consider hybrids such as Confluence or Blog:CMS.
 +
 +=== WordPress Database Aliases ===
 +
 +At least one alias is required, but you can also configure the plugin to work with multiple WordPress databases. By default, the default alias should be named “default”. For each alias of name <aliasname>, include the following properties:
 +
 +<code php>
 +/These settings should mirror the configuration for a wordpress configuration.
 +$conf['wp_most_recent']['db_alias']['<aliasname>']['host'        = "localhost";
 +$conf['wp_most_recent']['db_alias']['<aliasname>']['user'        = "db_user";
 +$conf['wp_most_recent']['db_alias']['<aliasname>']['pass'        = "db_password";
 +$conf['wp_most_recent']['db_alias']['<aliasname>']['sid'         = "wordpress";
 +$conf['wp_most_recent']['db_alias']['<aliasname>']['table_prefix'] = "wp_";
 +$conf['wp_most_recent']['db_alias']['<aliasname>']['baseurl'     = "http://<host>/blog";
 +</code>
 +
 +=== Override Default Attributes ===
 +
 +Although any attribute can be defined by editing the wiki tags, a default attribute can be overridden using the following line:
 +
 +<code php>
 +$conf['wp_most_recent']['defaults']['<attribute>' ] = '<value>';
 +</code>
 +
 +==== Wiki Syntax ====
 +
 +=== <wp_most_recent> tag ===
 +
 +<code>
 +<wp_most_recent [attribute1="value1" attribute2="value2" (...)]>[entry_template]</wp_most_recent>
 +</code>
 +
 +=== entry_template ===
 +
 +Entry templates can include tokens, html (FIXME, and wiki syntax):
 +
 +<code>
 +<p>@categories@ <b>@title@</b><br/>@time_ago@ - @author@<br/>@content@</p>
 +</code>
 +
 +=== Attributes ===
 +
 +^ Attribute          ^ Default       ^ Description   ^
 +| ''blog''            ''default''  | A configured WordPress database alias  |
 +| ''category''        none         | A category constraint or no value to display all categories  |
 +| ''cat_delimeter''  |  '', ''       | A string to join categories if more than one exists  |
 +| ''cat_max''        |  ''-1''       | The maximum number of categories to display for an entry or ''-1'' for no limit  |
 +| ''cat_template''    ''@name@''   | A template for each category found. This is then used to replace ''@categories@''. Must be HTML encoded! (''=&quot;'', etc.)  |
 +| ''content_max''    |  ''128''      | The number of chars to truncate a content summary at or ''-1'' for no limit. If needed, the content will be truncated at a word boundary and appended with ''%%...%%''  |
 +| ''link''            ''true''     | Add a link to the title? ''true'' or ''false''  |
 +| ''max''            |  ''10''       | The maximum number of entries to display or ''-1'' for no limit  |
 +
 +=== Template Tokens ===
 +
 +
 +Tokens are surrounded with ‘@’. Ex: @title@
 +
 +^ Entry Template   ^^
 +^ Token             ^ Description   ^
 +| ''@author@''      | Entry author’s nickname  |
 +| ''@categories@''  | Generated using the category template and delimeter  |
 +| ''@content@''     | Entry content, formatted with the ''content_max'' attribute  |
 +| ''@date@''        | Entry date  |
 +| ''@excerpt@''     | Entry exceprt  |
 +| ''@time_ago@''    | ''@date@'' formatted as “1 hour, 7 minutes ago”  |
 +| ''@title@''       | Entry title. May contain link using ''@url@''  |
 +| ''@url@''         | Link to entry  |
 +
 +=== Category Template ===
 +
 +^ Token           ^ Description  ^
 +| ''@name@''      | Category name |
 +| ''@nicename@''  | Category’s short name |
 +
 +==== Upcoming Features ====
  
 +  * category template aliases
 +  * :-( dokuwiki syntax
 +  * add user full name, first name, and last name as tokens
  
 ===== Discussion ===== ===== Discussion =====
plugin/wp_most_recent.1230923736.txt.gz · Last modified: 2009-10-04 13:13 (external edit)