How to set-up the news system ?

Step 1

Download this newssystem-0.1.zip and extract it into your active template directory

Step 2

1. Create the news namespace and page, e.g. [[news:news|The news]] and place there following syntax

news.text
====== News ======
**[ [[news:news|all news]] | [[news:writenews|write news]] | [[news:newsdata?do=edit|edit news]] ]**
#template(newsitems.php|news:newsdata)#

2. Create the template page, e.g. [[news:template:newstemplate|News template]] and paste following syntax
    If you want to have it as a box you could insert it by using the box plugin (like on our start page).

newstemplate.txt
  * targetpage: news:newsdata
  * head: 40| |Headline
  * start: 10|date(now)|Publishing date (first appearance of the article in the list)
  * stop: 10|date(2 weeks)|Perishing date (on this day the article will disappear)
  * text: 50*5| |Your article
----

3. Create the write news page, e.g. [[news:writenews| Write new news]] and place there following syntax

writenews.txt
====== Write new news ======
#template(datainput.php|news:template:newstemplate)# 
 
to see the preview right below:
%template?previewlength=120(newslist.php|news:newsdata)%
 
you can put both into boxes to get one beside the other 
as the right example shows

4. Create a preview page, e.g. [[news:previews|Previews]] and or place the following syntax wherever you want to see a summary/preview list

preview.txt
====== Preview ======
%template?previewlength=120(newslist.php|news:newsdata)%

Finally

The command folder within plugin directory has to contain the template.php within the subfolder ext to render the data set from news template.!

news/how_to_set-up.txt · Last modified: 2014/04/30 09:36 (external edit)

This Wiki is hosted and ruled by Policies of Frister Consultancy Services.
By using this wiki you accept these rules. -> Impressum