返回列表 发布新帖

请问手机内容页匿名用户头像如何修改为自定义头像 New

172 3
发表于 2024-11-23 20:40:23 | 查看全部 阅读模式
d1.png

列表页,搜索页已经修改成自定义头像,内容页无从下手(代码如下)
  1.         
复制代码

1 贡献最佳答案



[backcolor=var(--vscode-textCodeBlock-background)]试试在判断条件下,直接插入自定义的头像URL

将下面的:https://www.72jz.com/logo.png 改成你的图片url



   
        

评论3

成娅旃Lv.4 发表于 2024-11-23 20:40:37 | 查看全部
(代码如下)
<div class="plc cl" id="pid$post['pid']">
                <div class="avatar"><img src="<!--{if !$post['authorid'] || $post['anonymous']}--><!--{avatar(0, 'small', true)}--><!--{else}--><!--{avatar($post['authorid'], 'small', true)}--><!--{/if}-->" /></div>
                <div class="display pi<!--{if $post['first']}--> pione<!--{/if}-->">
                        <ul class="authi">
                                <li class="mtit">
                                        <span class="y">
                                                <!--{if isset($post['isstick'])}-->
                                                        <img src ="{IMGDIR}/settop.png" class="vm" /> {lang from} {$post['number']}{$postnostick}
                                                <!--{elseif $post['number'] == -1}-->
                                                        {lang recommend_post}
                                                <!--{else}-->
                                                        <!--{if !empty($postno[$post['number']])}-->$postno[$post['number']]<!--{else}-->{$post['number']}{$postno[0]}<!--{/if}-->
                                                <!--{/if}-->
                                        </span>
                                        <span class="z">
                                        <!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->
                                                <a href="home.php?mod=space&uid=$post['authorid']">$post['author']</a>
                                        <!--{else}-->
                                                <!--{if !$post['authorid']}-->
                                                <a href="javascript:;">{lang guest} <em>$post['useip']{if $post['port']}:$post['port']{/if}</em></a>
                                                <!--{elseif $post['authorid'] && $post['username'] && $post['anonymous']}-->
                                                <!--{if $_G['forum']['ismoderator']}--><a href="home.php?mod=space&uid=$post['authorid']">{$_G['setting']['anonymoustext']}</a><!--{else}-->{$_G['setting']['anonymoustext']}<!--{/if}-->
                                                <!--{else}-->
                                                $post['author'] <em>{lang member_deleted}</em>
                                                <!--{/if}-->
                                        <!--{/if}-->
                                        </span>
回复

使用道具 举报

淤芯咬Lv.3 发表于 2024-11-23 20:41:24 | 查看全部
d1.png



[backcolor=var(--vscode-textCodeBlock-background)]试试在<!--{if !$post['authorid'] || $post['anonymous']}-->判断条件下,直接插入自定义的头像URL

将下面的:https://www.72jz.com/logo.png 改成你的图片url


<div class="plc cl" id="pid$post['pid']">
    <div class="avatar">
        <img src="<!--{if !$post['authorid'] || $post['anonymous']}-->https://www.72jz.com/logo.png<!--{else}--><!--{avatar($post['authorid'], 'small', true)}--><!--{/if}-->" />
    </div>
    <div class="display pi<!--{if $post['first']}--> pione<!--{/if}-->">
        <ul class="authi">
            <li class="mtit">
                <span class="y">
                    <!--{if isset($post['isstick'])}-->
                        <img src="{IMGDIR}/settop.png" class="vm" /> {lang from} {$post['number']}{$postnostick}
                    <!--{elseif $post['number'] == -1}-->
                        {lang recommend_post}
                    <!--{else}-->
                        <!--{if !empty($postno[$post['number']])}-->$postno[$post['number']]<!--{else}-->{$post['number']}{$postno[0]}<!--{/if}-->
                    <!--{/if}-->
                </span>
                <span class="z">
                <!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->
                    <a href="home.php?mod=space&uid=$post['authorid']">$post['author']</a>
                <!--{else}-->
                    <!--{if !$post['authorid']}-->
                    <a href="javascript:;">{lang guest} <em>$post['useip']{if $post['port']}:$post['port']{/if}</em></a>
                    <!--{elseif $post['authorid'] && $post['username'] && $post['anonymous']}-->
                    <!--{if $_G['forum']['ismoderator']}--><a href="home.php?mod=space&uid=$post['authorid']">{$_G['setting']['anonymoustext']}</a><!--{else}-->{$_G['setting']['anonymoustext']}<!--{/if}-->
                    <!--{else}-->
                    $post['author'] <em>{lang member_deleted}</em>
                    <!--{/if}-->
                <!--{/if}-->
                </span>
回复

使用道具 举报

阎清雅Lv.2 发表于 2024-11-23 20:41:49 | 查看全部
好了  谢谢你
回复

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

投诉/建议联系

5857225@qq.com

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Powered by Discuz! X5.0 Licensed 2022-2025 吾7分享 版权所有 All Rights Reserved. |网站地图|湘公网安备43112302000109号 ICP备案:湘ICP备19002042号-3
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表