PDA

View Full Version : Building a plugin that would show the last 5 posts in a subforum


AndrewRandom
03-31-2011, 06:20 PM
Hi folks, I'm trying to modify or replace the 'forumhome_lastpostby' template to create something that shows the last 10 threads in each subforum. I need to emulate the facebook forum style, where a user can quickly scan recent posts in multiple forums without having to navigate down to individual forums.

Ideally, a user would see:
Subforum A:
- Last thread 1
- Last thread 2
- Last thread 3
Subforum B:
- Last thread 1, 2, 15, etc.

I've tried the CYB subforum manager, which seems to only change the display of subforum columns, and does not display posts inside those subforums.

Currently, I have added a plugin to pre-register variables for the last post template, but I can't seem to pass it any variables. Additionally, it looks like the pre-registered template piece is only generated once, and then cached for all templates afterwards.

I'm familiar with PHP, but baffled by vbulletin. What's the best way to code up something like this?