mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 05:39:58 +09:00
게시글 연동 구글 애드센스 애드온 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1934 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8c09488be4
commit
c2699bb91b
3 changed files with 149 additions and 0 deletions
23
addons/google_adsense/google_adsense.addon.php
Normal file
23
addons/google_adsense/google_adsense.addon.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @file google_adsense.addon.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief google_adsense를 게시글의 상/하단에 출력할 수 있도록 한다.
|
||||
*
|
||||
* 모든 출력이 끝난후에 사용이 됨.
|
||||
**/
|
||||
|
||||
// called_position이 before_module_init일때만 실행
|
||||
if($called_position != 'before_display_content' || Context::getResponseMethod()=="XMLRPC") return;
|
||||
|
||||
require_once("./addons/google_adsense/google_adsense.lib.php");
|
||||
|
||||
if($addon_info->position == "top") $pos_regx = "!<\!--BeforeDocument\(([0-9]+),([0-9]+)\)-->!is";
|
||||
else $pos_regx = "!<\!--AfterDocument\(([0-9]+),([0-9]+)\)-->!is";
|
||||
|
||||
$GLOBALS['__g_addon_info__'] = $addon_info;
|
||||
|
||||
$output = preg_replace_callback($pos_regx, matchDocument, $output);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue