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

From HypertWiki
Jump to navigation Jump to search
(code for displaying blog entry summaries)
(code for displaying full blog entries)
Line 122: Line 122:
     <let name=e.out append copy=pg_name />
     <let name=e.out append copy=pg_name />
     <let name=e.out append>|more...]]''</let>
     <let name=e.out append>|more...]]''</let>
</func>
<func GetBlogEntryFull>
INPUT:
  data[*] - from blog entry page
  pg_name - full name of page being displayed (including namespace)
    <if not flag=noLoad>
      <load page=$pg_name nocat />
    </if>
    <let name=e.out>
==</let>
    <let name=e.out append copy=data[Title] />
    <let name=e.out append>==
''<small>posted at </let>
    <let name=e.out append copy=data[TimeStamp] />
    <let name=e.out append></small>''
</let>
    <let name=e.out append copy=data[TextAbove] />
    <let name=e.out append copy=BlogFoldDivider />
    <let name=e.out append copy=data[TextBelow] />
</func>
</func>


Line 138: Line 161:
     <let name=idx inc />
     <let name=idx inc />
     <call GetBlogEntryBrief />
     <call GetBlogEntryBrief />
    <let name=e.rtn append copy=e.out />
    <let name=data />
  </for>
</func>
<func ShowRecentBlogEntries_Full max>
  <let name=idx />
  <let name=including val=1 />
  <for table="qryW3_Titles_Catgs" where="(cl_to='Data/blog/post')" sort="page_title DESC" limit=$max name=pg hide>
    <let name=pg_nspace_code>{{ns:</let>
    <let name=pg_nspace_code append val=@row.pg.page_namespace />
    <let name=pg_nspace_code append>}}</let>
    <let name=pg_nspace copy=pg_nspace_code parse />
    <let name=pg_title val="@row.pg.page_title" />
    <let name=pg_name copy=pg_nspace />
    <let name=pg_name append>:</let>
    <let name=pg_name append copy=pg_title />
    <let name=idx inc />
    <call GetBlogEntryFull />
     <let name=e.rtn append copy=e.out />
     <let name=e.rtn append copy=e.out />
     <let name=data />
     <let name=data />

Revision as of 18:24, 14 February 2009