답변 4개
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
1. 여분필드를 이용해 값을 등록.
2. 해당 값이 있을 때 없을 때 구분해 메타태그 파일에서 값을 불러와 처리.
자세한 건 의뢰 권장합니다.
댓글을 작성하려면 로그인이 필요합니다.
head.sub.php
<head>
<?php if(뷰페이지일때){ ?>
뷰페이지 메타
<?php } else { ?>
일반적인 메타
<?php } ?>
</head>
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
이전 남겨주신 문의글의 https://www.happyjung.com/lecture/2369 사이트
if ($bo_table) {
if ($wr_id) {
$seo_qry = sql_query(" select * from {$g5['write_prefix']}{$bo_table} where wr_id='{$wr_id}' ");
$seo_row = sql_fetch_array($seo_qry);
$seo_wr_datetime = $seo_row['wr_datetime'];
if(strpos($seo_row['wr_option'], "secret") !== false) {
$seo_descriptionL = $g5_head_title;
$seo_descriptionS = $g5_head_title;
$seo_keywords = $g5_head_title;
} else {
$seo_description = str_replace('<br />', ' ', $seo_row['wr_content']); // 를 공백으로 교체하기
$seo_description = str_replace('<br>', ' ', $seo_description); // 를 공백으로 교체하기
$seo_description = str_replace('"', ' ', $seo_description); // " 를 공백으로 교체하기
$seo_description = str_replace(' ', ' ', $seo_description); // 를 공백으로 교체하기
$seo_description = preg_replace('/[\x00-\x1F\x7F]/', '', $seo_description); // 이상한 특수문자를 제어하는 코드 추가
//$seo_keywords = strip_tags($seo_description).", ".$seo_keywords;
$seo_keywords = $seo_descriptionS .",". cut_str(strip_tags($seo_description),80);
//$seo_descriptionL = strip_tags($seo_description) .", ". $seo_descriptionL;
$seo_descriptionL = cut_str(strip_tags($seo_description),200);
//$seo_descriptionS = cut_str(strip_tags($seo_description),80) .", ". $seo_descriptionS;
$seo_descriptionS = cut_str(strip_tags($seo_description),80) .", ". $seo_descriptionS;
$gnu_seo_datetime = substr($seo_row['wr_datetime'],0,10);
if ($seo_row['wr_last'] > $seo_row['wr_datetime']) {
$gnu_seo_datetime = substr($seo_row['wr_last'],0,10);
} else {
$gnu_seo_datetime = substr($seo_row['wr_datetime'],0,10);
}
}
해당 부분이 원하시는 내용이신것 같은데요, 잘 안되시나요?
답변에 대한 댓글 4개
접속 URL를 체크하신 후 접속 URL이 view.php 일때를 조건으로 설정하여 작업하면 될 것 같습니다!
쉽게 설명하자면 $view를 설정하기 전에 있습니다, 그렇기 때문에 $view로는 체크되지 않습니다.
이전 댓글에서 말씀드린대로 JavaScript나 php 등으로
따로 해당 페이지가 view 페이지라는걸 체크하셔야 합니다!
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인