대충 이렇게 나오는 거를 Pilot Badge, 폴더명으로는 Signatures에 들어 있다.


가입자가 한글로 가입시에는 저 폰트들이 다 깨져 보이기 때문에 이를 수정하는 방법을 알고자 한다.


일단 먼저 저거는 core/common 쪽을 만져야 가능한 일이다.


접속 : /www/core/common/PilotData.class.php


다음과 같은 코드 찾기, 954줄 부터...


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?
public function generateSignature($pilotid)
    {
        $pilot = self::getPilotData($pilotid);
        $pilotcode = self::getPilotCode($pilot->code, $pilot->pilotid);
        
        if(Config::Get('TRANSFER_HOURS_IN_RANKS'=== true)
        {
            $totalhours = $pilot->totalhours + $pilot->transferhours;
        }
        else
        {
            $totalhours = $pilot->totalhours;
        }
        
        # Configure what we want to show on each line
        $output = array();
        $output[] = $pilotcode.' '$pilot->lastname.''.$pilot->first;
        $output[] = $pilot->rank.', '.$pilot->hub;
        $output[] = '누적 비행횟수 : ' . $pilot->totalflights.'회';
        $output[] = '누적 비행시간 : ' . $totalhours.'시간';
        
        if(Config::Get('SIGNATURE_SHOW_EARNINGS'== true)
        {
            $output[] = '현재 자금 : ' . $pilot->totalpay;
        }
?>
cs


지금 한글로 적어놓은 부분들은 다 영어로 되어 있을 것이다.

적절히, 맛갈나게 한글로 수정하여 UTF-8로 인코딩을 변경 후 저장, 업로드 한다.


접속 : /www/core/app.config.php


다음과 같은 코드 찾기, 170번째 줄 부터...


1
2
3
4
5
6
7
8
9
10
11
12
13
<?
# Options for the signature that's generated 
Config::Set('SIGNATURE_TEXT_COLOR''#000');
Config::Set('SIGNATURE_USE_CUSTOM_FONT'true);
Config::Set('SIGNATURE_FONT_PATH', SITE_ROOT.'/lib/fonts/tahoma.ttf');
Config::Set('SIGNATURE_FONT_SIZE''10');
Config::Set('SIGNATURE_X_OFFSET''10');
Config::Set('SIGNATURE_Y_OFFSET''17');
Config::Set('SIGNATURE_FONT_PADDING'4); 
Config::Set('SIGNATURE_SHOW_EARNINGS'true);
Config::Set('SIGNATURE_SHOW_RANK_IMAGE'true);
Config::Set('SIGNATURE_SHOW_COPYRIGHT'true);
?>
cs



이떄 tahoma.ttf는 영문전용 폰트이므로 한글 작성시 네모난 칸으로 표시되게 된다.


다운로드 및 배치 : 적절한 폰트(ex. 나눔고딕) ttf 파일을 다운로드 후 /www/lib/fonts에 배치


수정 : 본문 기준 5번째 줄의 tahoma.ttf를 본인이 배치한 폰트이름으로 수정 및 저장하고 업로드



+ Recent posts