Learn about DokuWiki
Advanced Use
Corporate Use
Our Community
Follow us on Facebook, Twitter and other social networks.
Learn about DokuWiki
Advanced Use
Corporate Use
Our Community
Follow us on Facebook, Twitter and other social networks.
This is an old revision of the document!
Compatible with DokuWiki
No compatibility info given!
The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on dokuwiki.org. Recommended are public repository hosts like GitHub, GitLab or Bitbucket.
Extension name contains underscore, will not generate popularity points.
Tagged with wordpress
See http://peter.deweeses.net/doku.php?id=programming:wp_most_recent. : transfer more information here.
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. (add a compatibility chart)
Version | status | link |
---|---|---|
08-26-2005 | alpha | programming:wp_most_recent-20050826.tgz ![]() |
08-18-2005 | alpha | programming:wp_most_recent-20050818.tgz ![]() |
08-17-2005 | alpha | programming:wp_most_recent-20050817.tgz ![]() |
08-16-2005 | alpha | wp_most_recent-20050816.tgz |
Configure wp_most_recent in your dokwiki installation under conf/local.php.
Since WordPress blogs are databased as dynamic, the semi-static nature of Dokuwiki rendering can get in the way.
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:
/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";
Although any attribute can be defined by editing the wiki tags, a default attribute can be overridden using the following line:
$conf['wp_most_recent']['defaults']['<attribute>']='<value>';
<wp_most_recent [attribute1="value1" attribute2="value2" (...)]>[entry_template]</wp_most_recent>
Entry templates can include tokens, html (, and wiki syntax):
<p>@categories@ <b>@title@</b><br/>@time_ago@ - @author@<br/>@content@</p>
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! (”=", 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. |
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. |
Token | Description |
---|---|
@name@ | Category name |
@nicename@ | Category’s short name |
[…] I think that there are definite limits to generating an absolute time reference in HTML which are fixed and rapidly become out of date. A better idea would be to make the PHP generate some JavaScript code. The JavaScript code would include a reference to the base time/date the WordPress page was updated. The JavaScript code could then process that code on the fly to produce the finished page that the end user sees. This would ensure that the time/date stamp is always current. […] — ta' lajzar 2005-08-23 00:13And it would therefore not require as many cache updates. This is the way to go. - Peter DeWeeseImplemented. - Peter DeWeese
it's possible for dotclear 2 to do the same ?
this is offline, can someone upload the file to somewhere else?