TinyPortal BlockCode file. format: Boardmod List Articles in categories @rjen 0.2 26.oct.2018 echo '
Articles
' ; echo '
' ; echo '
' ; // Configuration // Specify your categories, comma separated if more than one category. $categories = array(1,2); // End Config global $scripturl, $smcFunc; $request = $smcFunc['db_query']('', ' SELECT shortname, id, subject, parse FROM {db_prefix}tp_articles WHERE category IN ({array_int:cats}) AND approved = {int:approved} ORDER BY parse ASC', array('cats' => $categories, 'approved' => 1, ) ); echo ' '; $smcFunc['db_free_result']($request);
Code block that wil dynamically list the approved articles in a category. Articles are presented with clickable links, sorted by position. This code snippets uses category numbers '1, 2 and 3'. Update the array setting as desired.