Illegal websites should not initiate any form of manual service requests to our staff. It is strictly prohibited to use honmau Media's technical support services and products to engage in any illegal activities. If discovered, no technical support will be provided.×
Current location:home> news > help and support

Add user-posted avatar codes to the DISCUZ forum default template list page

discuzThe default template list page does not have avatars. Many people want to add avatar display, but the plugin is charged. Those who like hands-on experience can try changing the code,It is recommended to back up the code before making modifications to avoid making incompatible changes that may prevent normal recovery.

Add user-posted avatar codes to the DISCUZ forum default template list page

Default list page display

The code is as follows, with two places in total. It can be used with any template and is similar. Please adjust it according to your own template.

Add user-posted avatar codes to the DISCUZ forum default template list page

<td class="num">

<!--{if $thread['authorid'] && $thread['author']}-->

<a href="home.php?mod=space&uid=$thread[authorid]" c="1"{if $groupcolor[$thread[authorid]]} style="color: $groupcolor[$thread[authorid]];"{/if}> <img src="/uc_server/avatar.php?uid=$thread[authorid]&size=small" style="width: 40px;"><!--$thread[author]--> </a><!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->

<!--{else}-->

$_G[setting][anonymoustext]

<!-- {/if}-->

</td>

Add user-posted avatar codes to the DISCUZ forum default template list page

<td>

<!--{if $thread['authorid'] && $thread['author']}-->

<a href="home.php?mod=space&uid=$thread[authorid]" c="1"{if $groupcolor[$thread[authorid]]} style="color: $groupcolor[$thread[authorid]];"{/if}> <img src="/uc_server/avatar.php?uid=$thread[authorid]&size=small" style="width: 40px;"><!--$thread[author]--> </a><!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->

<!--{else}-->

$_G[setting][anonymoustext]

<!-- {/if}-->

</td>

After adding an avatar, it will display as follows:

Add user-posted avatar codes to the DISCUZ forum default template list page

© Website copyright and disclaimer

1.[honmau Media] independently owns the copyright of all materials on relevant pages of this website;

2. No one is allowed to copy it without the express written permission of [honmau Media];

3. The articles that do not indicate "honmau Media" on this website are all from the Internet and are only for everyone to learn and refer;

4. If there is any infringement/violation/irregularity, please contact customer service QQ or email to delete it, please understand;

5.[honmau Media] reserves the right to correct, modify and update this statement at any time.legal notice

submission
Working days: 8:30 - 22:00 Online QQ

customer service

Company Introduction
top