It is also mandatory to add "p.prefix" and "p.prefixstyle" (at the end of SELECT line)
$sql = "SELECT t.lastposteruid, t.tid, t.subject, t.prefix, t.lastpost, t.fid, t.views, t.replies, u.uid, u.username, u.usergroup, u.displaygroup, u.lastvisit, u.lastactive, u.away, g.canviewwolinvis, p.prefix, p.displaystyle
...
LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid=t.prefix)
...
I am sorry to forgot something...
Down below this SQL code, assign the variable to make it available for templates:
$tpl['prefix'] = $row['prefix'];
$tpl['prefix_style'] = $row['displaystyle'];
Now you can insert one of these prefix variables into the topStats template (Global Templates) at that position it should appear
- "prefix" will display plaintext only
- "prefix_style" will display the prefix in style formatted in ACP
Also mind both PHP chapters "LastActiveThreads" and "LastThreads" depending on which one your'e using and the templates for both as well (topStats_LastThreadsRow or topStats_LastActiveThreadsRow).
[ExiTuS]