Difference between revisions of "Issuepedia:Code/lib/links"
< Issuepedia:Code | lib
Jump to navigation
Jump to search
(clear data array after each iteration, to prevent stuff from surviving to the next one) |
(func ShowTopic) |
||
Line 47: | Line 47: | ||
</for> | </for> | ||
</func> | </func> | ||
+ | |||
+ | <func ShowTopic iTopic> | ||
+ | <let name=idx /> | ||
+ | <let name=including val=1 /> | ||
+ | <if not flag=iTopic> | ||
+ | <let name=iTopic parse>{{PAGENAME}}</let> | ||
+ | </if> | ||
+ | <let name=iTopic with="_"> </let> | ||
+ | |||
+ | <let name=sqlWhere>(page_namespace=0) AND (cl_to='</let> | ||
+ | <let name=sqlWhere append copy=iTopic /> | ||
+ | <let name=sqlWhere append>')</let> | ||
+ | <echo>SQL: <get name=sqlWhere /></echo> | ||
+ | <for table="qryW3_Titles_Catgs" where=$sqlWhere sort="page_title DESC" name=pg hide> | ||
+ | <let name=pg_title val="@row.pg.page_title" /> | ||
+ | <let name=idx inc /> | ||
+ | <load page=$pg_title /> | ||
+ | <let name=links.out> | ||
+ | * '''</let> | ||
+ | <let name=links.out append copy=data[Date] /> | ||
+ | <let name=links.out append>''' :[[</let> | ||
+ | <let name=links.out append copy=pg_title /> | ||
+ | <let name=links.out append>|more]]:[[Talk:</let> | ||
+ | <let name=links.out append copy=pg_title /> | ||
+ | <let name=links.out append>|talk]]: </let> | ||
+ | |||
+ | <if flag=data[wpage]> | ||
+ | <let name=wtLink>[[</let> | ||
+ | <let name=wtLink append copy=data[wpage] /> | ||
+ | <let name=wtLink append>|</let> | ||
+ | <let name=wtLink append copy=data[Title] /> | ||
+ | <let name=wtLink append>]]</let> | ||
+ | </if><else> | ||
+ | <let name=wtLink>[</let> | ||
+ | <let name=wtLink append copy=data[URL] /> | ||
+ | <let name=wtLink append> </let> | ||
+ | <let name=wtLink append copy=data[Title] /> | ||
+ | <let name=wtLink append>]</let> | ||
+ | </else> | ||
+ | |||
+ | <let name=links.out append copy=wtLink /> | ||
+ | <let name=links.out append> § </let> | ||
+ | |||
+ | <let name=text copy=data[TextShort] /> | ||
+ | <if flag=text></if><else> | ||
+ | <let name=text copy=data[Text] len=200 /> | ||
+ | </else> | ||
+ | |||
+ | <let name=links.out append copy=text /> | ||
+ | <let name=links.out append> ''[[</let> | ||
+ | <let name=links.out append copy=pg_title /> | ||
+ | <let name=links.out append>|more...]]''</let> | ||
+ | <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> | ||
+ | |||
+ | <let name=links.rtn append copy=links.out /> | ||
+ | <let name=data /> | ||
+ | </for> | ||
+ | </func> | ||
+ | |||
</hide> | </hide> |