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

From HypertWiki
Jump to navigation Jump to search
(section per function; syntax updates (probably just replicating lost work done since July))
(revised format for specs footer)
 
Line 317: Line 317:
==ShowBlogPostPage()==
==ShowBlogPostPage()==
<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>
<span class=blog-post-section-hdr>In Brief</span>
</let>
    <let name=wtTextFull>
<hr>
<span class=blog-post-section-hdr>The Rest</span>
</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>
<div align=right style="font-size: 75%; line-height: 75%;">Posted by <get name=wtUser /> at <get name=PostDate />. <b>Topics</b>: <get name=wtCatUser /> <get name=wtCatGlob /></echo>
</func>
==ShowBlogPostPage_v2()==
<func ShowBlogPostPage_v2>
   <let name=PostDate copy=data[TimeStamp] len=10 />
   <let name=PostDate copy=data[TimeStamp] len=10 />
   <let name=wtDate>[[</let>
   <let name=wtDate>[[</let>

Latest revision as of 19:44, 22 January 2013

GetLinkBrief()


> function getlinkbrief() <= ()

ShowRecentLinks(max)


> function showrecentlinks() <= ()

ShowTopic(iTopic,iMax)

This should eventually be able to show data in any format: news links, blog entries...
> function showtopic() <= ()

GetBlogEntryBrief()


> function getblogentrybrief() <= ()

GetBlogEntryBriefChrisFormat()


> function getblogentrybriefchrisformat() <= ()

GetBlogEntryFull()


> function getblogentryfull() <= ()

ShowRecentBlogEntries(max,funcEntry)


> function showrecentblogentries() <= ()

ShowRecentBlogEntriesFull(max)


> function showrecentblogentriesfull() <= ()

ShowRecentBlogEntriesByTopic(max,topic)


> function showrecentblogentriesbytopic() <= ()

MakeBlogCatgs()


> function makeblogcatgs() <= ()

ShowBlogPostPage()


> function showblogpostpage() <= ()

ShowBlogPostPage_v2()


> function showblogpostpage_v2() <= ()

ShowBlogPostPage_v1()


> function showblogpostpage_v1() <= ()