I've edited the Recent News module myself, and the one thing I overlooked was ensuring the variables in the actual php file reflect the changed variables.
Here's how I went at it. I opened up RecentNews, and saved it under a different name. Important is that you change the modulename setting, as well as all the name of the module_settings in order to ensure the options/settings are stored under a different name than the original (in case you want to have different values per instance). In the case of RecentThreads, see the items marked red below:
Code:
<module_name>[COLOR=rgb(255, 0, 0)]RecentThreads[/COLOR]</module_name>
<module_cache>now</module_cache>
<module_settings>
<[COLOR=rgb(255, 0, 0)]recentthreads_limit[/COLOR] desc="Recent Thread Limit?" format="">3</recentthreads_limit>
</module_settings>
If you rename RecentThreads to RecentThreadsNewsForum, I'd change the name of the recentthreads_limit to something like recenthtreadsnewsforum_limit or something along those lines.
The next step is to head over to the EWRporta\Blocks file, and copy the RecentThreads.php there to RecentThreadsNewsForum.php. In here, look for the piece of code below:
Code:
$fetchOptions = array(
'join' => XenForo_Model_Thread::FETCH_FORUM | XenForo_Model_Thread::FETCH_USER,
'readUserId' => $visitorID,
'postCountUserId' => $visitorID,
'order' => 'last_post_date',
'orderDirection' => 'desc',
'limit' => $options['[COLOR=rgb(255, 0, 0)]recentthreads_limit[/COLOR]'],
);
The name in red should be changed to the value you picked above (recenthtreadsnewsforum_limit), and in order for it to limit the selection to a specific forum, I think you can just add in a line like
into the array above.
That should about do the trick (note: I did not test this, but I cannot imagine it's much more complicated than that).