RiPro用户小工具美化添加用户消费排行榜

分享下RiPro用户小工具美化和添加用户消费排行榜效果图如下:

图片[1]-RiPro用户小工具美化添加用户消费排行榜-99源码屋
效果图

教程开始:

用户小工具美化:

1. ripro – > inc -> codestar-framework -> options -> widgets.theme.php 文件,查找“ // 用户信息小工具 ”,将本栏目内“ ob_start(); ?> ”到“ <?php echo ob_get_clean(); ”内的内容替换为如下代码

<div class="author-card_content">
	<div class="authorinfo-header-title">
        <div class="authorinfo-codesign-single">
			<?php echo get_avatar($current_user->user_email); ?>
		</div>
		<div class="author-info-vip-single">
			<div class="authorinfo-header">
				<?php echo $current_user->display_name;?>
			</div>
			<?php if ($CaoUser->vip_status()) {
				echo '<span class="label label-default" style="padding-left:0px;padding-top:0px;">'.$CaoUser->vip_end_time().'</span>';
			}else{
				echo '<span class="label label-default" style="padding-left:0px;padding-top:0px;">未开通</span>';
			}?>
		</div>
		<div class="author-qiandao-single">
			<?php if (_cao('is_qiandao','1')) : ?>
				<?php if (_cao_user_is_qiandao()) {
					echo '<button type="button" class="btn btn--secondary disabled ripro-qiandao"><i class="fa fa-check"></i> 今日已签到</button>';
				}else{
					echo '<button type="button" class="click-qiandao btn btn--secondary ripro-qiandao">今日签到可领<span>'._cao('qiandao_to_money','5').'</span><span>'.$site_money_ua.'</span></button>';
				}?>
			<?php endif; ?>
		</div>
	</div>
	<div class="author-fields">
		<div class="ripro-author-fields">
			<span class="ripro-author-yue" style="color:#fff"><?php echo $CaoUser->get_balance();?></span>
			<span style="color:#bcb7a9"><?php echo $site_money_ua;?>余额</span>
		</div>
		<div class="ripro-author-fields">
			<span class="ripro-author-yue" style="color:#fff"><?php echo $CaoUser->get_consumed_balance();?></span>
			<span style="color:#bcb7a9">消费<?php echo $site_money_ua;?></span>
		</div>
	</div>
</div>

2. ripro -> assets -> css-> diy.css 添加如下样式

.widget-userinfo{background:url(../images/user.png);background-repeat:no-repeat;background-size:100% 100%;box-shadow:0 34px 10px -24px rgba(136,161,206,0.34);}
.authorinfo-header-title{margin-bottom:1.5rem;margin-top:1.5rem;display:flex!important;}
.authorinfo-codesign-avatar{width:45.6px;height:45.6px;display:flex;flex-shrink:0;cursor:pointer;border-radius:50%;overflow:hidden;}
.author-info-vip{margin-left:1rem;flex-shrink:0;border-radius:500px;cursor:pointer;}
.authorinfo-header{font-size:0.9rem !important;font-weight:400;line-height:1.5;color:#fff;}
.authorinfo-header-time,.label-default{font-size:0.7rem !important;color:#dedbd2;font-weight:400;line-height:1.5;background-color:rgba(0,0,0,0)}
.authorinfo-codesign-single{width:40px;height:40px;display:flex;flex-shrink:0;cursor:pointer;border-radius:50%;overflow:hidden;}
.author-info-vip-single{margin-left:0.4rem;flex-shrink:0;border-radius:500px;cursor:pointer;}
.author-qiandao-single{padding:0px;padding-top:0px;height:40px;line-height:40px;right:-15px;position:absolute;}
.author-qiandao-single button{border-radius:50px;background-image:linear-gradient(60deg,#777777 60%,#ffd1ff 100%);}
.ripro-author-fields{background-color:rgba(0,0,0,0)!important;color:#fff;}
.ripro-author-yue{font-size:23px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;white-space:normal;}

添加用户消费排行榜:

1. ripro – > inc -> codestar-framework -> options -> widgets.theme.php 文件,在最后添加如下代码

------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发

请登录后发表评论

服务支持

用心做更好的精品源码站,服务各个行业,让大家快速创建属于自己的网站 。

2000+
优质源码
8年+
开发经验
1200
注册用户
7*24
随时响应