좋아요(추천) / 싫어요(비추천) 보이기 정보
좋아요(추천) / 싫어요(비추천) 보이기관련링크
본문
게시글에 좋아요(추천)과 싫어요(비추천)을 누른 회원정보 보는 방법입니다.
ajax 로 개선하면 얼마나 좋을까 하고 생각만 하고 있습니다.
추천/비추천 누르면 여기자료도 ajax 로 업데이트가 ... 되었으면 좋겠지만 ... 실력이 미천하여 처리를 못하네요
재능 기부 하실분 없나요? ^^;;
그누보드5 / skin / board / basic / view.skin.php 적당한 위치에 아래 내용을 추가합니다.
<?php
// 추천 아이디 조회
$sql_good = " select count(distinct `bg_id`) as `cnt` from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='good' ";
$row_good = sql_fetch($sql_good);
$good_count = $row_good['cnt'];
if ($good_count>0) {
?>
<div style="background:#f5f5f5; padding:10px 15px;">
<h4 style="padding:0 0 15px 0; font-size:1.2em;"> 추천리스트</h4>
<p class="list-group-item-text">
<?php
// 추천, 비추천 내용이 있으면 표시
$sql_good = " select * from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='good' ";
$result_good = sql_query($sql_good);
for ($i_good=0,$j_good=1; $row_good=sql_fetch_array($result_good); $i_good++,$j_good++) {
$sql_good2 = " select mb_nick from ".$g5['member_table']." where mb_id='".$row_good["mb_id"]."' ";
$row_good2=sql_fetch_array(sql_query($sql_good2));
echo "<span>".$row_good2["mb_nick"] ."</span> ";
}
?>
</p>
</div>
<?php
} // 추천 아이디 조회 끝
// 비추천 아이디 조회
$sql_nogood = " select count(distinct `bg_id`) as `cnt` from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='nogood' ";
$row_nogood = sql_fetch($sql_nogood);
$nogood_count = $row_nogood['cnt'];
if ($nogood_count>0) {
?>
<div style="background:#f5f5f5; padding:10px 15px;">
<h4 style="padding:0 0 15px 0; font-size:1.2em;"> 비추천리스트</h4>
<p class="list-group-item-text">
<?php
// 추천, 비추천 내용이 있으면 표시
$sql_nogood = " select * from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='nogood' ";
$result_nogood = sql_query($sql_nogood);
for ($i_nogood=0,$j_nogood=1; $row_nogood=sql_fetch_array($result_nogood); $i_nogood++,$j_nogood++) {
$sql_nogood2 = " select mb_nick from ".$g5['member_table']." where mb_id='".$row_nogood["mb_id"]."' ";
$row_nogood2=sql_fetch_array(sql_query($sql_nogood2));
echo "<span>".$row_nogood2["mb_nick"] ."</span> ";
}
?>
</p>
</div>
<?php
} // 비추천 아이디 조회 끝
?>
ajax 로 개선하면 얼마나 좋을까 하고 생각만 하고 있습니다.
추천/비추천 누르면 여기자료도 ajax 로 업데이트가 ... 되었으면 좋겠지만 ... 실력이 미천하여 처리를 못하네요
재능 기부 하실분 없나요? ^^;;
그누보드5 / skin / board / basic / view.skin.php 적당한 위치에 아래 내용을 추가합니다.
<?php
// 추천 아이디 조회
$sql_good = " select count(distinct `bg_id`) as `cnt` from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='good' ";
$row_good = sql_fetch($sql_good);
$good_count = $row_good['cnt'];
if ($good_count>0) {
?>
<div style="background:#f5f5f5; padding:10px 15px;">
<h4 style="padding:0 0 15px 0; font-size:1.2em;"> 추천리스트</h4>
<p class="list-group-item-text">
<?php
// 추천, 비추천 내용이 있으면 표시
$sql_good = " select * from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='good' ";
$result_good = sql_query($sql_good);
for ($i_good=0,$j_good=1; $row_good=sql_fetch_array($result_good); $i_good++,$j_good++) {
$sql_good2 = " select mb_nick from ".$g5['member_table']." where mb_id='".$row_good["mb_id"]."' ";
$row_good2=sql_fetch_array(sql_query($sql_good2));
echo "<span>".$row_good2["mb_nick"] ."</span> ";
}
?>
</p>
</div>
<?php
} // 추천 아이디 조회 끝
// 비추천 아이디 조회
$sql_nogood = " select count(distinct `bg_id`) as `cnt` from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='nogood' ";
$row_nogood = sql_fetch($sql_nogood);
$nogood_count = $row_nogood['cnt'];
if ($nogood_count>0) {
?>
<div style="background:#f5f5f5; padding:10px 15px;">
<h4 style="padding:0 0 15px 0; font-size:1.2em;"> 비추천리스트</h4>
<p class="list-group-item-text">
<?php
// 추천, 비추천 내용이 있으면 표시
$sql_nogood = " select * from ".$g5['board_good_table']." where bo_table='".$bo_table."' and wr_id='".$wr_id."' and bg_flag='nogood' ";
$result_nogood = sql_query($sql_nogood);
for ($i_nogood=0,$j_nogood=1; $row_nogood=sql_fetch_array($result_nogood); $i_nogood++,$j_nogood++) {
$sql_nogood2 = " select mb_nick from ".$g5['member_table']." where mb_id='".$row_nogood["mb_id"]."' ";
$row_nogood2=sql_fetch_array(sql_query($sql_nogood2));
echo "<span>".$row_nogood2["mb_nick"] ."</span> ";
}
?>
</p>
</div>
<?php
} // 비추천 아이디 조회 끝
?>
추천
2
2
댓글 9개
좋아요^^
감사합니다.
해볼께요...감사합니다
넵~~
감사합니다 ㅎㅎ
감사합니다.
그냥 php 버젼에서 사용하니 잘 나옵니다...감사합니다
이윰3는 언더바를 사용해서 안나옵니다 ^^ 더 연구를 해보겠습니다
이윰3는 언더바를 사용해서 안나옵니다 ^^ 더 연구를 해보겠습니다
이윰빌더는 다른가보네요. 저것은 순정 그누보드를 이용해 작업한거라서...
네 그런 것 같습니다...아무튼 들여다 보면서 이윰에 적용시킬 방법을 찾아보겠습니다
감사드립니다
감사드립니다