Renders a
BlogLink
... displayed as a form gathering all information about this link or an aggregation
if the linked site has a nice rss feed.
Parameters
- NAME: topic name of an BlogLink
- LIMIT: limit of articles to show
Implementation
Main
%STARTINCLUDE%
%~~ DBCALL{"RenderDocNavigation"
~~~ NAME="%NAME%"
~~~ WHERE="TopicType=~'\bBlogLink\b'
*~~ %IFDEFINED{"%URLPARAM{"cat"}%" then=" AND SubjectCategory=~'\b$test\b'"}%"
~~~ ORDER="Name"
~~~ %IFDEFINED{"%URLPARAM{"cat"}%" then="PARAMS=\"cat=$test\""}%
~~~ }%
<noautolink>
%~~ DBQUERY{topic="%NAME%"
~~~ format="
~~~ $percntIFDEFINEDTHEN{\"$formfield(Feed)\" glue=\"off\"}$percnt
~~~ <div class=\"blogSubjectCategory\">
~~~ $percntFORMATLIST{\"$formfield(SubjectCategory)\" sort=\"on\"
~~~ format=\"[[$web.$1][$1]]\"
~~~ }$percnt
~~~ </div>
~~~ <div> $formfield(Url) <p/>$formfield(Comment)</div>
~~~ $percntHEADLINES{
*~~ href=\"$formfield(Feed)\"
~~~ limit=\"%LIMIT%\"
~~~ refresh=\"$percntIFDEFINED{\"$formfield(Refresh)\" else=\"%RSSREFRESH%\"}$percnt\"
~~~ header=\"$percntDBCALL{\"%TOPIC%\" section=\"header\"}$percnt\"
~~~ format=\"$percntDBCALL{\"%TOPIC%\" section=\"article\"}$percnt\"
*~~ }$percnt
~~~ $percntELSEDEFINED$percnt
~~~ $n<!-- -->
~~~ $n<table class=\"twikiTable\">
~~~ <tr><th>Name:</th><td> $formfield(Name) </td></tr>
~~~ <tr><th>Headline:</th><td> $formfield(Headline) </td></tr>
~~~ <tr><th>Url:</th><td> $formfield(Url) </td></tr>
~~~ <tr><th>Category:</th><td>
~~~ $percntFORMATLIST{\"$formfield(SubjectCategory)\"
~~~ sort=\"on\"
~~~ format=\"[[$web.$1][$1]]\"
~~~ }$percnt</td></tr>
~~~ <tr><th>Comment:</th><td> $formfield(Comment) </td></tr>
~~~ </table>
~~~ $percntFIDEFINED%
*~~ "
~~~ }%
</noautolink>
%~~ DBCALL{"RenderDocNavigation"
~~~ NAME="%NAME%"
~~~ WHERE="TopicType=~'bBlogLink\b'
*~~ %IFDEFINED{"%URLPARAM{"cat"}%" then=" AND SubjectCategory=~'\b%URLPARAM{"cat"}%\b'"}%"
~~~ ORDER="Name"
~~~ %IFDEFINED{"%URLPARAM{"cat"}%" then="PARAMS=\"cat=%URLPARAM{"cat"}%\""}%
~~~ }%
%STOPINCLUDE%
Header format
%STARTSECTION{"header"}%
*~~ <div class=\"headlinesChannel\">
*~~ <div class=\"headlinesLogo\">
*~~ <img src=\"$imageurl\" alt=\"$imagetitle\" border=\"0\"/><br/>
*~~ <from>
*~~ <input type=\"button\" style=\"color:blue\" value=\"Refresh\"
~~~ onclick=\"window.location.href='%SCRIPTURL%/view/%WEB%/$topic?refresh=on';\" />
*~~ </form>
*~~ </div>
*~~ <h1 class=\"headlinesTitle\">
*~~ <a href=\"$link\" target=\"_blank\">$title</a>
*~~ </h1>
*~~ <div class=\"headlinesDate\">
*~~ $percntCALC{\"$FORMATGMTIME($TIME($channeldate),
~~~ $wday, $day $mon $year, $hour:$minute)\"
*~~ }$percnt
*~~ </div>
*~~ <div class=\"headlinesDescription\">
*~~ $description
*~~ </div>
*~~ <div class=\"headlinesRight\">
*~~ $rights
*~~ </div>
*~~ </div>
*~~
%ENDSECTION{"header"}%
Article format
%STARTSECTION{"article"}%
*~~ <div class=\"headlinesArticle\">
*~~ <div class=\"headlinesTitle\">
*~~ <a href=\"$link\" target=\"_blank\">$title</a>
*~~ </div>
*~~ $percntIFDEFINEDTHEN{\"$date\"}$percnt
*~~ <div class=\"headlinesDate\">
*~~ $percntCALC{\"$FORMATGMTIME($TIME($date),
~~~ $wday, $day $mon $year, $hour:$minute)\"
*~~ }$percnt
*~~ </div>
*~~ $percntFIDEFINED$percnt
*~~ <div class=\"headlinesCreator\">$creator</div>
*~~ $percntIFDEFINEDTHEN{\"$subject\"}$percnt
*~~ <div class=\"headlinesSubject\"> \"$subject\"</div>
*~~ $percntFIDEFINED$percnt
*~~ <div class=\"headlinesTeaser\">$description</div>
*~~ </div>
*~~
%ENDSECTION{"article"}%
Test
Calls to 'RenderBlogLink'