Difference between revisions of "HypertWiki:Code/lib/data"

From HypertWiki
Jump to navigation Jump to search
(removed debug code)
(revised format of ShowBlogPostPage)
Line 324: Line 324:


<func ShowBlogPostPage>
<func ShowBlogPostPage>
  <let name=PostDate copy=data[TimeStamp] len=10 />
  <let name=wtDate>[[</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>]] ([[:category:</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>|category]])</let>
  <let name=wtDate append>[[category:</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>]]</let>
  <let name=wtTitle>__NOEDITSECTION__
==</let>
  <let name=wtTitle append copy=data[Title] />
  <let name=wtTitle append>==</let>
  <if flag=data[TextAbove]>
    <let name=wtTextBrief>
===In Brief===
</let>
    <let name=wtTextFull>
===Full Story===
</let>
    <let name=wtTextBrief append copy=data[TextAbove] />
  </if><else>
    <let name=wtTextBrief null />
  </else>
  <let name=wtTextFull append copy=data[TextBelow] />
  <call MakeBlogCatgs />
General categories for blog posts:
-- the fact that it's a post:
  <let name=wtCatGlob append>[[category:data/blog/post]]</let>
-- date:
  <let name=wtCatGlob append>[[category:</let>
  <let name=wtCatGlob append copy=PostDate len=10 /> -- just the date for the category
  <let name=wtCatGlob append>|]]</let>
  <let name=wtCatGlob append copy=PostDate /> -- full timestamp for sorting
  <let name=wtCatGlob append>]]</let>
  <let name=user copy=data[User] />
  <if flag=user>
    <let name=wtUser>[[user:</let>
    <let name=wtUser append copy=user />
    <let name=wtUser append>|</let>
    <let name=wtUser append copy=user />
    <let name=wtUser append>]]</let>
  </if><else>
    <let name=wtUser>''unknown''</let>
  </else>
  <echo>__NOEDITSECTION__
<get name=wtTitle />
<get name=data index=Text /><get name=wtTextBrief /><get name=wtTextFull />
<hr>
{| style="font-size: 75%; line-height: 75%;"
|-
| colspan=2 |
==Specs==
|-
| align=right | '''Timestamp''': || <get name=PostDate />
|-
| align=right | '''Author''': || <get name=wtUser />
|-
| align=right | '''User topics''': || <get name=wtCatUser />
|-
| align=right | '''Global topics''': || <get name=wtCatGlob />
|}</echo>
</func>
<func ShowBlogPostPage_v1>
   <let name=PostDate copy=data[TimeStamp] len=10 />
   <let name=PostDate copy=data[TimeStamp] len=10 />
   <let name=wtDate>[[</let>
   <let name=wtDate>[[</let>

Revision as of 23:01, 13 January 2011