r1 - 31 Aug 2006 - 15:09:44 - TWikiGuestYou are here: CWiki >  _BlogPlugin Web > TopicFunction > RenderBlogEntry

Function: RenderBlogEntry

Render a single BlogEntry

Parameters

Urlparams

  • cat: SubjectCategory which this BlogEntry is part of; navigation between BlogEntries? is restricted to this category (optional)

Implementation

Main

%STARTINCLUDE%
*~~
~~~ %STOPALIASAREA%
~~~ 
%~~ DBCALL{"RenderDocNavigation" 
~~~   NAME="%NAME%" 
~~~   WHERE="TopicType=~'\bBlogEntry\b' AND State='published'
~~~     AND SubjectCategory=~'\b%URLPARAM{"cat" default=".*"}%\b'"
~~~   REVERSE="on"
~~~   PARAMS="%IFDEFINED{"%URLPARAM{"cat"}%" then="cat=$test"}%"
~~~ }%
~~~ <a name="%WEB%_%NAME%"></a>
~~~
%~~ DBQUERY{%IFDEFINED{"%WIKINAME%" as="TWikiGuest" then="\"State='published'\""}%
~~~   topic="%NAME%" web="%WEB%"
~~~   format="%DBCALL{"%TOPIC%" section="format"
~~~     PARAMS="%IFDEFINED{"%URLPARAM{"cat"}%" then="cat=$test"}%"
~~~   }%"
~~~ }%
~~~
%~~ DBQUERY{"State='unpublished'" topic="%NAME%" 
~~~   format="$percntDBCALL{\"BlogHelpText\" 
~~~     section=\"Unpublished\"
~~~     NAME=\"posting\"}$percnt"
~~~ }%
~~~
%~~ DBCALL{"RenderDocNavigation" 
~~~   NAME="%NAME%" 
~~~   WHERE="TopicType=~'\bBlogEntry\b' AND State='published
~~~     AND SubjectCategory=~'\b%URLPARAM{"cat" default=".*"}%\b'"
~~~   REVERSE="on"
~~~   PARAMS="%IFDEFINED{"%URLPARAM{"cat"}%" then="cat=$test"}%"
~~~ }%
~~~ %STARTALIASAREA%
*~~
%STOPINCLUDE%

Format

%STARTSECTION{"format"}%
*~~ <div class=\"blogEntry\">
~~~   $n<noautolink>$n
~~~   <div class=\"blogHeadline\">
~~~   <h1>
~~~     <a href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic
*~~        %IFDEFINED{"%PARAMS%" then="?%PARAMS%"}%\" 
~~~        title=\"permalink to <nop>$topic\">
~~~       $formfield(Headline)
*~~     </a>$percntREDDOT{\"$web.$topic\"}$percnt
~~~   </h1></div>
~~~   $n</noautolink>$n
~~~   <div class=\"blogInfo\">
~~~     <span class=\"blogDate\">
~~~       $formatTime(createdate, '$day $mon $year - $hour:$minute')
~~~     </span>
~~~     $percntFORMATLIST{\"$formfield(SubjectCategory)\" sort=\"on\"
~~~       header=\"in <span class=\\"blogCategory\\">\"
~~~       format=\"<a href=\\"%SCRIPTURLPATH{"view"}%/$web/$1\\" rel=\\"tag\\">$1</a>\"
~~~       footer=\"</span>\"
~~~     }$percnt
~~~     $percntTAGCLOUD{\"$formfield(BlogTag)\" sort=\"on\"
~~~       split=\"[\s,]+\"
~~~       sort=\"weight\" 
~~~       warn=\"off\"
~~~       header=\"tagged <span class=\\"blogTag\\">\"
~~~       separator=\", \"
~~~       format=\"<a href=\\"%SCRIPTURLPATH{"view"}%/$web/BlogArchive?mode=tag;search=$term\\" 
~~~                   rel=\\"tag\\">$term</a>\"
~~~       footer=\"</span>\"
~~~     }$percnt
~~~     <span class=\"blogAuthor\">by [[$web.$formfield(BlogAuthor)][$formfield(BlogAuthor)]] </span> 
~~~     $n
~~~   </div>
~~~   %STARTALIASAREA%
~~~   <div class=\"blogText\">
~~~      $n<noautolink>$n
~~~      <div class=\"blogTeaser\">
~~~        $formfield(Teaser)
~~~      </div>$n
~~~      $formfield(Text)
~~~      $n</noautolink>$n
~~~   </div>
~~~   %STOPALIASAREA%
~~~   <br clear=\"all\" />
~~~ </div>
*~~ 
%ENDSECTION{"format"}%

Test

20 Aug 2005 - 09:38 tagged by MichaelDaum?
This is your first posting in this _BlogPlugin. Please delete or disable it after reading.
Before you start there might be some additional things to consider.

Configuration:

  • If you created this blog using the BlogFactory the preferences of this blog should have been set to some reasonable values. Revising them might be a good idea in case you want to adjust them afterwards.
  • Describe your blog in more detail by editing the BlogAbout page. Watch out for the red TODOs.
  • Create a BlogAuthor page for each writer on this blog.
  • Create a set of categories to divide your blog into compartments. Don't create too many at the beginning. You may get away by copious tagging postings.

Feedback:

  • If your blog is public then you might want to mail the BlogUp author to apply for being added to the BlogUp ring
  • Or just drop a line of feedback and incentives.
  • If you use the BlogUp software commercially then think about making a donation by filling up his PayPal account.
  • Be welcome to visit the JojoWiki to read about latest news on the development.

Thanks. And have a nice time using BlogUp.

Michael Daum.


Calls to 'RenderBlogEntry'

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
CWiki
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding CWiki? Send feedback.