묻고답하기

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 남기남
몽실아빠 SEO 모듈 레이아웃의 위젯의 게시글링크 문제. [7] 2015.01.04 by 몽실아빠
홍찬 이런소스가 있습니다.  
일산사람1 MySQL version이 안맞는 경우 file  
수비니겨 아마존 aws (ec2) 관련 질문입니다.. [2] 2015.01.04 by 2-COIN
틱택톡 모바일 컨텐츠 위젯 더보기 목록 다는법  
newi 네이버 아이디 로그인후 문제 ??? [2] 2015.01.04 by 키스투엑스이
추억팔이 이상한 파일들이 생기는데 뭔가요~?? file  
추억팔이 익명게시판 스팸...닉네임 확인하는 방법 [4] file 2015.01.04 by 추억팔이
김성걸310 글작성자 아이피가 127.0.0.1 [1] 2015.01.04 by 2-COIN
해빛 게시판에 글쓴이의 아이피가 127.0.0.1로 되네요? 아이피가 제대로 나타나게 하려면? [9] file 2015.01.04 by 2-COIN
자자게이 메뉴 밑에 태그는 어떻게 넣는건가요??  
비상9 [질문] EasyXE ver. 1.0beta 메뉴겹침 [1] file 2015.01.05 by 키스투엑스이
띠링띠링 레이아웃이 안바껴요.. [1] 2015.01.05 by 키스투엑스이
홍찬 레이아웃에서 텍스트에 링크걸명 보라색 선뜨는거요 [2] file 2015.01.05 by RTRPRSS
그링고 완전 초보 질문드립니다.ㅠㅠ 제발 도와주세요 [7] file 2015.01.05 by RTRPRSS
쿨럭이 메뉴에 링크된 active 효과에 대한 문의 ㅠ.ㅠ [1] file 2015.01.05 by 쿨럭이
banaba 모바일 스케치5 게시판 제목글은 먹히는데 본문 글은 안도네요 [6] 2015.01.05 by banaba
taingee 도메인 연결시 페이지가 꺠집니다. [2] file 2015.01.05 by 꾸링
EntryPoint 왜 답변해주시는분이 없을까요 .. [10] 2015.01.05 by 꾸링
ekrnfkdi out of memory로 고생하고있습니다 ㅜㅜ [1] file 2015.01.05 by 꾸링
꾸링 첨부파일이 매우 많은 사이트입니다..  
홍찬 /xe/ 이놈 안쓰고도 접근하게 하는법좀요 ㅠ [7] 2015.01.05 by imagineshop
verysery 메뉴 이름이 수정이 안되요;; [1] file 2015.01.05 by verysery
알바생2 레이아웃 info.xml의 <menus>에서 사이트맵의 내용을 어떻게 다루는지 궁금합니다. [3] file 2015.01.05 by 키스투엑스이
ahiku input size over than config in php.ini [2] file 2015.01.05 by SUHONE
기만1988 컨텐츠판매 하려면 등록을 어디에 해야 되나요? [1] 2015.01.05 by sojumeister
멤논 제로보드 주소설정 [1] 2015.01.05 by sojumeister
2-COIN AWS - 사용자 IP 인식이 안됩니다. 전부 127.0.0.1 로 나오는 듯 [20] file 2015.01.05 by 2-COIN
은색바람 왜 폰트가 적용이 안되는지.. [3] 2015.01.05 by sojumeister
DingGGu Ruleset 사용시 regex