Forums

phpbb_recent_topics
Code to display topic Forum (3 posts)

  1. Phil Ewels
    Member
    Posted 1 year ago #

    In case anyone else might find this useful, I've just written a tiny addition to this plugin to display the name of the forum that each recent topic is part of.

    // GET FORUM WHICH POST IS IN - Phil Ewels, 26/09/2010
    $sql_query = "SELECT * FROM phpbb_forums WHERE forum_id=" . $topic->forum_id. " LIMIT 1";
    	# Run Query
    	if ($prt_phpbb_dbinsecureon == "1") {
    		$forum = $phpbbdb->get_row($sql_query);
    	} else {
    		$forum = $wpdb->get_row($sql_query);
    	}
    echo "<br /><small>" . $forum->forum_name . " </small>";

    This should be inserted into display.php, around line 175 - 185, depending on where you would like the text to be displayed.

    Please note that you may need to replace phpbb_forums with the name of the phpBB forums table in your database.

  2. linickx
    Member
    Posted 1 year ago #

    Nice one!

    If you want to create a trac ticket I'll look to add this as a tickbox feature :)

  3. Phil Ewels
    Member
    Posted 1 year ago #

    Cool, have done - look forward to seeing it appear in a future update ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic