2020-04-24, 07:40 AM
I have been wanting a feature on my board, that lets me alter something like the username, and add something to it, say a small image or icon etc.
Problem is though too, that I want it to be not only in postbit, but also pm, memberlist, team page, statistics page etc. etc.
What is the easiest way to code a plugin that implements such features? I've been looking at a long list of hooks, where username parsing happens, and have been considering doing it that way. But then I'm also considering, if that is really the most efficient way? Or if I honestly should just implement it through templates i.e. $user['fid#'] (plugin variable i.e. $usericon) since that seems the 'easiest' way to do it, but not really sure which is more efficient as I'm also lacking in understanding.
The hooks I'm looking at are these, haven't had time to go through them all and check if they have true relevance.
Basically what I was thinking of, was when parsing and formatting the username, add something to it at the end.
Problem is though too, that I want it to be not only in postbit, but also pm, memberlist, team page, statistics page etc. etc.
What is the easiest way to code a plugin that implements such features? I've been looking at a long list of hooks, where username parsing happens, and have been considering doing it that way. But then I'm also considering, if that is really the most efficient way? Or if I honestly should just implement it through templates i.e. $user['fid#'] (plugin variable i.e. $usericon) since that seems the 'easiest' way to do it, but not really sure which is more efficient as I'm also lacking in understanding.
The hooks I'm looking at are these, haven't had time to go through them all and check if they have true relevance.
[1] pre_output_page, [2] global_end, [3] build_forumbits_forum, [4] forumdisplay_announcement, [5] forumdisplay_thread, [6] search_results_thread, [7] search_results_post, [8] private_message, [9] portal_announcement
Basically what I was thinking of, was when parsing and formatting the username, add something to it at the end.