<?php
#注册插件
RegisterPlugin("dm_plug_baidu","ActivePlugin_dm_plug_baidu");

function ActivePlugin_dm_plug_baidu() {
	Add_Filter_Plugin('Filter_Plugin_Zbp_MakeTemplatetags','dm_plug_baidu_makeTemplatetags');
}
function InstallPlugin_dm_plug_baidu() {}
function UninstallPlugin_dm_plug_baidu() {}

function dm_plug_baidu_makeTemplatetags(&$template){
	global $zbp;
	$s .= "<script>";
	$s .= "(function(){";
	$s .= "var bp = document.createElement('script');";
	$s .= "bp.src = '//push.zhanzhang.baidu.com/push.js';";
	$s .= "var s = document.getElementsByTagName('script')[0];";
	$s .= "s.parentNode.insertBefore(bp, s);";
	$s .= "})();";
	$s .= "</script>";
	$zbp->footer .= $s;
}