Log in

View Full Version : To Plugin, or not to plugin, that is the question


MetalAges
11-04-2006, 11:29 PM
Heya all,

I am looking to simply add a table row, on any given forum, below the "Threads in Forum : Forum Name" that displays the active users browsing that forum.

I can edit the template easy enough, no issue there. My question is, is that the proper way to do this or would having it as a product be proper? I have been trying to figure out how to make it a product/plugin for two hours now to no avail (my first time). What I have is:

I made this template, called FORUMDISPLAY_activeusers_top:

<if condition="$show['activeusers']">
<tr><td class="tcat, smallfont">$vbphrase[currently_active_users]: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_y_guests]</phrase>), Members: $activeusers</td></tr>
</if>


I made a product, and made the first plugin for it to cache the template:

$globaltemplates = array_merge($globaltemplates, array('FORUMDISPLAY_activeusers_top'));


After this I am a little confused on how to get the template to show below the "Threads in Forum : Forum Name" cell. I had added another plugin, using the hook "forumdisplay_announcement" but I have no idea what to put in the code section.

Any help appreciated!

MetalAges
11-07-2006, 09:48 PM
Anyone? :) Hopefully it wasn't that stupid of a question of me :)