List Clubs


Item has a rating of 5 (Liked by Chris Graham)
#6185 (In Topic #1510)
Standard member
Terry is in the usergroup ‘Well-settled’
A direct approach to listing Clubs (and other things) is the following mini block ( miniblock )
This approach directly accesses the database. After this code is uploaded to your site, then you can add the mini block in the left or right or center panel. My code is usually not very good quality, but it works, so improvements are welcome.
	tr:nth-child(even) {
		background-color: #c2d1e5;

	tr:nth-child(odd) {
		background-color: white;


$rows = $GLOBALS['SITE_DB']->query_select('f_groups', // Use this table
	array('id','g_name','g_group_leader'), // Get these fields
	array('g_is_private_club' => 1)); // WHERE this

	if (count($rows) == 0) {
		echo "<p>No Clubs found.</p>";
	echo "<table><tr><th>Club name</th><th>Owner</th><th>Link</th></tr>";
	foreach ($rows as $row) {
		$club_owner = $GLOBALS['FORUM_DRIVER']->get_username($row["g_group_leader"]);
		$link = "somewebsite/index.php?page=groups&type=view&id=" . str_replace(" ", "-", trim($row["g_name"]));
		echo "<tr><td>" . $row["g_name"] . "</td><td>" . $club_owner . "</td><td><a href='" . $link . "'>" . "Join" . "</a></td></tr>";
	echo "</table>";
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top