phpbb-recent-topics
Opened 15 years ago
Closed 15 years ago
#1216 closed enhancement (wontfix)
display name of forum > phpbb_recent_topics
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Severity: | normal |
| Plugin: | phpbb-recent-topics | Keywords: | forum phpbb |
| Cc: | phil@… |
Description
Here is a small addition to this plugin to display the name of the forum that each recent topic is part of. If this is going to be incorporated into the options panel, it could also be useful to include a method of specifying the output format. I chose to have "topic name"<br />"forum name" > "date" but others may want a different output. This could probably be done with sprintf or regexing specified strings.
// 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>";
The above code 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.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi Phil,
Sorry for the delay in getting back to you on this; I am currently working on the next version of the plugin and have decided not to include this as core functionality as I think it will make the output too long/cluttered for most users.
Instead in Changeset 80766 (phpbb-recent-topics >= 0.6.1) I have implemented a callback function.
Readme.txt contains an example of how to implement your suggestion (as a function) inside your themes functions.php
I hope that helps!
Kind Regards,
Nick