I tried to add icon next to username for topic author in topic view, but I can't figure out how to get display name from $message.
There is $message['poster_name'] but it returns username (login). I can't use anything from $output array, because it's multiplied on every next message in topic.
Is there way to get display name without file edits?
I think you should really use $output and "remember" if you have already added it.
Something like:
static $added = false;
if ($added === false && $output['member']['id'] == $op_id)
{
$output['member']['link'] = // add the image here (I think);
$added = true;
}
The alternative, is a bit more "fancy": you may hook integrate_action_display_before and there attach a non-permanent hook to integrate_member_context in order to add the image next to the name.
Thanks, works great now :)
I'll post package later, maybe someone will find it useful ::)
I tried to look for integrate_action_display_before but I couldn't find it anywhere
There are 7 "generic" calls that may trigger different hooks depending on the arguments:
'integrate_' . $this->_name . '_errors'
'integrate_action_' . $hook . '_before'
'integrate_action_' . $hook . '_after'
'integrate_sa_' . $this->_name
'integrate_list_' . $listOptions['id']
'integrate_' . $menuOptions['hook'] . '_areas'
'integrate_' . $hook . '_profile_fields'
these will need some special documentation...
BTW, if you use $db_show_debug = true; in your Settings.php, you can see all the hooks called in each page in the footer. ;)