토트 사용자포럼
글 수 619

스킨상에서 스크립트 사용에 대해

질문 조회 수 4142 추천 수 0 2010.07.28 01:41:46

예전에 직접 만든 스킨을 쓰다 고치고 싶은 부분이 있어, 수정하고 저장하기 버튼 누르니  [스킨에서 사용할수없는 구문이 있습니다] 과 같은 메시지 팝업창이 뜨면서 스킨 수정이 안되는데, 아래의 스크립트 때문에 안되는걸 알아냈습니다.


<script type="text/javascript">
<!--
jQuery.noConflict();
jQuery(document).ready(function($){
     
    $("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
   
    $("#topnav li").each(function() { //For each list item...
        var linkText = $(this).find("a").html(); //Find the text inside of the a tag
        $(this).find("span").show().html(linkText); //Add the text in the span tag
    });
   
    $("#topnav li").hover(function() {    //On hover...
        $(this).find("span").stop().animate({
            marginTop: "-40" //Find the span tag and move it up 40 pixels
        }, 250);
    } , function() { //On hover out...
        $(this).find("span").stop().animate({
            marginTop: "0" //Move the span back to its original state (0px)
        }, 250);
    });
   

    $("p.plus_plus").click(function() { //When trigger is clicked...
       
        //Following events are applied to the subnav itself (moving subnav up and down)
        $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

        $(this).parent().hover(function() {
        }, function(){   
            $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
        });

    });

  //Get all the LI from the #tabMenu UL
  $('#tabMenu > li').click(function(){
       
    //remove the selected class from all LI   
    $('#tabMenu > li').removeClass('selected');
   
    //Reassign the LI
    $(this).addClass('selected');
   
    //Hide all the DIV in .boxBody
    $('.boxBody div.section').slideUp('1500');
   
    //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
    $('.boxBody div.section:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500');
   
  }).mouseover(function() {

    //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest   
    $(this).addClass('mouseover');
    $(this).removeClass('mouseout');  
   
  }).mouseout(function() {
   
    //Add and remove class
    $(this).addClass('mouseout');
    $(this).removeClass('mouseover');   
   
  });

  //Mouseover effect for Posts, commentaires, Famous Posts and Random Posts menu list.
  $('.boxBody div div div li').click(function(){
    window.location = $(this).find("a").attr("href");
  }).mouseover(function() {
    $(this).css('backgroundColor','#decfb2');
  }).mouseout(function() {
    $(this).css('backgroundColor','');
  });     
   
$('div#contenu div.feedback').hide();
$('div#contenu div.feedback.reply').show();
$('div#contenu ul.comMenu li:first').addClass('active');
$('div#contenu ul.comMenu li a').click(function(){
$('div#contenu ul.comMenu li').removeClass('active');
$(this).parent().addClass('active');
var currentTab = $(this).attr('href');
$('div#contenu div.feedback').hide();
$(currentTab).show();
return false;
});

$('.backtotop').click(function(){
$( 'html, body' ).animate( { scrollTop: 0 }, 'slow' );
});

});
//-->
</script>

해당 소스는 예전부터 스킨.html내에 원래 있었고 잘 작동했었는데, 수정하기가 안되는걸 보니 thoth쪽에서 쓸수없도록 막은 소스가 있는 모양입니다.

위 소스중 쓰면 안된다던가 thoth에 맞게 jquery를 고쳐써야하는 부분이 있으면 좀 알려주세요.

만드는 도중에 안되면 모르겠는데, 잘 쓰던 스킨이 수정자체가 안되서 현재는 thoth 기본 스킨으로 되어있습니다.


감사합니다.

Share

댓글 '3'

profile

[레벨:2]Breton

2010.07.28 01:43:30

textyle에서도 잘 작동하는 스킨인데, 어찌해야될지 모르겠네요 ㅠㅠ


---- 수정----

아래의 코드 때문에 스킨 수정/업로드가 안되는걸 알아냈습니다.

.mouseover(function() {

    //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest   
    $(this).addClass('mouseover');
    $(this).removeClass('mouseout');  
   
  }).mouseout(function() {
   
    //Add and remove class
    $(this).addClass('mouseout');
    $(this).removeClass('mouseover');   
   
  });

  //Mouseover effect for Posts, commentaires, Famous Posts and Random Posts menu list.
  $('.boxBody div div div li').click(function(){
    window.location = $(this).find("a").attr("href");
  }).mouseover(function() {
    $(this).css('backgroundColor','#decfb2');
  }).mouseout(function() {
    $(this).css('backgroundColor','');
  });


mouse 관련 코드를 막으신거같은데, 본문내에서 쓰는걸 제외하고 스킨내에서 쓰인 경우에도 보안에 위협이 되나보네요.

profile

[레벨:30]id: thoth starter

2010.07.29 09:45:19

네 보안상 위협이 될 수 있는 부분에 대해서는 막고 있는데, 아마 그런 문제인 것으로 보입니다.


이는 개발자가 자세한 답변을 해 드리겠습니다.

profile

[레벨:2]Breton

2010.07.29 19:32:29

답변 감사합니다.

댓글이 없길레 글 잘못 쓴 줄 알고 지울까 생각했거든요 ^^;

문서 첨부 제한 : 0Byte/ 50.00MB
파일 제한 크기 : 10.00MB
List of Articles
번호 제목 글쓴이 날짜 조회 수
444 질문 믹시, 올블로그 등 등록에 대해 [1] [레벨:2]Shakehaze 2010-08-01 4352
443 알림 이번 주 토트 초대장 100장 마구 뿌려 봅니다 [7] [레벨:30]id: thoth starter 2010-07-29 6867
» 질문 스킨상에서 스크립트 사용에 대해 [3] [레벨:2]Breton 2010-07-28 4142
441 알림 토트 초대장 5장 오픈 합니다. 필요하신 분 사용하세요 [3] [레벨:2]제이허트 2010-07-24 6415
440 버그 블로그 프로필 사진이 안변하네요... [2] [레벨:1]참치 2010-07-22 4769
439 질문 데이터 이전 오류? imagefile [6] [레벨:3]차니나라 2010-07-22 4414
438 제안 불법홍보 도배블로그좀 차단해주세여 [2] [레벨:0]배즈어 2010-07-21 4915
437 질문 데이터 백업 신청 결과 미흡 secret [1] [레벨:3]차니나라 2010-07-21 4
436 제안 토트 메타에 광고용 사이트 필터링은 안되는건가요 [2] [레벨:2]Shakehaze 2010-07-18 4788
435 질문 토트 메인화면 왜 이 모양인가요.. [1] [레벨:1]TmaKing 2010-07-18 3980
434 질문 블로그 삭제 부탁드립니다. [1] [레벨:0]antirocker|백수씨 2010-07-17 3622
433 질문 mixsh 에 블로그 등록 안되는 문제 해결 안됬나요? file [3] [레벨:4]거시기 2010-07-14 3772
432 제안 스킨이 좀 더 많아지면 좋겠어요.. >.,<; [1] [레벨:4]misol 2010-07-13 3957
431 질문 개인도메인사용 [1] [레벨:1]우소스키 2010-07-13 3710
430 질문 설치형 텍스타일에 신디케이션적용이 가능한가요? [2] [레벨:0]투스투스 2010-07-12 4172
429 알림 토트 가입 초대장 100장, 3주만에 쏩니다. 하이브리드를 체험해 보세요! [8] [레벨:30]id: thoth starter 2010-07-12 6119
428 버그 카테고리에 나타나는 포스팅 카운팅. [1] [레벨:5]몽구 2010-07-12 4060
427 질문 네이버 이웃커넥트 설치관련 문의 [레벨:1]이진적사고 2010-07-08 3690
426 질문 도메인 연결에 대해서 [1] [레벨:2]데미나인 2010-07-07 3550
425 제안 캐시파일 재생성이나 세션정리는... [1] [레벨:2]데미나인 2010-07-06 4325
424 버그 토트 DB에 문제.. 저만 이런가요...?? imagefile [4] [레벨:2]한성민 2010-07-03 4199
423 버그 토트가 엄청 느려졌어요 [5] [레벨:13]모찌 2010-07-03 4650
422 질문 검색/비검색 [1] [레벨:0]Jyun 2010-07-01 3881
421 제안 thoth App. [2] [레벨:1]id: GLaDOS 2010-06-30 4838
420 질문 지난번에 로그인 아이디 변경 문의드렸던 사람입니다. secret [3] [레벨:0]黑客 2010-06-29 6