묻고답하기

SEO 모듈을 꼭 사용하고 싶은데 지금 SEO 모듈로는 정상동작이 하지 않습니다. 제작자분께 이슈를 알려 드린 상태이긴 한데요.



문제의 핵심을 먼저 말씀 드리면 


레이아웃에 위젯을 통한 게시물 링크가 노출이 되면 문제가 생깁니다. 


문제점 1. 


모듈에서 type 구분을 website와 article로 구문을 하는데 레이아웃에 위젯을 통해 게시물 링크가 노출되고 있으면 모든문서가 article이 아닌 website로 구분되어 글의요약이나 이미지 분석등 글의 분석이 이루어지지 않습니다.


문제점 2.


제가 코드를 약간 수정해서 (aticle = true 부분만...) article로 인식되게 하여도 문제는 레이아웃에 노출된 위젯에 의한 게시물의 주소에 해당하는 글요약(description) 등의 정보를 긁어와 버립니다.



if ($document_srl) {

$oDocument = Context::get('oDocument');

if (!is_a($oDocument, 'documentItem')) {

$oDocumentModel = getModel('document');

$oDocument = $oDocumentModel->getDocument($document_srl);

}


if (is_a($oDocument, 'documentItem') && $document_srl == $oDocument->document_srl) {

$is_article = true;

}

}


// 문서 데이터 수집

if ($is_article) {

if (!$oDocument->isSecret()) {

$piece->document_title = $oDocument->getTitleText();

$piece->url = getFullUrl('', 'mid', $current_module_info->mid, 'document_srl',$document_srl);

$piece->type = 'article';

$piece->description = trim(str_replace(' ', ' ', $oDocument->getContentText(400)));

$piece->author = $oDocument->getNickName();

if (count($oDocument->get('tag_list'))) {

$tags = implode(',', $oDocument->get('tag_list'));

if ($tags) $piece->keywords = $tags;

}


if ($oDocument->hasUploadedFiles()) {

$image_ext = array('bmp', 'gif', 'jpg', 'jpeg', 'png');

foreach ($oDocument->getUploadedFiles() as $file) {

if ($file->isvalid != 'Y') continue;


$ext = array_pop(explode('.', $file->uploaded_filename));


if (!in_array(strtolower($ext), $image_ext)) continue;

$piece->image[] = Context::get('request_uri') . $file->uploaded_filename;

}

}

} else {

$piece->url = getFullUrl('', 'mid', $current_module_info->mid);

}

} else {

if (!$is_index) {

$page = (Context::get('page') > 1) ? Context::get('page') : null;

$piece->url = getNotEncodedFullUrl('mid', $current_module_info->mid, 'page',$page);

}

}


$piece->title = $this->getBrowserTitle($piece->document_title);

if ($config->site_image_url) $piece->image[] = $config->site_image_url;


$this->addLink('canonical', $piece->url);

$this->addMeta('keywords', $piece->keywords);

$this->addMeta('description', $piece->description);


// Open Graph

$this->addMeta('og:type', $piece->type);

$this->addMeta('og:url', $piece->url);

$this->addMeta('og:site_name', $config->site_name);

$this->addMeta('og:title', $piece->title);

$this->addMeta('og:description', $piece->description);

$this->addMeta('og:article:author', $piece->author);

foreach ($piece->image as $img) {

$this->addMeta('og:image', $img);

}


$this->canonical_url = $piece->url;


$this->applySEO();


if ($config->use_optimize_title == 'Y') Context::setBrowserTitle($piece->title);

}





* 붉은색으로 칠한 부분을 제거하니 모든 문서가 websit로 구분되어 지던것이 문서는 article로 구분되어 집니다. 하지만 문제점 2로 인해 정상적인 메타태그가 생성되지 않고 있습니다. (물론 푸터쪽에 있는 위젯을 제거하면 될 것 같지만 게시판의 상단에 html입력란에 위젯을 넣어놓은 게시판은 또 여기서 영향을 받습니다 ㅜㅡ)



실제 문서의 요약글을 추출할 수 있는 방법이 어디를 수정해야 할까요...   ㅡㅡ;



글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
氷たい海 음... 어딜 가도 다운을 받을 수 없습니다...  
박진수 마우스가 가면 프레임이 나타나는것 어떻게 하는지 궁금합니다. [2] 2007.08.10
쓸쓴한달빛 서버에 서짜도 모르는 사람인데 -_-자꾸 이상한 로그가 남습니다;; [4] 2007.08.10
폐인모드 플래시에 관한질문 [1] 2007.08.10
シャオリン 채널로 하면 뭐가 좋은가요? [1] 2007.08.10
윤수리 배너를 클릭할때 카운트되기?? [2] 2007.08.10
임경진 계속 페이지 여는중..ㅜㅜ [1] 2007.08.10
박강아름 완공한 홈페이지, 그런데 에러가 뜬대요. [1] 2007.08.10
김선미 후아~ 로그인 ㅠ.ㅠ 나드 하구 싶당~ 질문입니다^-^ [2] 2007.08.10
나는 문제없어 드림위버에서요..하위매뉴 보이게 할려고했는데여.. [1] 2007.08.10
박진수 랜덤을 정말 랜덤하게 하려면? [2] 2007.08.10
박진수 순열관련 함수가 별도로 있는지요? [2] 2007.08.10
장진호 프레임 메뉴 구성할때.. [5] 2007.08.10
최원신 정확한 답변이 없어서리...(팝업창/reload/remote창) [2] 2007.08.10
Main. MySQL에 저장된 데이터를 php 파일 하나로 불러 오는 방법... [5] 2007.08.10
CraZY™ 창 크기가 변하는 것을 알수 있을까요? [3] 2007.08.10
갸륵한놈 오메! 나의 홈페이지가! [1] 2007.08.10
젠더 nzeo.com 이곳 사이트... [3] 2007.08.10
응가응가 크롬리스 소스좀 부탁해요.. [2] 2007.08.10
이태운 이거 소스좀 알려주세여 어떠가 써먹는 거죠?? [1] 2007.08.10