Subject: Show moderators below the forum tagline
- <?php
- // Define plug-in meta-data
- UnbPluginMeta('Show moderators below fora description texts');
- // UnbPluginMeta('de en', 'lang');
- if (!UnbPluginEnabled()) return;
- /* ForumId: in
- output: out
- */
- function UnbShowModForumListPostDesc(&$data) {
- // global $UNB_T;
- // ForumId => Group that holds moderators-Id
- 5 => 13, // Kalender
- 8 => 22, // Bugs
- 14 => 6, //FAQ
- 7 => 20, 17 => 20, 24 => 20, // Allgemeines
- 20 => 23, // Handwerk
- 2 => 21, 3 => 21, 4 => 21, 26 => 21, // Rollenspiel
- 15 => 17, 21 => 14, 22 => 15, 16 => 16, // Fraktionsfora
- // 11 => 5, 13 => 5, 23 => 5, 29 => 5, // Staff-Fora
- 0 => 0 // Placeholder
- );
- $fid = $data['ForumId'];
- if (!$assigns[$fid])
- return;
- $forum = $data['Forum']; //new IForum($fid);
- if ($forum->IsCategory())
- return;
- foreach($assigns[$fid] as $list)
- else
- } else {
- }
- $out = '';
- $out .= '<br />';
- //$out .= '<div style="border-top: 1px solid lightgrey; margin: 4px 0;"></div>';
- $out .= '<div style="margin-left: 10px; font-size:0.8em;line-height:120%">Ansprechpartner: ';
- $names = UnbGetUserNames();
- foreach($mods as $mod) {
- $mymods[] = UnbMakeUserLink($mod, $names[$mod]);
- }
- $mymods[] = "<i>Niemand eingetragen</i>";
- $out .= '</div>';
- $data['output'] .= $out;
- return 1;
- }
- UnbRegisterHook("forumlist.postdescription", "UnbShowModForumListPostDesc");
- ?>
As can be seen here.
Configuration is, as for now, without frills.
Set $assigns to reflect your moderation groups, and use array-arrays to specify userIDs instead of group-IDs.
There are no language files, but could be added with a minimum of fuss.
Change the code to reflect your language.
I reject your reality and substitute my own.

elven
Show profile
Link to this post