그누보드5 정식버전
This commit is contained in:
29
plugin/syndi/include/include.adm.board_delete.inc.php
Normal file
29
plugin/syndi/include/include.adm.board_delete.inc.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.adm.board_delete.inc.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 게시판 삭제시 Syndication Ping
|
||||
* gnuboard5/adm/board_delete.inc.php 파일에 추가
|
||||
* include '../syndi/include/include.adm.board_delete.inc.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
if(!$tmp_bo_table) return;
|
||||
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include_once $syndi_dir . '/config/site.config.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('site'));
|
||||
$oPing->setType('channel');
|
||||
|
||||
// delete log
|
||||
$_sql = "delete from {$g5['syndi_log_table']} where bbs_id='%s'";
|
||||
sql_query(sprintf($_sql, $tmp_bo_table));
|
||||
|
||||
$oPing->request();
|
||||
?>
|
||||
23
plugin/syndi/include/include.adm.board_form_update.php
Normal file
23
plugin/syndi/include/include.adm.board_form_update.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.adm.board_form_update.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 게시판 삭제시 Syndication Ping
|
||||
* gnuboard5/adm/board_form_update.php 파일에 추가
|
||||
* include '../syndi/include/include.adm.board_form_update.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include_once $syndi_dir . '/config/site.config.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('site'));
|
||||
$oPing->setType('channel');
|
||||
|
||||
$oPing->request();
|
||||
?>
|
||||
27
plugin/syndi/include/include.adm.boardgroup_form_update.php
Normal file
27
plugin/syndi/include/include.adm.boardgroup_form_update.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.adm.boardgroup_form_update.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 게시판 삭제시 Syndication Ping
|
||||
* gnuboard5/adm/board_delete.inc.php 파일에 추가
|
||||
* include '../syndi/include/gnuboard5_euckr/include.adm.boardgroup_form_update.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
// group 수정이 아니면
|
||||
if(!$_POST[gr_id]) return;
|
||||
if($w!='u') return;
|
||||
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include_once $syndi_dir . '/config/site.config.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('site'));
|
||||
$oPing->setType('channel');
|
||||
|
||||
$oPing->request();
|
||||
?>
|
||||
37
plugin/syndi/include/include.bbs.delete.php
Normal file
37
plugin/syndi/include/include.bbs.delete.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.bbs.delete.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 글 삭제시 Syndication Ping
|
||||
* gnuboard5/bbs/bbs.delete.php 파일에 추가
|
||||
* include '../syndi/include/include.bbs.delete.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
if(!$write || !$row) return;
|
||||
|
||||
// 비회원 access가 불가능 한 게시판이면 pass
|
||||
$sql = "select count(*) as cnt from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_table='". $bo_table ."' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
|
||||
$cnt_row = sql_fetch($sql);
|
||||
if($cnt_row['cnt']<1) return;
|
||||
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include_once $syndi_dir . '/config/site.config.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
|
||||
$sql = "select wr_subject from $write_table where wr_id='" .$row['wr_id'] ."'";
|
||||
$subject_row = sql_fetch($sql);
|
||||
|
||||
$_link = './bbs/board.php?bo_table=%s&wr_id=%s';
|
||||
$_sql = "insert into {$g5['syndi_log_table']} (content_id, bbs_id, title, link_alternative, delete_date) values('%s','%s','%s','%s','%s')";
|
||||
sql_query(sprintf($_sql, $row['wr_id'], $bo_table, addslashes($subject_row['wr_subject']), sprintf($_link, $bo_table, $row['wr_id']), date('YmdHis')), false);
|
||||
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('channel', $bo_table));
|
||||
$oPing->setType('deleted');
|
||||
$oPing->request();
|
||||
?>
|
||||
36
plugin/syndi/include/include.bbs.delete_all.php
Normal file
36
plugin/syndi/include/include.bbs.delete_all.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.bbs.delete_all.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 글 삭제시 Syndication Ping
|
||||
* gnuboard5/bbs/bbs.delete_all.php 파일에 추가
|
||||
* include '../syndi/include/include.bbs.delete_all.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
if(!$write || !$row) return;
|
||||
|
||||
// 비회원 access가 불가능 한 게시판이면 pass
|
||||
$sql = 'select count(*) as cnt from ' . $g5['board_table'] . ' b, '. $g5['group_table'] . ' g where b.bo_table=\''. $bo_table .'\' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id';
|
||||
$cnt_row = sql_fetch($sql);
|
||||
if($cnt_row['cnt']<1) return;;
|
||||
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include_once $syndi_dir . '/config/site.config.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
$sql = "select wr_subject from $write_table where wr_id='" .$row['wr_id'] ."'";
|
||||
$subject_row = sql_fetch($sql);
|
||||
|
||||
$_link = './bbs/board.php?bo_table=%s&wr_id=%s';
|
||||
$_sql = "insert into {$g5['syndi_log_table']} (content_id, bbs_id, title, link_alternative, delete_date) values('%s','%s','%s','%s','%s')";
|
||||
sql_query(sprintf($_sql, $row['wr_id'], $bo_table, addslashes($subject_row['wr_subject']), sprintf($_link, $bo_table, $row['wr_id']), date('YmdHis')), false);
|
||||
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('channel', $bo_table));
|
||||
$oPing->setType('deleted');
|
||||
$oPing->request();
|
||||
?>
|
||||
39
plugin/syndi/include/include.bbs.move_update.php
Normal file
39
plugin/syndi/include/include.bbs.move_update.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.bbs.move_update.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 글 등록/수정시 Syndication Ping
|
||||
* gnuboard5/bbs/move_update.php 파일에 추가
|
||||
* include '../syndi/include/include.bbs.move_update.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
if($sw != 'move' && $sw != 'copy') return;
|
||||
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include_once $syndi_dir . '/config/site.config.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
if($sw == "copy")
|
||||
{
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('channel', $bo_table));
|
||||
$oPing->setType('article');
|
||||
$oPing->request();
|
||||
|
||||
unset($oPing);
|
||||
}
|
||||
|
||||
for($i=0, $c=count($_POST['chk_bo_table']); $i<$c; $i++)
|
||||
{
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('channel', $_POST['chk_bo_table'][$i]));
|
||||
$oPing->setType('article');
|
||||
$oPing->request();
|
||||
|
||||
unset($oPing);
|
||||
}
|
||||
?>
|
||||
42
plugin/syndi/include/include.bbs.write_update.php
Normal file
42
plugin/syndi/include/include.bbs.write_update.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @file include.bbs.write_update.php
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief 글 등록/수정시 Syndication Ping
|
||||
* gnuboard5/bbs/write_update.php 파일에 추가
|
||||
* include '../syndi/include/include.bbs.write_update.php';
|
||||
*/
|
||||
if(!defined('_GNUBOARD_')) return;
|
||||
|
||||
if(!$board) return;
|
||||
|
||||
// 비밀 게시판이면 pass
|
||||
if($board['bo_use_secret'] && $secret) return;
|
||||
|
||||
// 비회원 사용자가 볼 수 없다면 pass
|
||||
if($board['bo_list_level']>1 || $board['bo_view_level']>1) return;
|
||||
|
||||
if($w == 'u' && $wr && !$wr['wr_id']) return;
|
||||
|
||||
|
||||
// 수정 대상 또는 신규 입력한 id가 있다면 ping을 보냄
|
||||
if($wr['wr_id'] || $wr_id)
|
||||
{
|
||||
$syndi_dir = realpath(dirname(__FILE__) .'/../');
|
||||
|
||||
// include config & Syndication Ping class
|
||||
include $syndi_dir . '/config/site.config.php';
|
||||
include $syndi_dir . '/libs/SyndicationHandler.class.php';
|
||||
include $syndi_dir . '/libs/SyndicationPing.class.php';
|
||||
|
||||
$oPing = new SyndicationPing;
|
||||
$oPing->setId(SyndicationHandler::getTag('channel', $board['bo_table']));
|
||||
$oPing->setType('article');
|
||||
|
||||
// if deleted
|
||||
$_sql = "delete from {$g5['syndi_log_table']} where content_id='%s' and bbs_id='%s'";
|
||||
sql_query(sprintf($_sql, $wr_id ? $wr_id : $wr[wr_id], $board['bo_table']));
|
||||
|
||||
$oPing->request();
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user