返回列表 发帖
查看: 559|回复: 3

[已解决] 请问手机内容页匿名用户头像如何修改为自定义头像

14

主题

118

回帖

166

积分

渐入佳境

贡献
3 点
金币
2 个
发表于 2024-11-19 22:48:03 | 查看全部 |阅读模式
微信截图_20241119224435.png

列表页,搜索页已经修改成自定义头像,内容页无从下手(代码如下)
  1. <blockquote><span style="white-space: normal;"><span style="white-space:pre">        </span><div class="plc cl" id="pid$post['pid']"></span>
复制代码


1 贡献

最佳答案



[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>

回复

使用道具 举报

14

主题

118

回帖

166

积分

渐入佳境

贡献
3 点
金币
2 个
 楼主| 发表于 2024-11-19 22:48:46 | 查看全部
(代码如下)
<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>
回复

使用道具 举报

58

主题

296

回帖

411

积分

应用开发者

贡献
7 点
金币
9 个
QQ
发表于 2024-11-20 00:29:49 | 查看全部


[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>

回复

使用道具 举报

14

主题

118

回帖

166

积分

渐入佳境

贡献
3 点
金币
2 个
 楼主| 发表于 2024-11-20 02:01:07 | 查看全部
bug八阿哥 发表于 2024-11-20 00:29
试试在判断条件下,直接插入自定义的头像URL

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

好了  谢谢你
回复

使用道具 举报

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

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2025-5-1 07:44 , Processed in 0.077963 second(s), 33 queries .

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表