추천 클릭시 변수값하나더 추가해서 good.php에 넘기기?

추천 클릭시 변수값하나더 추가해서 good.php에 넘기기?

QA

추천 클릭시 변수값하나더 추가해서 good.php에 넘기기?

본문

예를들어 aaaa라는 변수에 들어있는 값을 아래 소소에 적용해서

 

/bbs/good.php 까지 보내고 싶은데 어디다 추가하면 되나요?

 

 

    // 추천, 비추천
    $("#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 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("이 글을 비추천하셨습니다.");
                    $tx.fadeIn(200).delay(2500).fadeOut(200);
                } else {
                   $tx.text("이 글을 추천하셨습니다.");
                    $tx.fadeIn(200).delay(2500).fadeOut(200);
                }
            }
        }, "json"
    );
}
 

 

 

이 질문에 댓글 쓰기 :

답변 1

skin\board\basic\view.skin.php 파일에서 버튼 부분에 보면 아래의 소스가 있습니다.

<a href="<?php echo $good_href.'&'.$qstr ?>"

이 소스보다 위쪽에 아래와 같은 소스를 추가해주면 됩니다.

$qstr .= '&변수명=값';

답변을 작성하시기 전에 로그인 해주세요.
전체 123,639 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT