Difference between revisions of "Issuepedia:Code/lib/links"

From Issuepedia
Jump to navigation Jump to search
(bug: wpage appears as link for all subsequent listings)
(new code for ShowTopic, but no time to test tonight)
Line 98: Line 98:
 
</func>
 
</func>
  
 +
TO BE TESTED:
 +
<func ShowTopic_new topic max>
 +
  <let name=topic self with="_"> </let>
 +
 +
  <let name=sql>(cl_to='</let>
 +
  <let name=sql>SELECT q1.* FROM qryW3_Titles_Catgs AS q1 LEFT JOIN qryW3_Titles_Catgs AS q2 ON q1.cl_from=q2.cl_from WHERE (q1.cl_to='Data/links') AND (q2.cl_to='</let>
 +
  <let name=sql append copy=topic />
 +
  <let name=sql append>') ORDER BY page_title DESC LIMIT </let>
 +
  <let name=sql append copy=max />
 +
 +
  <for sql=$sql>
 +
    <let name=pg_nspace_code>{{ns:</let>
 +
    <let name=pg_nspace_code append val=@row.page_namespace />
 +
    <let name=pg_nspace_code append>}}</let>
 +
    <let name=pg_nspace copy=pg_nspace_code parse />
 +
    <let name=pg_title val="@row.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 />
 +
    <let name=data[Title] null />
 +
    <load page=$pg_name />
 +
    <if flag=data[Title]>
 +
      <call GetBrief />
 +
    </if><else>
 +
      <let name=links.out>
 +
* [[</let>
 +
      <let name=links.out append copy=pg_title />
 +
      <let name=links.out append>]]</let>
 +
    </else>
 +
    <let name=exclude val=0 />
 +
    <let name=links.rtn append copy=links.out />
 +
    <let name=data />
 +
  </for>
 +
</func>
 
</hide>
 
</hide>

Revision as of 02:12, 19 September 2011