⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 googleadsense.php

📁 F2blog v1.1 beta 12.27更新说明 1、后台编辑器增加了文本粘贴与从WORD粘贴
💻 PHP
字号:
<?php
/*
Plugin Name: GoogleAdSense
Plugin URI: http://forum.f2blog.com/forum-21-1.html
Description: Add Google AdSense to your blog.
Version: 0.1
Author: zach14c
Author URI: http://forum.f2blog.com/profile-uid-22.html
*/

include_once(substr(dirname(__FILE__), 0) . "/common.php");
// Install Plugin
function GoogleAdSense_install() {
	global $GoogleAdSense_plugin_config;
	$arrPlugin['Name'] = $GoogleAdSense_plugin_config["Name"]; 
	$arrPlugin['Desc'] = "Google Ad"; 
	$arrPlugin['Type'] = "Side";     
	$arrPlugin['Code'] = "";         
	$arrPlugin['Path'] = "";         
	$arrPlugin['DefaultField'] = array("dummy"); 
	$arrPlugin['DefaultValue'] = array("1"); 

	$ActionMessage = install_plugins($arrPlugin);
	return $ActionMessage;
}

//Unstall Plugin
function GoogleAdSense_unstall() {
	global $GoogleAdSense_plugin_config;
	$ActionMessage = unstall_plugins($GoogleAdSense_plugin_config["Name"]);
	return $ActionMessage;
}
    
function GoogleAdSense($sidename, $sidetitle, $htmlcode, $isInstall) {
	global $GoogleAdSense_plugin_config;
	$ad_js = readfromfile($GoogleAdSense_plugin_config["JSFile"]);
?>	
<!-- Google Ad-Sense -->
<div class="sidepanel" id="Side_GoogleAd">
  <h4 class="Ptitle" style="cursor: pointer;"><?=$sidetitle?></h4>
  <div class="Pcontent" id="content_statistics" style="display:">
    <?=$ad_js?>
  </div> 
</div> 
<?		
}
add_action('GoogleAdSense','GoogleAdSense',4);
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -