Home 게시판 커뮤니티 Q&A iG:Syntax Hiliter 문의드립니다

20개 답변, 3 voices Last updated by Avatar of larsulrichlarsulrich 18 years, 1 month 전
  • Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1379

    이 질문에 대한 답변도
    http://wordpress.co.kr/forum/viewtopic.php?t=198
    이 글과 관련이 있는듯 합니다.

    제가 larsulrich님 블로그에서 소스를 살펴보니.

    http://도메인주소/wp-content/plugins/ig_syntax_hilite/css/syntax_hilite_css.css

    이런식으로 css주소가 정의되어 있더군요..

    이 경우는 ployglot에서의 답변과 반대로 get_settings(‘siteurl’)을 사용하셔야합니다.

    플러그인 파일의 30번째줄쯤에 있는

    $igsyntax_hiliter_path = get_settings('home')

    부분을

    $igsyntax_hiliter_path = get_settings('siteurl')

    로 바꾸신뒤 확인해보세요.

    블로그 접속주소[get_settings(‘home’)]는 "http://도메인주소"형태로 바뀌었지만 파일들의 경로는 "http://도메인주소/워드프레스설치폴더"의 아래에 있기때문입니다.

    블로그 내에서 특정링크나 페이지에 접속하기위한 주소를 표현할때는 get_settings(‘home’)을 사용하고, 워드프레스 내에있는 파일들의 주소(경로)를 표현할때는 get_settings(‘siteurl’)을 사용하게 됩니다.

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1380

    http://blog.aeronova.org/2006/04/07/wp-plugin-igsyntax-hiliter/
    aeronova님의 블로그글을 참조하여 한번 설치해 보았습니다

    그런데 저는 http://larsulrich.skynet.co.kr/?page_id=311식으로 보여지는군요

    syntax_hilite_css.css파일은 aeronova님처럼 변경했습니다

    aeronova님 처럼 보여지게 하려면 어떻게 해야하는지요.

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1390

    http://blog.aeronova.org/2006/04/07/wp-plugin-igsyntax-hiliter/
    aeronova님의 블로그글을 참조하여 한번 설치해 보았습니다

    그런데 저는 http://larsulrich.skynet.co.kr/?page_id=311식으로 보여지는군요

    syntax_hilite_css.css파일은 aeronova님처럼 변경했습니다

    aeronova님 처럼 보여지게 하려면 어떻게 해야하는지요.

    Avatar of aeronovaaeronova
    Participant
    @aeronova
    #1381

    음.. 혹시 line number 이런 거 말씀하시는 건가요?
    admin으로 login하셔서 Options>>iG:Syntax Hiliter를 보면 line number를 제어할 수 있습니다. 이거 말고 code가 정렬이 안되어 보이는 것은… 그냥 space를 일일이 맞춰주는 수 밖에 없는 것 같습니다.

    Avatar of aeronovaaeronova
    Participant
    @aeronova
    #1391

    음.. 혹시 line number 이런 거 말씀하시는 건가요?
    admin으로 login하셔서 Options>>iG:Syntax Hiliter를 보면 line number를 제어할 수 있습니다. 이거 말고 code가 정렬이 안되어 보이는 것은… 그냥 space를 일일이 맞춰주는 수 밖에 없는 것 같습니다.

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1382

    아 그건 옵션에서 조절할수 있더만요^^;

    aeronova님 블로그보면 가로바 세로바가 보이고 깔끔하던데 그걸 어떻게 하는지 모르겠습니다 X-D

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1392

    아 그건 옵션에서 조절할수 있더만요^^;

    aeronova님 블로그보면 가로바 세로바가 보이고 깔끔하던데 그걸 어떻게 하는지 모르겠습니다 X-D

    Avatar of GosingaGosinga
    Participant
    @Gosinga
    #1383

    ig_syntax_hilite/syntax_hilite_css.css 파일에서 .syntax_hilite 클래스의 overflow 속성으로 조정합니다. 가령 다음처럼요:

    .syntax_hilite {
            overflow: auto;
    }

    overflow의 속성들에 대해서는 W3C의 http://www.w3schools.com/css/pr_pos_overflow.asp를 참조하세요.

    그리고 overflow의 속성과 연계된 것으로 white-space 속성이 있습니다. 이 속성도 아마 적절하게 설정하셔야 할 겁니다. 다음처럼요:

    .syntax_hilite {
            white-space: nowrap;
            overflow: auto;

    위의 CSS 설정 사항은 "한 줄의 코드가 길더라도 그 코드 줄을 접지 말고 주욱 펴되, 컨테이너(div, table 등)의 넓이를 초과하면 네비게이션 바를 자동으로 나타나게 하라"는 내용이 되겠습니다.

    Avatar of GosingaGosinga
    Participant
    @Gosinga
    #1393

    ig_syntax_hilite/syntax_hilite_css.css 파일에서 .syntax_hilite 클래스의 overflow 속성으로 조정합니다. 가령 다음처럼요:

    .syntax_hilite {
            overflow: auto;
    }

    overflow의 속성들에 대해서는 W3C의 http://www.w3schools.com/css/pr_pos_overflow.asp를 참조하세요.

    그리고 overflow의 속성과 연계된 것으로 white-space 속성이 있습니다. 이 속성도 아마 적절하게 설정하셔야 할 겁니다. 다음처럼요:

    .syntax_hilite {
            white-space: nowrap;
            overflow: auto;

    위의 CSS 설정 사항은 "한 줄의 코드가 길더라도 그 코드 줄을 접지 말고 주욱 펴되, 컨테이너(div, table 등)의 넓이를 초과하면 네비게이션 바를 자동으로 나타나게 하라"는 내용이 되겠습니다.

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1384

    잘 안되네요 :-//

    .syntax_hilite, li .syntax_hilite {
       padding:3px 3px 10px 8px; border:1px solid #FFFFFF; background-color:#FEFEFE;
       font-size:13px; font-family:'Courier New',Courier,monospace;
       /* comment the line below to remove scrolling in code boxes */
       overflow:auto; white-space:nowrap;
    }
    /* change this line to set the width of code box */
    .syntax_hilite { width:460px; }
    /* change this line to set the width of code box in a list */
    li .syntax_hilite { width:420px; }
    .igBar, li .igBar {
       background-color:#E8E8E8; font-family:courier,arial,verdana;
       border-left:1px solid #EEEEEE; border-top:1px solid #EEEEEE;
       border-right:1px solid #FFFFFF;
    }
    /* change this line to set the width of plain text bar above code box */
    .igBar { width:471px; }
    /* change this line to set the width of plain text bar above code box in a list */
    li .igBar { width:431px; }
    .igBar a, .igBar a:hover {
       margin:0px 5px 0px 10px; font-weight:bold; color:#000000;
       text-decoration:none;
    }
    .syntax_hilite .langName { color:#000000; font-weight:bold; }
    .syntax_hilite textarea { margin:0px -5px -2px 0px; border:none; }

    저의 syntax_hilite_css.css 내용입니다
    Gosinga님께서 말씀하신부분은 이미 적용되어있는것 같습니다

    워드프레스 2.0.2 이고 영문판이며 디폴트 테마입니다

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1394

    잘 안되네요 :-//

    .syntax_hilite, li .syntax_hilite {
       padding:3px 3px 10px 8px; border:1px solid #FFFFFF; background-color:#FEFEFE;
       font-size:13px; font-family:'Courier New',Courier,monospace;
       /* comment the line below to remove scrolling in code boxes */
       overflow:auto; white-space:nowrap;
    }
    /* change this line to set the width of code box */
    .syntax_hilite { width:460px; }
    /* change this line to set the width of code box in a list */
    li .syntax_hilite { width:420px; }
    .igBar, li .igBar {
       background-color:#E8E8E8; font-family:courier,arial,verdana;
       border-left:1px solid #EEEEEE; border-top:1px solid #EEEEEE;
       border-right:1px solid #FFFFFF;
    }
    /* change this line to set the width of plain text bar above code box */
    .igBar { width:471px; }
    /* change this line to set the width of plain text bar above code box in a list */
    li .igBar { width:431px; }
    .igBar a, .igBar a:hover {
       margin:0px 5px 0px 10px; font-weight:bold; color:#000000;
       text-decoration:none;
    }
    .syntax_hilite .langName { color:#000000; font-weight:bold; }
    .syntax_hilite textarea { margin:0px -5px -2px 0px; border:none; }

    저의 syntax_hilite_css.css 내용입니다
    Gosinga님께서 말씀하신부분은 이미 적용되어있는것 같습니다

    워드프레스 2.0.2 이고 영문판이며 디폴트 테마입니다

    Avatar of GosingaGosinga
    Participant
    @Gosinga
    #1385

    iG_Syntax_Hiliter가 3.5로 버전업이 되면서 파일트리가 변경되었네요.
    제가 사용하는 3.1 버전은 css 폴더가 별도로 없었는데,
    그 이후에 css 폴더를 별도로 만들고 그 안에 css 파일을 넣어두었어요.

    그래서, larsulrich 님께서 사용하시는 버전에서는 syntax_hilite_css.css 파일을
    /wp-content/plugins/ig_syntax_hilite/css/syntax_hilite_css.css 에 두셔야 합니다.

    님의 블로그로 가 보니까, 이 위치에 css 파일이 존재하지 않습니다.

    파이어폭스의 Web Developer Toolbar를 이용해서
    larsulrich 님의 블로그에 제가 말씀드린 코드를 적용해 보니까 잘 됩니다.

    Avatar of GosingaGosinga
    Participant
    @Gosinga
    #1395

    iG_Syntax_Hiliter가 3.5로 버전업이 되면서 파일트리가 변경되었네요.
    제가 사용하는 3.1 버전은 css 폴더가 별도로 없었는데,
    그 이후에 css 폴더를 별도로 만들고 그 안에 css 파일을 넣어두었어요.

    그래서, larsulrich 님께서 사용하시는 버전에서는 syntax_hilite_css.css 파일을
    /wp-content/plugins/ig_syntax_hilite/css/syntax_hilite_css.css 에 두셔야 합니다.

    님의 블로그로 가 보니까, 이 위치에 css 파일이 존재하지 않습니다.

    파이어폭스의 Web Developer Toolbar를 이용해서
    larsulrich 님의 블로그에 제가 말씀드린 코드를 적용해 보니까 잘 됩니다.

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1386

    :-//

    Gosinga Escribi

    Avatar of larsulrichlarsulrich
    Participant
    @larsulrich
    #1396

    :-//

    Gosinga Escribi

15 글 보임 - 1에서 15 까지 (총 21 중에서)
  • 답변은 로그인 후 가능합니다.