近日老刘笔记博客网站启用了7TEC主题,首先在此感谢开发者。启用7TEC主题后便开始按照开发者给出的提示进行相关配置,在配置过程中老刘发现在主题官方下载页面好些朋友咨询如何将主题里赞赏码改为自己的问题。经过认真研读主题开发者跟提问者的互动信息,老刘经过多次尝试终于修改成功了,特给出老刘的修改过程。
第一步:替换赞赏码图片
打开8uftp,登陆博客的服务器,然后下载/public_html/usr/themes/7TEC/img文件夹,然后将里面的收款码图片替换为自己的收款码图片,替换后上传本文件夹并覆盖替换。
第二步:替换赞赏码图片地址
登陆博客后台,在外观设置里打开zanshang.php文件,修改图片地址代码。
修改前:
<div class="zs-modal-pay">
<button class="btn btn-bred" id="pay-text">2元</button>
<p>使用<span id="pay-type">微信</span>扫描二维码打赏</p>
<img width="150" height="150" src="<?php $this->options->themeUrl('img/alipay-2.jpg');此处图片需要改为自己的二维码 ?>" id="pay-image"/>
</div>
修改后:
<div class="zs-modal-pay">
<button class="btn btn-bred" id="pay-text">2元</button>
<p>使用<span id="pay-type">微信</span>扫描二维码打赏</p>
<img width="150" height="150" src="<?php $this->options->themeUrl('img/wechat-2.jpg');('img/wechat-5.jpg');('img/wechat-10.jpg');('img/wechat-50.jpg');('img/wechat-100.jpg');('img/wechat-any.jpg');///此处图片需要改为自己的二维码 ?>" id="pay-image"/>
</div>
因为老刘只打算保留微信打赏二维码,故上述代码里收款码文件名是微信相关的。
第三步:修改js文件图片路径
打开8uftp,登陆博客的服务器,然后下载/public_html/usr/themes/7TEC/js/文件夹里的main.js文件。ctrl+f检索7tec,然后找到相应网址,将7tec.com换为了本博客链接。
至此,老刘的打赏收款码便宣告修改完成。
补充:如何设置仅保留微信收款码?
方法:登陆博客后台,在外观设置里打开zanshang.php文件,修改如下代码。
修改前:
<label style="float: left;width: 130px;">
<input type="radio" name="zs-type" value="alipay" class="zs-type" checked="checked" style="float: left;">
<span class="zs-alipay">
<img src="<?php $this->options->themeUrl('img/alipay-btn.png'); ?>" />
</span>
</label>
<label style="float: left;width: 130px;">
<input type="radio" name="zs-type" value="wechat" class="zs-type" style="float: left;">
<span class="zs-wechat">
<img src="<?php $this->options->themeUrl('img/wechat-btn.png'); ?>" />
</span>
</label>
修改后:
<label style="float: left;width: 130px;">
<input type="radio" name="zs-type" value="wechat" class="zs-type" checked="checked" style="float: left;">
<span class="zs-wechat">
<img src="<?php $this->options->themeUrl('img/wechat-btn.png'); ?>" />
</span>
</label>