Merge branch 'malio' into 'malio'

Malio 支持开启用户中心弹窗24小时只弹一次

See merge request maxitio/malio-theme-for-sspanel!23
QuickEdition(No-js-Encryption)
Max 7 years ago
commit 545c021013

@ -102,6 +102,7 @@ $Malio_Config['enable_index_subinfo'] = true; // 是否在首页显示订阅
$Malio_Config['index_subinfo_buttons_align'] = false; // 是否开启首页订阅链接按钮的对齐
$Malio_Config['index_show_alert_to_tutorial'] = false; // 首页是否一直显示进入教程的横幅 (此项设置为false后,新用户的首页依旧会显示引导进入教程的横幅)
$Malio_Config['enable_index_popup_ann'] = false; // 是否在用户登录后弹出重要公告
$Malio_Config['enable_index_popup_ann_time'] = false; // 重要公告弹窗是否24小时只弹一次
$Malio_Config['index_popup_ann_content'] = '仅在有重大通知时使用,否则会降低用户体验,可以使用HTML标签'; // 重要公告的内容
$Malio_Config['enable_share'] = true; // 是否显示共享账号

@ -155,8 +155,10 @@
<h4>会员时长</h4>
</div>
<div class="card-body">
{if $user->class_expire!="1989-06-04 00:05:00"}
{if $user->class_expire!="1989-06-04 00:05:00" && $user->class >= 1}
<span class="counter">{$class_left_days}</span> 天
{elseif $user->class <= 0}
<span class="counter">0</span> 天
{else}
永久
{/if}
@ -572,7 +574,25 @@
{if $malio_config['enable_index_popup_ann'] == true}
<script>
$('#popup-ann-modal').modal('show');
{if $malio_config['enable_index_popup_ann_time'] == true}
function setCookie(name, value) {
var exp = new Date();
exp.setTime(exp.getTime() + 1 * 60 * 1000*60*24);
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
}
function ReadCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg)) return unescape(arr[2]);
else return null;
}
if (ReadCookie("cnxad_lunbo") == "" || ReadCookie("cnxad_lunbo") == null) {
$('#popup-ann-modal').modal('show');
setCookie("cnxad_lunbo", "yes");
}
{else}
$('#popup-ann-modal').modal('show');
{/if}
</script>
{/if}
</body>

Loading…
Cancel
Save