Ejemplo n.º 1
0
function AutoPublisher_PostArticle_Succeed(&$article)
{
    global $zbp;
    if (isset($_POST['AutoPublisher'])) {
        if ($_POST['AutoPublisher']) {
            $s = $zbp->Config('AutoPublisher')->idstring;
            $s = AddNameInString($s, (string) $article->ID);
            $zbp->Config('AutoPublisher')->idstring = $s;
            $zbp->SaveConfig('AutoPublisher');
        } else {
            $s = $zbp->Config('AutoPublisher')->idstring;
            $s = DelNameInString($s, (string) $article->ID);
            $zbp->Config('AutoPublisher')->idstring = $s;
            $zbp->SaveConfig('AutoPublisher');
        }
    }
}
Ejemplo n.º 2
0
<div class="SubMenu"><?php 
AppCentre_SubMenus(GetVars('method', 'GET') == 'check' ? 2 : 1);
?>
</div>
  <div id="divMain2">

<?php 
$method = GetVars('method', 'GET');
if (!$method) {
    $method = 'view';
}
Server_Open($method);
?>
	<script type="text/javascript">
		window.plug_list = "<?php 
echo AddNameInString($option['ZC_USING_PLUGIN_LIST'], $option['ZC_BLOG_THEME']);
?>
";
		window.signkey = '<?php 
echo $zbp->GetToken();
?>
';
	</script>
	<script type="text/javascript">ActiveLeftMenu("aAppCentre");</script>
	<script type="text/javascript">AddHeaderIcon("<?php 
echo $bloghost . 'zb_users/plugin/AppCentre/logo.png';
?>
");</script>
  </div>
</div>
<?php 
Ejemplo n.º 3
0
function EnablePlugin($name)
{
    global $zbp;
    $zbp->option['ZC_USING_PLUGIN_LIST'] = AddNameInString($zbp->option['ZC_USING_PLUGIN_LIST'], $name);
    $zbp->SaveOption();
    return $name;
}
Ejemplo n.º 4
0
	Redirect('./main.php');
}

require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';

?>
<div id="divMain">

  <div class="divHeader"><?php echo $blogtitle;?></div>
<div class="SubMenu"><?php AppCentre_SubMenus(GetVars('method','GET')=='check'?2:1);?></div>
  <div id="divMain2">

<?php
$method=GetVars('method','GET');
if(!$method)$method='view';
Server_Open($method);
?>
	<script type="text/javascript">
		window.plug_list = "<?php echo AddNameInString($option['ZC_USING_PLUGIN_LIST'],$option['ZC_BLOG_THEME'])?>";
		window.signkey = '<?php echo $zbp->GetToken()?>';
	</script>
	<script type="text/javascript">ActiveLeftMenu("aAppCentre");</script>
	<script type="text/javascript">AddHeaderIcon("<?php echo $bloghost . 'zb_users/plugin/AppCentre/logo.png';?>");</script>
  </div>
</div>
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';

RunTime();
?>
Ejemplo n.º 5
0
/**
 * 启用插件
 * @param string $name 插件ID
 * @return string 返回插件ID
 */
function EnablePlugin($name)
{
    global $zbp;
    $app = $zbp->LoadApp('plugin', $name);
    $app->CheckCompatibility();
    $zbp->option['ZC_USING_PLUGIN_LIST'] = AddNameInString($zbp->option['ZC_USING_PLUGIN_LIST'], $name);
    $array = explode('|', $zbp->option['ZC_USING_PLUGIN_LIST']);
    $arrayhas = array();
    foreach ($array as $p) {
        if (is_readable($zbp->usersdir . 'plugin/' . $p . '/plugin.xml')) {
            $arrayhas[] = $p;
        }
    }
    $zbp->option['ZC_USING_PLUGIN_LIST'] = trim(implode('|', $arrayhas), '|');
    $zbp->SaveOption();
    return $name;
}
Ejemplo n.º 6
0
/**
 * 启用插件
 * @param string $name 插件ID
 * @return string 返回插件ID
 */
function EnablePlugin($name)
{
    global $zbp;
    $app = $zbp->LoadApp('plugin', $name);
    $app->CheckCompatibility();
    $zbp->option['ZC_USING_PLUGIN_LIST'] = AddNameInString($zbp->option['ZC_USING_PLUGIN_LIST'], $name);
    $zbp->SaveOption();
    return $name;
}