
为了防止主题/插件更新导致出现错误以此记录
<section class="widget">
<div class="user-auth">
<?php if (array_key_exists('TePass', Typecho_Plugin::export()['activated'])) :
echo TePass_Plugin::getBuyVip();
endif; ?>
</div>
</section>
{/collapse-item}
{collapse-item label="导航栏个人信息新增/更改"}
主题下文件 nav_ainfo.php+新增(重复使用了已有的class标签)>只进行了缩进,提高代码可读性,未作变动
<div class="header__dropdown">
<div class="header-box">
<div class="refresh-header-top">
<div class="header-top">
<a class="user-names" href="<?php $this->options->siteUrl(); ?><?php if ($this->options->rewrite==0): ?>index.php/<?php endif; ?>author/<?php $this->user->uid(); ?>">
<img src="<?php echo getuserimg($this->user->uid); ?>" >
</a>
<div class="user-aut">
<a class="user-names" href="<?php $this->options->siteUrl(); ?><?php if ($this->options->rewrite==0): ?>index.php/<?php endif; ?>author/<?php $this->user->uid(); ?>"><?php $this->user->screenName(); ?></a>
<?php echo yonghuzu($this->user->uid); ?>
</div>
<p><?php echo reintro($this->user->uid); ?> </p>
<a href="<?php $this->options->logoutUrl(); ?>" class="logout" title="退出">
<i class="ri-login-circle-line ri-lg"></i>退出
</a>
</div>
</div>
<div class="header-center">
<div class="md-l">
<span class="md-tit">个人信息</span>
<span class="jinbi">作者人气:<?php echo authorviews($this->user->uid); ?></span>
<span class="dou">账号年龄:<?php echo reg_login($this->user->uid); ?> 天</span>
</div>
<div class="md-r">
<span class="md-tit">扩展资料</span>
<span class="jinbi">发布文章:<?php echo allpostnum($this->user->uid); ?> 篇</span>
<span class="dou" title="评论次数:<?php echo commentnum($this->user->uid); ?>">评论次数:<?php echo commentnum($this->user->uid); ?> 次</span>
</div>
</div>
</div>
</div>
{/collapse-item}
{collapse-item label="电脑端因为页面内容较少导致页脚上移"}
我的解决方案是,加个图片挤下去(本人能力有限,如果有更好的办法欢迎留言)
目前只有留言,vip购买,个人中心页面添加
<!-- 新增图片 -->
<div class="custom-image-section" style="text-align: center; margin: 20px 0;">
<img src="图片url"
class="vip-feature-img"
style="max-width: 100%; height: auto; border-radius: 8px;">
</div>
{/collapse-item}
{collapse-item label="spimes会员中心对接tepass"}
会员中心对接tepass语法自己写了几个,但是都不尽人意,多多少少都有点bug决定跟tepass作者聊聊看看具体有哪些方式和调用哪些代码<目前寄了>
{/collapse-item}
{collapse-item label="前端购买会员"}
新建一个page-vip.php文件
<?php
/**
* 购买会员
*
* @package custom
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="row">
<div class="col-md-9 contpost" id="content">
<article class="post">
<!-- 新增图片 -->
<div class="custom-image-section" style="text-align: center; margin: 20px 0;">
<img src="https://free4.yunpng.top/2025/05/06/681a1cd78395f.png"
class="vip-feature-img"
style="max-width: 100%; height: auto; border-radius: 8px;">
</div>
<header class="entry-header page-header" >
<h1 class="entry-title page-title"><?php $this->title(); ?></h1>
<?php if (array_key_exists('TePass', Typecho_Plugin::export()['activated'])) :
echo TePass_Plugin::getBuyVip();
endif; ?>
<div class="border-theme"></div>
</header>
<div class="entry-content clearfix">
<?php _parseContent($this, $this->user->hasLogin()) ?>
</div>
</article>
<?php $this->need('comments.php'); ?>
</div>
<?php $this->need('sidebar.php'); ?>
</div>
<?php $this->need('footer.php'); ?>
{/collapse-item}
{collapse-item label="折叠标题"}
折叠内容
{/collapse-item}
{collapse-item label="折叠标题"}
折叠内容
{/collapse-item}
原创文章,作者:xiyoyo,如若转载,请注明出处:https://store.xiyoyo.cn/archives/12/