PDA

View Full Version : online list custom field


Lee
03-07-2015, 01:33 AM
I need to figure out how to make the online list on FORUMHOME template show "field5" custom profile field instead of "musername" variable

<vb:if condition="$activeusers">
<ol class="commalist" id="wgo_onlineusers_list">
<vb:each from="activeusers" value="loggedin">
<li>{vb:stylevar dirmark}<a class="username" href="{vb:link member, {vb:raw loggedin}}">{vb:raw loggedin.musername}</a>{vb:raw loggedin.invisiblemark}{vb:raw loggedin.buddymark}{vb:raw loggedin.comma}</li>
</vb:each>
</ol>
</vb:if>

kh99
03-07-2015, 10:34 AM
If you just want to replace musername for the online list, then what you could do is use a plugin at hook location forumhome_complete, and go through the array $activeusers to get the userids, and find field 5 for each user. Then either replace the 'musername' with field5, or insert 'field5' in the array and change the template to use it instead of 'musername'.