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

From Issuepedia
Jump to navigation Jump to search
(remove "excluded" flag; it's not working)
(some renaming; recent links now sort properly)
Line 1: Line 1:
 
<hide>
 
<hide>
  
<func ShowBrief>
+
<func GetBrief>
 
     <let name=links.out>
 
     <let name=links.out>
 
* '''</let>
 
* '''</let>
Line 33: Line 33:
 
     </else>
 
     </else>
  
     <let name=links.out append copy=text />
+
     <let name=links.out append copy=text trim />
 
     <let name=links.out append> ''[[</let>
 
     <let name=links.out append> ''[[</let>
 
     <let name=links.out append copy=pg_title />
 
     <let name=links.out append copy=pg_title />
 
     <let name=links.out append>|more...]]''</let>
 
     <let name=links.out append>|more...]]''</let>
  
<!-- if no new-style data, assume old-style and blank this line's output: -->
 
    <if not flag=data[Title]>
 
      <let name=links.out />
 
<!-- * [[</let>
 
      <let name=links.out append copy=pg_title />
 
      <let name=links.out append>]]</let> -->
 
    </if>
 
 
</func>
 
</func>
  
Line 50: Line 43:
 
   <let name=idx />
 
   <let name=idx />
 
   <let name=including val=1 />
 
   <let name=including val=1 />
   <for table="qryW3_Titles_Catgs" where="(cl_to='Data/links') AND (page_namespace=0)" name=pg limit=$max hide>
+
   <for table="qryW3_Titles_Catgs" where="(cl_to='Data/links') AND (page_namespace=0)" sort="page_title DESC" limit=$max name=pg hide>
 
     <let name=pg_title val="@row.pg.page_title" />
 
     <let name=pg_title val="@row.pg.page_title" />
 
     <let name=idx inc />
 
     <let name=idx inc />
 
     <load page=$pg_title />
 
     <load page=$pg_title />
     <call ShowBrief />
+
     <if flag=data[Title]>
 +
      <call GetBrief />
 +
    </if><else>
 +
<!-- if no new-style data, just display link to page so we can fix the problem: -->
 +
      <let name=links.out>
 +
* [[</let>
 +
      <let name=links.out append copy=pg_title />
 +
      <let name=links.out append>]]</let>
 +
    </else>
 
     <let name=links.rtn append copy=links.out />
 
     <let name=links.rtn append copy=links.out />
 +
    <let name=links.out />
 
     <let name=data />
 
     <let name=data />
 
   </for>
 
   </for>
Line 75: Line 77:
 
     <let name=idx inc />
 
     <let name=idx inc />
 
     <load page=$pg_title />
 
     <load page=$pg_title />
     <call ShowBrief />
+
     <call GetBrief />
 
     <let name=exclude val=0 />
 
     <let name=exclude val=0 />
 
     <let name=links.rtn append copy=links.out />
 
     <let name=links.rtn append copy=links.out />

Revision as of 19:55, 2 October 2008