List-Cat.php
From Organic Design wiki
<?
- Append article content with a list of article-names from category specified in properties
$db =& wfGetDB( DB_SLAVE ); $cl = $db->tableName( 'categorylinks' ); xwGetProperty( $properties, 'list-cat', $cat ); $result = $db->query( "SELECT cl_sortkey FROM $cl WHERE cl_to = '$cat'" ); while ( $row = mysql_fetch_assoc($result) ) $article .= "*[[".str_replace('_', ' ', $row['cl_sortkey'])."]]\n"; ?>