| <<O>> Difference Topic NewsApplication (3 - 13 Feb 2009 - Main.AdminUser) |
NewsApplication UsageTo Add the news application to any topic, you can use the following TML:
urlparams
NewsApplicationGroupIf you define the NewsApplicationGroup? group, they will be the only users that can add new news Items.Application definitionLatest Aug 2010 Jul 2010 Jun 2010 May 2010 Apr 2010Latest Newsview item format
%STARTSECTION{"view_item"}%| \
%FORMFIELD{"Date" topic="%ITEM%"}% |\
%FORMFIELD{"Message" topic="%ITEM%"}% %FORMFIELD{"Link" topic="%ITEM%"}% | \
%INCLUDE{
"%WEB%.%TOPIC%"
section="%IF{"
'%ITEM%' allows 'CHANGE' AND
context authenticated AND
NOT ((istopic '%USERSWEB%.%TOPIC%Group') AND (NOT '%WIKINAME%' ingroup '%TOPIC%Group'))
" then="edit_button" else="nothing"}%"
warn="off"
}% |%ENDSECTION{"view_item"}%
edit_button
%STARTSECTION{"edit_button"}%[[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?item=%ITEM%;showfrom=%URLPARAM{"showfrom" default=""}%;showto=%URLPARAM{"showto" default=""}%][%ICON{uweb-bo}%]] [[%ITEM%][details]] %ENDSECTION{"edit_button"}%
edit item format
%STARTSECTION{"edit_item"}%| %STARTFORM{
name="%TOPIC%%BASETOPIC%%CATEGORY%"
action="save"
topic="%IF{"defined 'ITEM'" then="%ITEM%" else="%IF{"defined STOREIN" then="%STOREIN%" else="FoswikiApplicationData"}%.%TOPIC%AUTOINC0000"}%"
method="POST"
redirectto="%BASEWEB%.%BASETOPIC%"
sep=" "
showerrors="off"
}% %IF{"defined 'ITEM'" then="Edit" else="New"}% Item | %FORMELEMENT{
mandatory="on"
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span>%BR%"
default="%FORMFIELD{"Date" topic="%ITEM%" alttext="%DISPLAYTIME{"$day $month $year"}%"}%"
type="date"
dateformat="%e %b %Y"
name="Date"
title="Date Posted"
size="16"
}% %FORMELEMENT{
mandatory="on"
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span> %BR%"
default="%FORMFIELD{"Expiry" topic="%ITEM%" alttext="%DISPLAYTIME{"$day $month $year"}%"}%"
type="date"
dateformat="%e %b %Y"
name="Expiry"
title="Expiry date"
size="16"
}% %FORMELEMENT{
mandatory="on"
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span>%BR%"
default="%FORMFIELD{"Message" topic="%ITEM%" alttext=""}%"
type="text"
name="Message"
title="Message"
size="70"
}% %FORMELEMENT{
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span>%BR%"
default="%FORMFIELD{"Link" topic="%ITEM%" alttext=""}%"
type="text"
name="Link"
title="Link"
size="70"
}% \
%FORMELEMENT{type="hidden" name="Show" default="%FORMFIELD{"Show" topic="%ITEM%" alttext="show"}%"}% \
%FORMELEMENT{type="hidden" name="Category" default="%FORMFIELD{"Category" topic="%ITEM%" alttext="%CATEGORY%"}%"}% \
%FORMELEMENT{type="hidden" name="formtemplate" default="%WEB%.%TOPIC%"}% \
%FORMELEMENT{type="hidden" name="topicparent" default="%BASEWEB%.%BASETOPIC%"}% \
%FORMELEMENT{type="hidden" name="%IF{"defined 'ITEM'" then="item" else="nothingtoseehere"}%" default="%ITEM%"}% \
%FORMERROR{"%TOPIC%%BASETOPIC%%CATEGORY%"}% | %FORMELEMENT{
type="submit"
buttonlabel="Submit"
}% \
%IF{"defined 'ITEM'" then="<a class='foswikiButton foswikiCancelButton' href='%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%'>Cancel</a>" else=""}% \
%ENDFORM% |%ENDSECTION{"edit_item"}%
widget-newsSide bar widget for WidgetsSkin
| |||||||||||||||||||||||||||||||||||||||||||
| Changed: | |||||||||||||||||||||||||||||||||||||||||||
| < < | |||||||||||||||||||||||||||||||||||||||||||
| > > | |||||||||||||||||||||||||||||||||||||||||||
Latest NewsDataForm? definition
Defaults for this topic only
| |||||||||||||||||||||||||||||||||||||||||||
| <<O>> Difference Topic NewsApplication (2 - 13 Feb 2009 - Main.AdminUser) |
NewsApplication Usage | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | To Add the news application to any topic, you can use the following TML: | ||||||||||||||||||
| > > | To Add the news application to any topic, you can use the following TML: | ||||||||||||||||||
| |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | |||||||||||||||||||
| > > | News items can be filtered by category - to set this, change the INCLUDE to | ||||||||||||||||||
| Deleted: | |||||||||||||||||||
| < < | News items can be filtered by category - to set this, change the INCLUDE to | ||||||||||||||||||
| |||||||||||||||||||
| Deleted: | |||||||||||||||||||
| < < | |||||||||||||||||||
to display News Items from all categories:
urlparams
| |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | |||||||||||||||||||
| > > | |||||||||||||||||||
NewsApplicationGroup | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | If you define the NewsApplicationGroup? group, they will be the only users that can add new news Items. | ||||||||||||||||||
| > > | If you define the NewsApplicationGroup? group, they will be the only users that can add new news Items. | ||||||||||||||||||
Application definition | |||||||||||||||||||
| Deleted: | |||||||||||||||||||
| < < | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | Latest News | ||||||||||||||||||
| > > | Latest Aug 2010 Jul 2010 Jun 2010 May 2010 Apr 2010 | ||||||||||||||||||
| Deleted: | |||||||||||||||||||
| < < | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | |||||||||||||||||||
| > > | Latest News | ||||||||||||||||||
| Added: | |||||||||||||||||||
| > > | |||||||||||||||||||
| %SEARCH{ | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | web="FoswikiApplicationData" topic="NewsApplication*" "form.name~'System.NewsApplication' AND fields[name='Show'].value = 'show' AND fields[name='Category'].value ~ '*' AND ( ( '' = '' AND d2n(fields[name='Expiry'].value) >= d2n('05 Sep 2010') ) OR ('' = '' AND d2n(fields[name='Date'].value) >= d2n('') AND d2n(fields[name='Date'].value) < d2n('') ) )" type="query" nonoise="on" order="formfield(Date)" header="| Date Posted | Message | ** |" format="$percntINCLUDE{ $quotSystem.NewsApplication$quot nosection=$quotview_item$quot ITEM=$quot$web.$topic$quot section=$quot$percntIF{$quot'$web.$topic' = $item$quot then=$quotedit_item$quot else=$quotview_item$quot}$percnt$quot }$percnt" | ||||||||||||||||||
| > > | web="FoswikiApplicationData" topic="NewsApplication*" "form.name~'System.NewsApplication' AND fields[name='Show'].value = 'show' AND fields[name='Category'].value ~ '*' AND ( ( '' = '' AND d2n(fields[name='Expiry'].value) >= d2n('05 Sep 2010') ) OR ('' = '' AND d2n(fields[name='Date'].value) >= d2n('') AND d2n(fields[name='Date'].value) < d2n('') ) )" type="query" nonoise="on" order="formfield(Date)" header="| Date Posted | Message | ** |" format="$percntINCLUDE{ $quotSystem.NewsApplication$quot nosection=$quotview_item$quot ITEM=$quot$web.$topic$quot section=$quot$percntIF{$quot'$web.$topic' = $item$quot then=$quotedit_item$quot else=$quotview_item$quot}$percnt$quot }$percnt" | ||||||||||||||||||
| }% %INCLUDE{ | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | "System.NewsApplication" warn="off" section="nothing" }% | ||||||||||||||||||
| > > | "System.NewsApplication" warn="off" section="nothing" }% | ||||||||||||||||||
|
| |||||||||||||||||||
| Added: | |||||||||||||||||||
| > > | |||||||||||||||||||
view item format | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | |||||||||||||||||||
| > > | |||||||||||||||||||
|
| |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | edit_button
%STARTSECTION{"edit_button"}%[[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?item=%ITEM%;showfrom=%URLPARAM{"showfrom" default=""}%;showto=%URLPARAM{"showto" default=""}%][%ICON{uweb-bo}%]] %ENDSECTION{"edit_button"}%
| ||||||||||||||||||
| > > | edit_button
%STARTSECTION{"edit_button"}%[[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?item=%ITEM%;showfrom=%URLPARAM{"showfrom" default=""}%;showto=%URLPARAM{"showto" default=""}%][%ICON{uweb-bo}%]] [[%ITEM%][details]] %ENDSECTION{"edit_button"}%
| ||||||||||||||||||
edit item format | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | |||||||||||||||||||
| > > | |||||||||||||||||||
widget-news | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | Side bar widget for WidgetsSkin | ||||||||||||||||||
| > > | Side bar widget for WidgetsSkin | ||||||||||||||||||
%STARTSECTION{"widget-news"}%<div class="widget-archives widget latnews">
%IF{"
(NOT context authenticated) OR
(NOT '%IF{"defined STOREIN" then="%STOREIN%" else="FoswikiApplicationData"}%.NoTopicWithThisName' allows 'CHANGE') OR
((istopic '%USERSWEB%.%TOPIC%Group') AND (NOT '%WIKINAME%' ingroup '%TOPIC%Group'))
"
then=""
else="<div class='newsApplicationEditLink'>[[%IF{"defined EDIT" then="%EDIT%" else="%WEB%.%TOPIC%"}%][edit]]</div>" | |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | }% Latest News | ||||||||||||||||||
| > > | }% Latest News | ||||||||||||||||||
DataForm? definition
| |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < |
| ||||||||||||||||||
| > > |
| ||||||||||||||||||
| |||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < |
| ||||||||||||||||||
| > > |
| ||||||||||||||||||
Defaults for this topic only
| |||||||||||||||||||
| Added: | |||||||||||||||||||
| > > |
| ||||||||||||||||||
| <<O>> Difference Topic NewsApplication (1 - 13 Feb 2009 - Main.AdminUser) |
NewsApplication UsageTo Add the news application to any topic, you can use the following TML:
urlparams
NewsApplicationGroupIf you define the NewsApplicationGroup? group, they will be the only users that can add new news Items.Application definitionLatest Newsview item format
%STARTSECTION{"view_item"}%| \
%FORMFIELD{"Date" topic="%ITEM%"}% |\
%FORMFIELD{"Message" topic="%ITEM%"}% %FORMFIELD{"Link" topic="%ITEM%"}% | \
%INCLUDE{
"%WEB%.%TOPIC%"
section="%IF{"
'%ITEM%' allows 'CHANGE' AND
context authenticated AND
NOT ((istopic '%USERSWEB%.%TOPIC%Group') AND (NOT '%WIKINAME%' ingroup '%TOPIC%Group'))
" then="edit_button" else="nothing"}%"
warn="off"
}% |%ENDSECTION{"view_item"}%
edit_button
%STARTSECTION{"edit_button"}%[[%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%?item=%ITEM%;showfrom=%URLPARAM{"showfrom" default=""}%;showto=%URLPARAM{"showto" default=""}%][%ICON{uweb-bo}%]] %ENDSECTION{"edit_button"}%
edit item format
%STARTSECTION{"edit_item"}%| %STARTFORM{
name="%TOPIC%%BASETOPIC%%CATEGORY%"
action="save"
topic="%IF{"defined 'ITEM'" then="%ITEM%" else="%IF{"defined STOREIN" then="%STOREIN%" else="FoswikiApplicationData"}%.%TOPIC%AUTOINC0000"}%"
method="POST"
redirectto="%BASEWEB%.%BASETOPIC%"
sep=" "
showerrors="off"
}% %IF{"defined 'ITEM'" then="Edit" else="New"}% Item | %FORMELEMENT{
mandatory="on"
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span>%BR%"
default="%FORMFIELD{"Date" topic="%ITEM%" alttext="%DISPLAYTIME{"$day $month $year"}%"}%"
type="date"
dateformat="%e %b %Y"
name="Date"
title="Date Posted"
size="16"
}% %FORMELEMENT{
mandatory="on"
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span> %BR%"
default="%FORMFIELD{"Expiry" topic="%ITEM%" alttext="%DISPLAYTIME{"$day $month $year"}%"}%"
type="date"
dateformat="%e %b %Y"
name="Expiry"
title="Expiry date"
size="16"
}% %FORMELEMENT{
mandatory="on"
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span>%BR%"
default="%FORMFIELD{"Message" topic="%ITEM%" alttext=""}%"
type="text"
name="Message"
title="Message"
size="70"
}% %FORMELEMENT{
format="<span class='formTitle'> $t </span><span class='formValue'> $e $m $h </span>%BR%"
default="%FORMFIELD{"Link" topic="%ITEM%" alttext=""}%"
type="text"
name="Link"
title="Link"
size="70"
}% \
%FORMELEMENT{type="hidden" name="Show" default="%FORMFIELD{"Show" topic="%ITEM%" alttext="show"}%"}% \
%FORMELEMENT{type="hidden" name="Category" default="%FORMFIELD{"Category" topic="%ITEM%" alttext="%CATEGORY%"}%"}% \
%FORMELEMENT{type="hidden" name="formtemplate" default="%WEB%.%TOPIC%"}% \
%FORMELEMENT{type="hidden" name="topicparent" default="%BASEWEB%.%BASETOPIC%"}% \
%FORMELEMENT{type="hidden" name="%IF{"defined 'ITEM'" then="item" else="nothingtoseehere"}%" default="%ITEM%"}% \
%FORMERROR{"%TOPIC%%BASETOPIC%%CATEGORY%"}% | %FORMELEMENT{
type="submit"
buttonlabel="Submit"
}% \
%IF{"defined 'ITEM'" then="<a class='foswikiButton foswikiCancelButton' href='%SCRIPTURL{view}%/%BASEWEB%/%BASETOPIC%'>Cancel</a>" else=""}% \
%ENDFORM% |%ENDSECTION{"edit_item"}%
widget-newsSide bar widget for WidgetsSkin
%STARTSECTION{"widget-news"}%<div class="widget-archives widget latnews">
%IF{"
(NOT context authenticated) OR
(NOT '%IF{"defined STOREIN" then="%STOREIN%" else="FoswikiApplicationData"}%.NoTopicWithThisName' allows 'CHANGE') OR
((istopic '%USERSWEB%.%TOPIC%Group') AND (NOT '%WIKINAME%' ingroup '%TOPIC%Group'))
"
then=""
else="<div class='newsApplicationEditLink'>[[%IF{"defined EDIT" then="%EDIT%" else="%WEB%.%TOPIC%"}%][edit]]</div>"
}% <h2 class="widget-header">Latest News</h2>
<div class="widget-content">
%SEARCH{
web="%IF{"defined STOREIN" then="%STOREIN%" else="FoswikiApplicationData"}%"
topic="%TOPIC%*"
"form.name~'%WEB%.%TOPIC%' AND
fields[name='Show'].value = 'show' AND
fields[name='Category'].value ~ '%URLPARAM{"category" default="%CATEGORY%"}%' AND
( d2n(fields[name='Expiry'].value) >= d2n('%DATE%') ) "
type="query"
nonoise="on"
order="formfield(Date)"
limit="%IF{"defined LIMIT" then="%LIMIT%" else="2"}%"
format="<div class='widget-news-item'>$formfield(Message) ... <div class='readMore'>[[$web.$topic][read more]]</div></div>"
}%
</div>
</div>%ENDSECTION{"widget-news"}%
DataForm? definition
Defaults for this topic only
| |||||||||||||||||||||||||||||||||||||||||||