Foren / Cotonti / Support / Multiple lists

Hodges
#30777 20. September 2011, 10:22

I was afraid of that; it's been so long!

Well, here's a list.tpl:

<!-- BEGIN: MAIN -->

	<div class="mboxHD">
	{LIST_PAGETITLE}<div class="mboxHDright">{LIST_CATDESC} &nbsp; &nbsp; {LIST_SUBMITNEWPAGE}</div></div>
	<div class="mboxBody">
	
	<h1>{LIST_CATTITLE}</h1>
	
	<div style="text-align:justify;margin: 0px 0px 20px 0px">{PHP.cfg.freetext3}</div>
	<!-- BEGIN: LIST_SUBLIST -->
		<table class="cells">
			<tr>
				<td class="coltop">{LIST_TOP_TITLE} {LIST_TOP_COUNT}</td>
				<td class="coltop" style="width:96px;">{LIST_TOP_DATE}</td>
			</tr>
			<!-- BEGIN: LIST_ROW -->
			<tr class="{LIST_ROW_ODDEVEN}">
				<td>
					<strong><a href="{LIST_ROW_URL}">{LIST_ROW_TITLE}</a></strong> {LIST_ROW_FILEICON}<br />
					<span class="desc">{LIST_ROW_DESC} ({PHP.L.Hits}: {LIST_ROW_COUNT})</span>
				</td>
				<td class="centerall">{LIST_ROW_DATE}</td>
			</tr>
		<!-- END: LIST_ROW -->

		</table>
	<!-- END: LIST_SUBLIST -->
</div>

<!-- END: MAIN -->

New tags are LIST_SUBLIST.

As far as the plugin goes, it needs to:

  1. Read parent path(s) from plugin config (e.g. 1.1).
  2. For each path see if(exists) daughter categories (e.g. 1.1.1, 1.1.2, 1.1.3).
  3. Then assign each page of daughter categories to a new row in a new list (e.g. 4 pages from 1.1.1, 2 pages from 1.1.2 and 5 pages from 1.1.3).
  4. When localhost/list.php?c=apples is requested (and apples has path 1.1) then all lists (1.1.1, 1.1.2, and 1.1.3) are displayed on the same page.

I have no idea how to begin implementing this! frown