if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class plugin_it618_firstad_hdp_forum {
function it618_hook(){
global $_G;
$it618_firstad_hdp = $_G['cache']['plugin']['it618_firstad_hdp'];
$hdp_height=$it618_firstad_hdp['hdp_height'];
$hdp_width=$it618_firstad_hdp['hdp_width'];
$hdp_time=$it618_firstad_hdp['hdp_time']*1000;
$ads=explode("|",str_replace(array("\r\n", "\r", "\n"), '|', $it618_firstad_hdp['hdp_content']));
foreach($ads as $key => $ad){
if($ad!=""){
$tmparr=explode("==",$ad);
$ad_txt=$tmparr[0];
$tmparr1=explode(",",$tmparr[1]);
$ad_img=str_replace("{","",$tmparr1[0]);
$ad_url=str_replace("}","",$tmparr1[1]);
$strall.='<div data-iview:image="'.$ad_img.'" width="'.$hdp_width.'" height="'.$hdp_height.'" data-iview:transition="left-curtain,right-curtain,top-curtain,bottom-curtain,strip-down-right,strip-down-left,strip-up-right,strip-up-left,strip-up-down,strip-up-down-left,strip-left-right,strip-left-right-down,slide-in-right,slide-in-left,slide-in-up,slide-in-down,fade,block-random,block-fade,block-fade-reverse,block-expand,block-expand-reverse,block-expand-random,zigzag-top,zigzag-bottom,zigzag-grow-top,zigzag-grow-bottom,zigzag-drop-top,zigzag-drop-bottom,strip-left-fade,strip-right-fade,strip-top-fade,strip-bottom-fade,block-drop-random"><a class="wmadilj" href="'.$ad_url.'" title="'.$ad_txt.'" target="_blank"></a></div>';
}
}
$usergroup=(array)unserialize($it618_firstad_hdp['usergroup']);
if(empty($usergroup[0]) || in_array($_G['groupid'], $usergroup)){
include template('it618_firstad_hdp:firstad_hdp');
return $it618_firstad_hdp_block;
}
}
function index_top(){
global $_G;
$it618_firstad_hdp = $_G['cache']['plugin']['it618_firstad_hdp'];
if($it618_firstad_hdp['indextop']==1)return $this->it618_hook();else return "";
}
}
class plugin_it618_firstad_hdp extends plugin_it618_firstad_hdp_forum{
function global_header(){
$blockname="it618_firstad_hdp";
$blockcount=DB::result_first("select count(1) from ".DB::table('common_block')." where name='".$blockname."' and blockclass=0");
if($blockcount>0){
$strContent=$this->it618_hook();
$setarr = array(
'summary' => $strContent,
'dateline' => $_G['timestamp']
);
DB::update('common_block', $setarr, "name='".$blockname."' and blockclass=0");
}
}
}
?>
请问大家要怎么样修改这段代码才能把这个插件的位置更改如图:
谢谢大家
|