<?php
RegisterPlugin("tx_user_theme","ActivePlugin_tx_user_theme");
DefinePluginFilter('Filter_Plugin_YtUser_Dmuc');

function ActivePlugin_tx_user_theme() {
    global $zbp;
    Add_Filter_Plugin('Filter_Plugin_YtUser_Dmuc','tx_user_theme_YtUser_Dmuc');
}


function tx_user_theme_YtUser_Dmuc(&$ytuser_templates,&$ytuser_theme) {
    global $zbp;
    $ytuser_templates=array("t_header","t_certifi","t_articleedt", "t_articlelist", "t_binding", "t_buy", "t_changepassword", "t_commentlist", "t_consume", "t_favorite", "t_footer", "t_integral", "t_login", "t_nameedit", "t_pagebar", "t_paylist", "t_register", "t_resetpassword", "t_resetpwd","t_upgrade", "t_user", "t_menu");
    $ytuser_theme='tx_user_theme';
}

function InstallPlugin_tx_user_theme() {
    global $zbp;
    if(!$zbp->Config('tx_user_theme')->HasKey('Version')){
        $zbp->Config('tx_user_theme')->Version = '1.0';
        $zbp->Config('tx_user_theme')->side1 = '文章管理';
        $zbp->Config('tx_user_theme')->side2 = '发布文章';
        $zbp->Config('tx_user_theme')->side3 = '评论管理';
        $zbp->Config('tx_user_theme')->side4 = '我的收藏';
        $zbp->Config('tx_user_theme')->side5 = '积分充值';
        $zbp->Config('tx_user_theme')->side6 = 'vip充值';
        $zbp->Config('tx_user_theme')->side7 = '购买列表';
        $zbp->Config('tx_user_theme')->side8 = '账号绑定';
        $zbp->Config('tx_user_theme')->notice = '
<li><a href="#">这里是顶部滚动公告内容</a></li>
<li><a href="#">插件设置里面自行修改</a></li>
        ';
        $zbp->Config('tx_user_theme')->foot = '这里是页面底部内容';
        $zbp->Config('tx_user_theme')->color1 = '2D2B32';
        $zbp->Config('tx_user_theme')->color2 = '111111';
        $zbp->Config('tx_user_theme')->color3 = 'DDDDDD';
        $zbp->Config('tx_user_theme')->color4 = 'CC0000';
        $zbp->Config('tx_user_theme')->color5 = 'FFFFFF';
        $zbp->Config('tx_user_theme')->color6 = 'FAFAFA';
        $zbp->Config('tx_user_theme')->color7 = '5E5E5E';
        $zbp->Config('tx_user_theme')->color8 = '6E6E6E';
        $zbp->Config('tx_user_theme')->alipay = '0';
        $zbp->Config('tx_user_theme')->qqdl = '1';
        $zbp->SaveConfig('tx_user_theme');
    }
}

function UninstallPlugin_tx_user_theme() {
    global $zbp;
    $zbp->DelConfig('tx_user_theme');
}