Skip to content

Commit

Permalink
구글 서치 콘솔에 맞지 않는 게시판xml 수정 #234
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Jun 19, 2023
1 parent bcda18c commit 992641d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bbs/rss.php
Expand Up @@ -49,9 +49,7 @@ function specialchars_replace($str, $len=0) {
<channel>
<title><?php echo specialchars_replace($config['cf_title'].' &gt; '.$subj1.' &gt; '.$subj2); ?></title>
<link><?php echo specialchars_replace(get_pretty_url($bo_table)); ?></link>
<description>테스트 버전 0.2 (2004-04-26)</description>
<language>ko</language>

<?php
$sql = " select wr_id, wr_subject, wr_content, wr_name, wr_datetime, wr_option
from {$g5['write_prefix']}$bo_table
Expand All @@ -66,6 +64,10 @@ function specialchars_replace($str, $len=0) {
$html = 1;
else
$html = 0;

if ($i === 0) {
echo '<description>'. specialchars_replace($subj2). ' ('. $row['wr_datetime'] .')</description>'.PHP_EOL;
}
?>

<item>
Expand All @@ -76,8 +78,8 @@ function specialchars_replace($str, $len=0) {
<?php
$date = $row['wr_datetime'];
// rss 리더 스킨으로 호출하면 날짜가 제대로 표시되지 않음
//$date = substr($date,0,10) . "T" . substr($date,11,8) . "+09:00";
$date = date('r', strtotime($date));
$date = substr($date,0,10) . "T" . substr($date,11,8) . "+09:00";
//$date = date('r', strtotime($date)); // 구글 서치 콘솔에서 오류가 난다
?>
<dc:date><?php echo $date ?></dc:date>
</item>
Expand Down

0 comments on commit 992641d

Please sign in to comment.