예전에 직접 만든 스킨을 쓰다 고치고 싶은 부분이 있어, 수정하고 저장하기 버튼 누르니 [스킨에서 사용할수없는 구문이 있습니다] 과 같은 메시지 팝업창이 뜨면서 스킨 수정이 안되는데, 아래의 스크립트 때문에 안되는걸 알아냈습니다.
<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 기본 스킨으로 되어있습니다.
감사합니다.
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 관련 코드를 막으신거같은데, 본문내에서 쓰는걸 제외하고 스킨내에서 쓰인 경우에도 보안에 위협이 되나보네요.