제목 옆에 넣어둔 해시태그가 지금 테스트 해보니
복사/이동이 안되네요 ㅜㅜ
타게시판으로 이동시에 해시태그 플러그인 해놓은것까지 같이 이동을 시키고 싶은데
같이 안따라옵니다
어떻게 해야될까여?
move.update.php에 어떻게 insert 시켜야될지 모르겠어요 ;;
view.tag.php
Copy
<?phpif (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!$board['bo_use_tag']) return; if(!sql_query(" DESC ".COMP_TAG, false)) { $que = " create table ".COMP_TAG."( ct_idx int not null auto_increment, bo_table varchar(20) not null default '' comment '게시판코드', wr_id int not null default '0' comment '게시판시퀀스', ct_tag varchar(100) not null default '' comment '태그', ct_ip varchar(25) not null default '' comment 'ip', ct_regdate datetime not null default '0000-00-00 00:00:00', primary key( ct_idx ) , index ".COMP_TAG."_index1(ct_tag) ) comment '태그테이블'"; sql_query( $que, false );} $que = "alter table ".$write_table." add column tags varchar(200) default '' comment '태그'";sql_query( $que , false ); $arrtag = explode(",", $view['tags']); if( $view['tags'] ){?>
view.tag.update.php
Copy
<?phpif (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!$board['bo_use_tag']) return; if( $wr_id && $_POST['tags'] ){ $tags = $_POST['tags']; $que = "update ".$write_table." set tags = '".$tags."' where wr_id = '".$wr_id."'"; sql_query( $que , false ); $arrtag = explode(",", $tags); foreach( $arrtag as $key => $val ){ $val = trim($val); $que = "insert into ".COMP_TAG." set bo_table = '$bo_table', wr_id = '$wr_id', ct_tag = '".$val."', ct_ip = '".$_SERVER['REMOTE_ADDR']."', ct_regdate = now()"; sql_query( $que , false ); }}?>
define('COMP_TAG', 'comp_tag'); //태그테이블
//tag 사용여부
$board['bo_use_tag'] = true;
?>
//tag 사용여부
$board['bo_use_tag'] = true;
?>
설치한 태그플러그인의 대략적인 코드를 적었습니다
게시판 list 파일에서 제목 옆에다가
<span class="tag">
<?php
// 해시태그 //
$tags = explode(',', $list[$i]['tags']);
foreach($tags as $val){
$val = trim($val);
?>
<?php echo $val?>
<?php } ?>
</span>
이 코드를 넣고 불러와지는데요 어떻게 방법이 없을까요?
도움좀 부탁드릴게요~
답변 2개
채택된 답변
+20 포인트
빨간망토의비밀
2016-11-02 (수) 09:55:01
별도 태그테이블에 태그들을 관리하고 있네요.
따라서, 게시물 이동시에 테그도 같이 이동 할려면, 태그들도 새로운 bo_table, wr_id 값을 변화시켜주어야 합니다.
기존 게시물의 값이 변경이 되니까요.
따라서, 게시물 이동시에 테그도 같이 이동 할려면, 태그들도 새로운 bo_table, wr_id 값을 변화시켜주어야 합니다.
기존 게시물의 값이 변경이 되니까요.
2016-11-01 (화) 23:54:22
해당 플러그인 제작자분 활동중이십니다. 쪽지 날려 보세요...
답변을 작성하려면 로그인이 필요합니다.