웹마스터 팁

원하는 확장변수 번호를 지정해서 최근 게시물 위젯에 적용하기 위한 간단 팁입니다.

최근문서위젯인 newest_document 내용을 약간 수정하셔서 사용하시면 됩니다.

스킨은 default스킨을 이용했습니다.

<적용예제 미리보기>

[스터디하자 - studyhaja.kr -] 

 

1. xe->widegets->newest_document-> newest_document.class.php :

약70번째줄에 보시면 아래와 같은 내용이 나오는데요, 빨간색 부분부터 제가 첨가한 내용입니다.

저는 확장변수 선택범위를 20번까지 했지만 필요에 따라서 줄이거나 늘이거나 하시면 됩니다.

필요에 따라서 복사하기 쉽게 그냥 20번까지 그대로 다 적어 봤습니다.

 

[내용부분]

            // 결과가 있으면 각 문서 객체화를 시킴
            $modules = array();
            if(count($output->data)) {
                foreach($output->data as $key => $attribute) {
                    $modules[$attribute->module_srl]->mid = $attribute->mid;
                    $modules[$attribute->module_srl]->site_srl = $attribute->site_srl;

                    $document_srl = $attribute->document_srl;

                    $oDocument = null;
                    $oDocument = new documentItem();
                    $oDocument->setAttribute($attribute, false);
                    $GLOBALS['XE_DOCUMENT_LIST'+ '+ '][$oDocument->document_srl] = $oDocument;

                    $document_list[$key] = $oDocument;

                    // 확장 변수 1번 출력
                    if($args->extra_var_num_1) {
                        $oDocument->extra_value_1 = $oDocument->getExtraValue($args->extra_var_num_1);
                        $oDocument->extra_var_num_1 = $args->extra_var_num_1;
                    }
                    // 확장 변수 2번 출력
                    if($args->extra_var_num_2) {
                        $oDocument->extra_value_2 = $oDocument->getExtraValue($args->extra_var_num_2);
                        $oDocument->extra_var_num_2 = $args->extra_var_num_2;
                    }
                    // 확장 변수 3번 출력
                    if($args->extra_var_num_3) {
                        $oDocument->extra_value_3 = $oDocument->getExtraValue($args->extra_var_num_3);
                        $oDocument->extra_var_num_3 = $args->extra_var_num_3;
                    }
                    // 확장 변수 4번 출력
                    if($args->extra_var_num_4) {
                        $oDocument->extra_value_4 = $oDocument->getExtraValue($args->extra_var_num_4);
                        $oDocument->extra_var_num_4 = $args->extra_var_num_4;
                    }
                    // 확장 변수 5번 출력
                    if($args->extra_var_num_5) {
                        $oDocument->extra_value_5 = $oDocument->getExtraValue($args->extra_var_num_5);
                        $oDocument->extra_var_num_5 = $args->extra_var_num_5;
                    }
                    // 확장 변수 6번 출력
                    if($args->extra_var_num_6) {
                        $oDocument->extra_value_6 = $oDocument->getExtraValue($args->extra_var_num_6);
                        $oDocument->extra_var_num_6 = $args->extra_var_num_6;
                    }
                    // 확장 변수 7번 출력
                    if($args->extra_var_num_7) {
                        $oDocument->extra_value_7 = $oDocument->getExtraValue($args->extra_var_num_7);
                        $oDocument->extra_var_num_7 = $args->extra_var_num_7;
                    }
                    // 확장 변수 8번 출력
                    if($args->extra_var_num_8) {
                        $oDocument->extra_value_8 = $oDocument->getExtraValue($args->extra_var_num_8);
                        $oDocument->extra_var_num_8 = $args->extra_var_num_8;
                    }
                    // 확장 변수 9번 출력
                    if($args->extra_var_num_9) {
                        $oDocument->extra_value_9 = $oDocument->getExtraValue($args->extra_var_num_9);
                        $oDocument->extra_var_num_9 = $args->extra_var_num_9;
                    }
                    // 확장 변수 10번 출력
                    if($args->extra_var_num_10) {
                        $oDocument->extra_value_10 = $oDocument->getExtraValue($args->extra_var_num_10);
                        $oDocument->extra_var_num_10 = $args->extra_var_num_10;
                    }
                    // 확장 변수 11번 출력
                    if($args->extra_var_num_11) {
                        $oDocument->extra_value_11 = $oDocument->getExtraValue($args->extra_var_num_11);
                        $oDocument->extra_var_num_11 = $args->extra_var_num_11;
                    }
                    // 확장 변수 12번 출력
                    if($args->extra_var_num_12) {
                        $oDocument->extra_value_12 = $oDocument->getExtraValue($args->extra_var_num_12);
                        $oDocument->extra_var_num_12 = $args->extra_var_num_12;
                    }
                    // 확장 변수 13번 출력
                    if($args->extra_var_num_13) {
                        $oDocument->extra_value_13 = $oDocument->getExtraValue($args->extra_var_num_13);
                        $oDocument->extra_var_num_13 = $args->extra_var_num_13;
                    }
                    // 확장 변수 14번 출력
                    if($args->extra_var_num_14) {
                        $oDocument->extra_value_14 = $oDocument->getExtraValue($args->extra_var_num_14);
                        $oDocument->extra_var_num_14 = $args->extra_var_num_14;
                    }
                    // 확장 변수 15번 출력
                    if($args->extra_var_num_15) {
                        $oDocument->extra_value_15 = $oDocument->getExtraValue($args->extra_var_num_15);
                        $oDocument->extra_var_num_15 = $args->extra_var_num_15;
                    }
                    // 확장 변수 16번 출력
                    if($args->extra_var_num_16) {
                        $oDocument->extra_value_16 = $oDocument->getExtraValue($args->extra_var_num_16);
                        $oDocument->extra_var_num_16 = $args->extra_var_num_16;
                    }
                    // 확장 변수 17번 출력
                    if($args->extra_var_num_17) {
                        $oDocument->extra_value_17 = $oDocument->getExtraValue($args->extra_var_num_17);
                        $oDocument->extra_var_num_17 = $args->extra_var_num_17;
                    }
                    // 확장 변수 18번 출력
                    if($args->extra_var_num_18) {
                        $oDocument->extra_value_18 = $oDocument->getExtraValue($args->extra_var_num_18);
                        $oDocument->extra_var_num_18 = $args->extra_var_num_18;
                    }
                    // 확장 변수 19번 출력
                    if($args->extra_var_num_19) {
                        $oDocument->extra_value_19 = $oDocument->getExtraValue($args->extra_var_num_19);
                        $oDocument->extra_var_num_19 = $args->extra_var_num_19;
                    }
                    // 확장 변수 20번 출력
                    if($args->extra_var_num_20) {
                        $oDocument->extra_value_20 = $oDocument->getExtraValue($args->extra_var_num_20);
                        $oDocument->extra_var_num_20 = $args->extra_var_num_20;
                    }

                }
                $oDocumentModel->setToAllDocumentExtraVars();

[내용부분 끝] 

 

2. xe->widegets->newest_document->conf->info.xml

파일의 <extra_vars>내용안의 적당한 곳에 다음을 삽입하시면 됩니다.

 

         <var id="extra_var_num_1">
            <name>확장변수 1</name>
            <type>select</type>
            <description>확장 변수1 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수1출력</name><value>1</value></options>
        </var>
        <var id="extra_var_num_2">
            <name>확장변수 2</name>
            <type>select</type>
            <description>확장 변수2 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수2출력</name><value>2</value></options>
        </var>
        <var id="extra_var_num_3">
            <name>확장변수 3</name>
            <type>select</type>
            <description>확장 변수3 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수3출력</name><value>3</value></options>
        </var>
        <var id="extra_var_num_4">
            <name>확장변수 4</name>
            <type>select</type>
            <description>확장 변수4 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수4출력</name><value>4</value></options>
        </var>
        <var id="extra_var_num_5">
            <name>확장변수 5</name>
            <type>select</type>
            <description>확장 변수5 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수5출력</name><value>5</value></options>
        </var>
        <var id="extra_var_num_6">
            <name>확장변수 6</name>
            <type>select</type>
            <description>확장 변수6 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수6출력</name><value>6</value></options>
        </var>
        <var id="extra_var_num_7">
            <name>확장변수 7</name>
            <type>select</type>
            <description>확장 변수7 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수7출력</name><value>7</value></options>
        </var>
        <var id="extra_var_num_8">
            <name>확장변수 8</name>
            <type>select</type>
            <description>확장 변수8 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수8출력</name><value>8</value></options>
        </var>
        <var id="extra_var_num_9">
            <name>확장변수 9</name>
            <type>select</type>
            <description>확장 변수9 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수9출력</name><value>9</value></options>
        </var>
        <var id="extra_var_num_10">
            <name>확장변수 10</name>
            <type>select</type>
            <description>확장 변수10 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수10출력</name><value>10</value></options>
        </var>
        <var id="extra_var_num_11">
            <name>확장변수 11</name>
            <type>select</type>
            <description>확장 변수11 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수11출력</name><value>11</value></options>
        </var>
        <var id="extra_var_num_12">
            <name>확장변수 12</name>
            <type>select</type>
            <description>확장 변수12 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수12출력</name><value>12</value></options>
        </var>
        <var id="extra_var_num_13">
            <name>확장변수 13</name>
            <type>select</type>
            <description>확장 변수13 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수13출력</name><value>13</value></options>
        </var>
        <var id="extra_var_num_14">
            <name>확장변수 14</name>
            <type>select</type>
            <description>확장 변수14 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수14출력</name><value>14</value></options>
        </var>
        <var id="extra_var_num_15">
            <name>확장변수 15</name>
            <type>select</type>
            <description>확장 변수15 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수15출력</name><value>15</value></options>
        </var>
        <var id="extra_var_num_16">
            <name>확장변수 16</name>
            <type>select</type>
            <description>확장 변수16 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수16출력</name><value>16</value></options>
        </var>
        <var id="extra_var_num_17">
            <name>확장변수 17</name>
            <type>select</type>
            <description>확장 변수17 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수17출력</name><value>17</value></options>
        </var>
        <var id="extra_var_num_18">
            <name>확장변수 18</name>
            <type>select</type>
            <description>확장 변수18 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수18출력</name><value>18</value></options>
        </var>
        <var id="extra_var_num_19">
            <name>확장변수 19</name>
            <type>select</type>
            <description>확장 변수19 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수19출력</name><value>19</value></options>
        </var>
        <var id="extra_var_num_20">
            <name>확장변수 20</name>
            <type>select</type>
            <description>확장 변수20 출력여부</description>
            <options><name>출력안함</name><value></value></options>
            <options><name>확장변수20출력</name><value>20</value></options>
        </var> 

 

3. xe->widegets->newest_document->skins->default->list.html

저는 디폴트 스킨에만 적용해 봤습니다. 빨간색 부분부터 제가 추가한 내용입니다.

확장변수를 둘러싸는 기호나 색깔등은 원하시는대로 바꾸시면 됩니다. 

[내용부분]

<div class="newest_document_default_{$colorset}">
    <div class="newest_document_default_box">
        <!--@foreach($widget_info->document_list as $oDocument)-->
        <div class="document_box">
            <div class="document">

    <!--확장변수 출력-->
    <!--@if($oDocument->extra_value_1)-->
    [<font color="red"><strong>{$oDocument->extra_value_1}</strong></font>]
    <!--@end-->
    
 <!--@if($oDocument->extra_value_2)-->
    <<font color="#2a0287"><strong>{$oDocument->extra_value_2}</strong></font>>
    <!--@end-->

    <!--@if($oDocument->extra_value_3)-->
    [<font color="#6538d7"><strong>{$oDocument->extra_value_3}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_4)-->
    [<font color="#007709"><strong>{$oDocument->extra_value_4}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_5)-->
    [<font color="blue"><strong>{$oDocument->extra_value_5}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_6)-->
    [<font color="#2a0287"><strong>{$oDocument->extra_value_6}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_7)-->
    - <font color="#6538d7"><strong>{$oDocument->extra_value_7}</strong></font> -
    <!--@end-->

    <!--@if($oDocument->extra_value_8)-->
    [<font color="#007709"><strong>{$oDocument->extra_value_8}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_9)-->
    [<font color="black">{$oDocument->extra_value_9}</font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_10)-->
    [<font color="blue"><strong>{$oDocument->extra_value_10}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_11)-->
    [<font color="blue"><strong>{$oDocument->extra_value_11}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_12)-->
    [<font color="#2a0287"><strong>{$oDocument->extra_value_12}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_13)-->
    [<font color="#6538d7"><strong>{$oDocument->extra_value_13}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_14)-->
    [<font color="#330374"><strong>{$oDocument->extra_value_14}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_15)-->
    [<font color="blue"><strong>{$oDocument->extra_value_15}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_16)-->
    [<font color="#2a0287"><strong>{$oDocument->extra_value_16}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_17)-->
    [<font color="#6538d7"><strong>{$oDocument->extra_value_17}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_18)-->
    [<font color="#007709"><strong>{$oDocument->extra_value_18}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_19)-->
    [<font color="blue"><strong>{$oDocument->extra_value_19}</strong></font>]
    <!--@end-->

    <!--@if($oDocument->extra_value_20)-->
    [<font color="blue"><strong>{$oDocument->extra_value_20}</strong></font>]
    <!--@end-->
    <!--확장변수 출력 끝--> 

[내용부분 끝]  

 

<적용예제 미리보기>

[스터디하자 - studyhaja.kr -]

 

제목 글쓴이 날짜
부천오피 ⦑오피.CLUB⦒ 부천오피 부천OP 부천건마 부천오피 koykoyah 2025.02.22
광주오피 ⦑오피쓰주소.COM⦒ 광주OP 광주오피 광주출장샵 광주오피 koykoyah 2025.02.22
제주도오피 ⦑오피쓰.COM⦒ 제주도OP 제주도오피 제주도출장샵 제주도오피 koykoyah 2025.02.22
여의도오피 ⦑출장마사지안내.COM⦒ 여의도오피 여의도OP 여의도건마 여의도오피 koykoyah 2025.02.22
해운대오피 ⦑출장안마사이트.COM⦒ 해운대OP 해운대오피 해운대출장샵 해운대오피 koykoyah 2025.02.22
대구오피 ⦑오피쓰주소.COM⦒ 대구OP 대구오피 대구출장샵 대구오피 koykoyah 2025.02.22
선릉오피 선릉출장안마 ⦑오피쓰.COM⦒ 선릉OP 선릉오피 선릉오피 koykoyah 2025.02.22
부천오피 부천오피 ⦑오피쓰.COM⦒ 부천OP 부천스파 부천오피 koykoyah 2025.02.22
익산오피 익산OP ⦑오피.CLUB⦒ 익산휴게텔 익산오피 익산오피 koykoyah 2025.02.22
건대오피 ⦑오피쓰주소.COM⦒ 건대오피 건대출장마사지 건대오피 건대OP koykoyah 2025.02.22
동대문오피 동대문출장안마 ⦑오피사이트.NET⦒ 동대문OP 동대문오피 동대문오피 koykoyah 2025.02.22
수원오피 수원오피 ⦑오피쓰주소.COM⦒ 수원OP 수원스파 수원오피 koykoyah 2025.02.22
동대문오피 ⦑출장안마사이트.COM⦒ 동대문마사지 동대문오피 동대문오피 동대문OP koykoyah 2025.02.22
대전오피 ⦑출장마사지안내.COM⦒ 대전마사지 대전오피 대전오피 대전OP koykoyah 2025.02.22
선릉오피 ⦑오피쓰주소.COM⦒ 선릉오피 선릉OP 선릉건마 선릉오피 koykoyah 2025.02.22
제주도오피 ⦑출장마사지안내.COM⦒ 제주도오피 제주도OP 제주도건마 제주도오피 koykoyah 2025.02.22
동대문오피 동대문오피 ⦑오피사이트.NET⦒ 동대문OP 동대문스파 동대문오피 koykoyah 2025.02.22
송탄오피 송탄출장안마 ⦑오피쓰주소.COM⦒ 송탄OP 송탄오피 송탄오피 koykoyah 2025.02.22
여의도오피 ⦑출장마사지안내.COM⦒ 여의도오피 여의도출장마사지 여의도오피 여의도OP koykoyah 2025.02.22
답십리오피 ⦑출장안마사이트.COM⦒ 답십리마사지 답십리오피 답십리오피 답십리OP koykoyah 2025.02.22