在APP内显示来自XX客户端
本帖最后由 麻辣论坛 于 2018-3-21 14:05 编辑效果如图
1、打开source\plugin\qianfan\protected\controllers\Threadcontrollers.php
2、在代码:
//判断当前登录用户是否对该帖点赞没有
$is_support = in_array($val['pid'], $isSupport) ? 1 : 0;下增加://from$mobiletype =getstatus($val['status'], 4) ? base_convert(getstatus($val['status'], 10).getstatus($val['status'], 9).getstatus($val['status'], 8), 2, 10) : 0;
if ($mobiletype == '1') {
$from = "<div style='margin-top:50px;background: url(https://www.mala.cn/static/image/mobile_icon.gif) no-repeat;
height: 31px;
line-height: 31px;
display: block;
padding-left: 35px;
color: #3580C8;
font-size: 14px;'><span style='order: 1px solid #0D9CF2;
color: #3580C8;
display: inline-block;
font-size: 14px;
height: 29px;
line-height: 29px;
padding: 0 10px;'>iPhone</span></div>";
} elseif ($mobiletype == '2') {
$from = "<div style='margin-top:50px; background: url(https://www.mala.cn/static/image/mobile_icon.gif) no-repeat;
height: 31px;
line-height: 31px;
display: block;
padding-left: 35px;
color: #3580C8;
font-size: 14px;'><span style=' border: 1px solid #0D9CF2;
color: #3580C8;
display: inline-block;
font-size: 14px;
height: 29px;
line-height: 29px;
padding: 0 10px;'>Android</span></div>";
} else {
$from = "";
}
3、找到'content' => $content,($reply变量下)
4、修改为'content' => $content.$from,
修改后的见2楼
附上修改后的:
不错 赞一个 老兄,根本没改好啊 大都昌 发表于 2018-3-30 10:44
老兄,根本没改好啊
哪里? 写入中文显示乱码。只能写字母 不是人 发表于 2018-4-20 13:08
写入中文显示乱码。只能写字母
你可以用工具转下码,成品代码是因为我是GBK的,你一般是UTF的,所以转码即可。 麻辣论坛 发表于 2018-3-21 14:04
附上修改后的:
请问,标题上显示 已回复,是如何实现的? 东海零距离杨欢 发表于 2018-5-9 14:36
请问,标题上显示 已回复,是如何实现的?
这个是另外的问政功能,如果需要全套,可以联系我购买。Q95327294 全是显示来自 苹果 我晕
页:
[1]