LatestNews

From RevSpace
Revision as of 23:21, 1 October 2011 by 10.42.42.9 (talk) (Created page with " %IFDEFINEDTHEN{"%CALC{"$EXACT(%URLPARAM{"num" default="2"}%,all)"}%" as="1" glue="off"}% = All news = %ELSEDEFINED% = The latest news = (<a href="%SCRIPTURL{"view"}%/%WEB%/%TO...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


%IFDEFINEDTHEN{"%CALC{"$EXACT(%URLPARAM{"num" default="2"}%,all)"}%" as="1" glue="off"}%

All news

%ELSEDEFINED%

The latest news

(<a href="%SCRIPTURL{"view"}%/%WEB%/%TOPIC%?num=all">view all news</a>)

%FIDEFINED%

%STARTINCLUDE% %SEARCH{ "META:FORM.name = 'NewsItemForm'" limit="%URLPARAM{"num" default="2"}%" type="query" reverse="on" header="" nonoise="on" footer="" format="---+ $formfield(Title)$n()$percntREVINFO{\"$dollarday $dollarmonth $dollaryear\" rev=\"1\" topic=\"$topic\"}$nop% - $text"}% %STOPINCLUDE%

%IFDEFINEDTHEN{"%CALC{"$EXACT(%WIKINAME%,WikiGuest)"}%" as="0"}%

Add new news

<form method="post" action="%SCRIPTURL{"save"}%/%WEB%/NewsItem%GMTIME{"$yex$mox$day"}%xAUTOINC0">

 Title: <input type="text" size="80" name="Title"/>%BR%
 <textarea name="text" rows="20" cols="100"></textarea>%BR%
 <input type="hidden" name="action_save" value="1"/>
 <input type="hidden" name="formtemplate" value="NewsItemForm" />
 <input type="hidden" name="redirectto" value="%TOPIC%"/>
 <input type="submit"/>

</form> %FIDEFINED%