Simple News system to create news articles and preview them
Compatible with DokuWiki
Similar to newssystem
The new version (2012-05-09) introduced tags. Formerly created news does not have such and might be not visible by given date-validity
due to tags used as filter. To make them visible edit the news article and add ” * tags: tag1, tag2, tag3” into the line after author entry.
Take care that since version 2012-03-29 you need a modification of formerly created news articles.
Open your newsdata page with DokuWiki Editor and replace all ---- by a level 1 headline. The headline text must be identical to the head content of your news article.
Changes
The plugin delivers you three major functions (write news, news flash, read all). You are supported by a simple form to write the article. There you can also specify when the news will be visible and until when. Beside writing news articles you can put a NEWS flash box wherever you want (usually on the start page of your wiki). It will provide a preview of the news you want to tell the world linked to the complete content. Another function is to read the complete set of articles you have written. The news data will be stored into one text file, which can be edited by DokuWiki implemented editor as any other page. The previews also as the complete article are allowed to contain DokuWiki syntax. This will be rendered properly.
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin.
Refer to DW Installation instructins to read more about.
====== News ======
~~NOCACHE~~
**[ [[news:allnewsdata|all news]] | [[news:news|write news]] | [[news:newsdata?do=edit|edit news]] ]**
{{anss>flash200,40%,right,10}}
{{anss>author}}
\\
\\
{{anss>allnews}}
====== Latest NEWS articles ======
~~NOCACHE~~
{{anss>allnews}}
Number one is a user interface to write News articles, link them and define a validity period.
On top of it a unique anchor will be calculated to link the previewed content properly with the whole article.
Define a Headline and the content of the news article you want to create. You may use standard DokuWiki Syntax within the article, it will be recognized and handled accordingly. The link is automatically created but for what reason ever you may want to change it. Take care that you properly set the anchor or the link will jump to the top of the referenced page. There is a small counter on top of the text input area to give you the quantity of entered characters.
Publishing date is by standard the date when you write the article. If you leave this unchanged the new will be visible after pushing the Publish button. The perishing date is the day where the article will disapear from the system (not deleted but not visible for the user anymore). The perishing date is calculated based on global settings in Configuration Manager but you can modify it here towards the special needs you may have on a special NEWS post.
Please take care that all your authors (but only these) have write permission to the newsdata page. Users without proper permission cannot store news to your system.
There are 3 output variants available. One is the News Flash box you can place wherever you want within your page syntax. Styling can be customized by the style.css file. The output is deifined by the syntax parameters for width, quantity of articles and count of characters to be previewed.
Another method is to display all current valid News Posts completely. The validity is defined by start and stop date. That delivers you the possibility to write news articles which will be displayed in the future, e.g. for Christmas, New Year, Easter or any other date you may chose.
If you have write permission on that page where News Flash or All News syntax was placed you will find two little icons below each news article. If you click on these icons you can either edit or delete the related news post. The symbol will change from blanck & white picture into a colored image if you hover the mouse over it. A click on the cross will immediately delete the related news record. There is no undo function so please use this function wisely. By a click on the blue feather the section edit of the related news record will be opened.
The third method is a page as usual within Dokuwiki containing all news as defined by the template divided into sections, where the Headline is used as section headlin. To edit there you may chose the standard DokuWiki Editor itself with section edit.
Probably you may want to change something the please have a look into the Configuration Manager for the plugin. There are a few simple and self-explaining parameters. Further you may adapt the text used for controls and/or add further language resource files. How to do so is decribed within the DokuWiki.org. To modify the look and feel please check the style.css file. There are many definitions offered for modification. Please refer to css documentation and communities in the event of related questions.
As most of the plugins this can be configured basically by use of DokuWiki Configuration Manager. The news System does provide following parameter:
| Parameter | Effect |
|---|---|
| d_format | Define the date format (e.g. Y-m-d) |
| news_datafile | Set the path to the namespace:newsdata file defines where the news records are stored |
| prev_length | Define the quantity of previewed characters per news post |
| newsflash_link | switch on to turn the News preview box headline into a link to News page |
Simply place the following syntax into the page markup of a page:
Place the following syntax on a page to get the News author interface. The interface will be visible for all (as long as the namespace/page is not ruled otherwise). The user cannot save news articles as long as the user has no write permission to the news:newsdata page. The controls depending on the newstemplate definition.
{{anss>author}}
Put the following syntax on a page where you want to show a preview of latest news to the visitors of your wiki. It will use the settings of config and css.
{{anss>flash}}
Some use cases may need a different preview length, box width, etc. but you want to keep the global settings ? You can modify something by using parameters. The parameters are expected on a dedicated position. The following table explaining syntax and behaivior:
| Parameter position | Example | Description |
|---|---|---|
| 1 | {{anss>flash 200}} | The content of the article will be previewed by 200 characters, independently of the global setting in configuration manager. |
| 2 | {{anss>flash,40%}} | The box width will be 40% of the page width. Pixel Width definitions (px) and other valid CSS width expressions are allowed. ( |
| 3 | {{anss>flash,300px,right}} | This defines the text flow around the box, means the box can be left or right sided. Take care that float does make sense only if you have a width different to 100% of the page width. |
| 4 | {{anss>flash,,,10}} | Usually the quantity of preview items is defined by the start and stop dates you providing during the NEWS edit based on the global settings or modified by yourself. However it might be necessary to further shrink the output. The 4th parameter defines how many news items to be displayed. |
| 5 | {{anss>flash,,,,tag}} | Multiple tags are not to be separated (must not be separated by comma). Tags are used as positive matching filters for the output. That means if one of the given tags does match the tags of an article the article will be shown (if date is valid). If no tags are given all date-valid news will be displayed. |
| {{anss>flash200,40%,right,10}} | Of course you can do a mixuture of all these settings as long as you keep the parameter position in mind |
Put the following syntax on a page where you want to show the complete articles of latest news to the visitors of your wiki. The articles are linked with related previews.
{{anss>allnews}}
| Parameter position | Example | Description |
|---|---|---|
| 1 | {{anss>allnews,tag}} | Multiple tags are not to be separated (must not be separated by comma). Tags are used as positive matching filters for the output. That means if one of the given tags does match the tags of an article the article will be shown (if date is valid). If no tags are given all date-valid news will be displayed. |
An Example can be found here: Live Example
Each valuable help is welcome.
| Date | Changes |
|---|---|
| 2011-05-09 | New Features: - tags to filter output introduced - red colored length info if global defined preview length will be exceed on Write News GUI |
| 2011-03-29 | - minor BugFix: suppress anchor ID on GUI according configuration |
| 2012-03-29 | (FR #83) - News saved as sections - News Edit and delete function for users with write permission on All News overview (FR #82) - make Headline “News Flash” and Link configurable (FR #81) - hide news ID on GUI (config) |
| 2011-03-25 | - author can be included (Feature Request #80) - correction for list handling (see also FAQ) |
| 2011-03-21 | - Modification: preview output changed from list to div for improved styling possibility - BugFix: closing form tag |
| 2011-12-07 | - BugFix: Links not retrieved correctly → wrong links in News flash |
| 2011-12-02 | - Initial release |
The plugin was tested with DW 2011-05-25 “Rincewind” and also with related on the Stick version.
Our standard browser is Internet Explorer 9 due to majority of users of our customers intranet installation are using this.
Of course, that is no guarantee that it works for all environmental configuration.
Probably interesting questions we could imagine:
If you are interested into these or have whishes for other improvements then please register to our wiki and create a request at related Issue Tracker .
You will be automatically informed via email about each request related progress by doing so.
You got this plugin up and running? You have got a demo page? Put a link here!
Feel free to add yours here:
A small FAQ is provided on: fcon - News FAQ
Please use only the DokuWiki Forum for discussion and the plugin related Issue Tracker page (or even git) to raise issues.
The plugin development is still ongoing. There might be something to be corrected, to be implement or to be improved.