• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..Today-

conf/H03-May-2018-2118

lang/H03-May-2018-227153

scripts/H03-May-2018-429345

syntax/H03-May-2018-356241

READMEH A D25-Aug-20163.3 KiB9562

action.phpH A D25-Aug-20161.3 KiB4828

admin.phpH A D25-Aug-20169 KiB276209

helper.phpH A D25-Aug-20165.1 KiB186154

plugin.info.txtH A D25-Aug-2016147 97

script.jsH A D25-Aug-20161.1 KiB3932

style.cssH A D25-Aug-201649 11

README

1Dokuwiki Plugin for creating external newsfeeds.
2
3This plugin will generate a news feed that can be read in a standard news reader (See below for how to generate
4the feed from the plugin markup.)
5
6-------------------
7Syntax Markup
8
9There are two types of markup.  At the top of a page that holds new items, you must place one of the following:
10
11~~NEWSFEED~~
12~~NEWSFEED:<n>~~
13
14First form: ~~NEWSFEED~~
15If you use the first form, then you bracket your news items with the following markup:
16<news: item_title>
17blah blah
18</news>
19
20<news: another_item>
21blah blah
22</news>
23
24The news reader will use your title for the item. You can omit the title:
25
26<news>
27blah blah
28</news>
29
30In this case the title will default to 'News Item'
31
32Second form: ~~NEWSFEED:<n>~~
33In this form, the news items are generated from material which is preceded by Dokuwiki header markup, and the headers
34become the titles of the news items.  The <n> designates the number of equal signs that mark up your headers.  The plugin will
35create news items from all headers greater than or equal to n.    For instance:
36		~~NEWSFEED:3~~
37will create items from all headers with with three or more equal signs:
38
39      === header 1 ===
40	  ==== header 2 ====
41
42This page is particularly useful if you have a page which is dedicated to news items.
43
44---------------------
45Generating the feed
46Each of the following methods generates an xml news feed in your top level dokuwiki directory.   The news feed file is
47named news_feed.xml.
48
49The main file for generating news feeds is newsfeed.php, which  is found in news/scripts.
50
511. place newsfeed.php in your top level dokiuwiki directory and use as your feed url:
52            http:/my_web_site.org/my_dokuwiki/newsfeed.php
53   This method adheres to the ttl (time-to-live) configuration setting (see Options below) and creates a new xml file
54   only after the ttl has expired.   Until the expiry time, it reads and outputs the previously created news_feed.xml.
55
56  However, you can  force a new feed to be created by method 2 or 3.
57
582. place newsfeed.php in lib/exe and generate the feed from the command line:
59            php newsfeed.php
60
613.  open the news admin panel and click on the generate button.
62
634. Create a Refresh button:
64     ~~NOCACHE~~
65     ~~NEWS_REFRESH~~
66
67If you use method  2 or 3 and do not implement method 1,  then your url must be:
68           http:/my_web_site.org/my_dokuwiki/news_feed.xml
69
70
71
72---------------
73Configuration Options:
741. ttl: Number of minutes before a new feed will be automatically generated
752. title: Feed Title
763. desc: Feed Description.
77
782 and 3 configure the header section, where the Title is what is feed is known as the the description is a form of subtitle describing the feed further.
79---------------------
80
81
82If you have a version of the news plugin which supports multiple feeds, then you must include a unique feed name in your  ~~NEWSFEED~~ syntax:
83
84		~~NEWSFEED:<n>;;<feed_name>~~.
85		~~NEWSFEED:<feed_name>~~
86
87The Refresh button will also require the feed name:
88     ~~NEWS_REFRESH:<feed_name>~~
89The header values for these feeds are configured in the file scripts/newsfeed.ini.
90
91You can still use the original syntax, without the feed name; its header title and description will be taken from the default entry in newsfeed.ini or, lacking that, from the options set in the Dokuwiki configuration manager.
92
93
94
95