=(G4_IS_MOBILE?outlogin('basic'):outlogin('basic')); // 외부 로그인 ?>
- =(G4_IS_MOBILE?poll('basic'):poll('basic')); // 설문조사 ?>
if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) {?>
=$g4['title']?>
}?>
diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php
index bdbf80ca2..2b70d4351 100644
--- a/mobile/skin/board/basic/view.skin.php
+++ b/mobile/skin/board/basic/view.skin.php
@@ -137,15 +137,21 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
=get_view_thumbnail($view['content']);?>
//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
-
if ($is_signature) { ?>
=$signature?>
} ?>
if ($scrap_href || $good_href || $nogood_href) { ?>
} else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
@@ -201,6 +207,18 @@ $(function() {
window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
+
+ // 추천, 비추천
+ $("#good_button, #nogood_button").click(function() {
+ var $tx;
+ if(this.id == "good_button")
+ $tx = $("#bo_v_act_good");
+ else
+ $tx = $("#bo_v_act_nogood");
+
+ excute_good(this.href, $(this), $tx);
+ return false;
+ });
});
function view_image_resize()
@@ -218,4 +236,27 @@ function view_image_resize()
}
});
}
+
+function excute_good(href, $el, $tx)
+{
+ $.post(
+ href,
+ { js: "on" },
+ function(data) {
+ if(data.error) {
+ alert(data.error);
+ return false;
+ }
+
+ if(data.count) {
+ $el.find("strong").text(number_format(String(data.count)));
+ if($tx.attr("id").search("nogood") > -1) {
+ $tx.text("이 글을 비추천하셨습니다.");
+ } else {
+ $tx.text("이 글을 추천하셨습니다.");
+ }
+ }
+ }, "json"
+ );
+}
\ No newline at end of file
diff --git a/mobile/skin/board/gallery/view.skin.php b/mobile/skin/board/gallery/view.skin.php
index 79ac40243..2fdc92642 100644
--- a/mobile/skin/board/gallery/view.skin.php
+++ b/mobile/skin/board/gallery/view.skin.php
@@ -1,4 +1,4 @@
-
+
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
?>
@@ -14,10 +14,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
게시물 정보
- 작성자 =$view['name']?> if ($is_ip_view) { echo " ($ip)"; } ?>
- 작성일=date("y-m-d H:i", strtotime($view['wr_datetime']))?>
- 조회=number_format($view['wr_hit'])?>회
- 댓글=number_format($view['wr_comment'])?>건
+ 작성자 =$view['wr_name']?> if ($is_ip_view) { echo " ($ip)"; } ?>
+ 작성일 =date("y-m-d H:i", strtotime($view['wr_datetime']))?>
+ 조회 =number_format($view['wr_hit'])?>회
+ 댓글 =number_format($view['wr_comment'])?>건
@@ -137,15 +137,20 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
=get_view_thumbnail($view['content']);?>
//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
-
if ($is_signature) { ?>
=$signature?>
} ?>
if ($scrap_href || $good_href || $nogood_href) { ?>
} else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
@@ -201,6 +206,18 @@ $(function() {
window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
+
+ // 추천, 비추천
+ $("#good_button, #nogood_button").click(function() {
+ var $tx;
+ if(this.id == "good_button")
+ $tx = $("#bo_v_act_good");
+ else
+ $tx = $("#bo_v_act_nogood");
+
+ excute_good(this.href, $(this), $tx);
+ return false;
+ });
});
function view_image_resize()
@@ -218,4 +235,27 @@ function view_image_resize()
}
});
}
+
+function excute_good(href, $el, $tx)
+{
+ $.post(
+ href,
+ { js: "on" },
+ function(data) {
+ if(data.error) {
+ alert(data.error);
+ return false;
+ }
+
+ if(data.count) {
+ $el.find("strong").text(number_format(String(data.count)));
+ if($tx.attr("id").search("nogood") > -1) {
+ $tx.text("이 글을 비추천하셨습니다.");
+ } else {
+ $tx.text("이 글을 추천하셨습니다.");
+ }
+ }
+ }, "json"
+ );
+}
\ No newline at end of file
diff --git a/mobile/tail.php b/mobile/tail.php
index 9d29cad83..4bd45acad 100644
--- a/mobile/tail.php
+++ b/mobile/tail.php
@@ -22,6 +22,10 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
+=(G4_IS_MOBILE?poll('basic'):poll('basic')); // 설문조사 ?>
+
+
+
@@ -253,9 +252,9 @@ function excute_good(href, $el, $tx)
if(data.count) {
$el.find("strong").text(number_format(String(data.count)));
if($tx.attr("id").search("nogood") > -1) {
- $tx.text("이 글을 비추천하셨습니다.").css("display", "inline");
+ $tx.text("이 글을 비추천하셨습니다.");
} else {
- $tx.text("이 글을 추천하셨습니다.").css("display", "inline");
+ $tx.text("이 글을 추천하셨습니다.");
}
}
}, "json"
diff --git a/skin/board/gallery/view.skin.php b/skin/board/gallery/view.skin.php
index 14c94a273..277b96035 100644
--- a/skin/board/gallery/view.skin.php
+++ b/skin/board/gallery/view.skin.php
@@ -137,7 +137,6 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
} ?>
@@ -146,11 +145,11 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
if ($scrap_href) { ?>