Re: Controlling the Number of Latest Discussions
I am not sure what you mean by that, as I have never created a plug-in before. Anways, I gave it a try as follows:
Created a blank file with the following content:
<?php
function front_page_topics() {
$bb->page_topics = 2;
}
add_action( ‘bb_index.php_pre_db’, ‘front_page_topics’ );
?>
Then saved it as “latest-posts.php” and stored it in my newly created “my-plugins” folder.
But it did not seem to have any effect as the front page of the forum would still display more that 2 latest posts (I selected to limit the topics to 2 so it would be asier to test).
The only other thing I can think of is that this code needs to instead be added to one of the regular scripts, but I have no idea which one.
thanks,
thomas