diff --git a/widgets/newest_document/queries/getNewestDocuments.xml b/widgets/newest_document/queries/getNewestDocuments.xml index efffe6610..c060eb0b2 100644 --- a/widgets/newest_document/queries/getNewestDocuments.xml +++ b/widgets/newest_document/queries/getNewestDocuments.xml @@ -1,4 +1,4 @@ - + diff --git a/widgets/tab_newest_document/conf/info.xml b/widgets/tab_newest_document/conf/info.xml new file mode 100644 index 000000000..171dc8f0e --- /dev/null +++ b/widgets/tab_newest_document/conf/info.xml @@ -0,0 +1,259 @@ + + + 탭 형태 최근 문서 출력 + 탭 형태 최근 문서 출력 + 탭 형태 최근 문서 출력 + Display tab style newest documents + 탭 형태 최근 문서 출력 + + 제로 + zero + Zero + zero + zero + 최근 문서를 탭형태로 출력하는 위젯입니다. + 최근 문서를 탭형태로 출력하는 위젯입니다. + 최근 문서를 탭형태로 출력하는 위젯입니다. + This widget displays newest articles like tab style. + 최근 문서를 탭형태로 출력하는 위젯입니다. + + + + 정렬 대상 + 排序对象 + ソート対象 + Target to be sorted + Objetivo para ser ordenados + select + 등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다. + 可以按照指定的顺序进行排序。 + 登録された順番または変更された順番にソートできます。 + The list of newewst articles may be sorted by submitted order or modified order. + La lista de los documentos recientes pueden ser ordenados en el orden del agregado o en el de modificados. + + 최신 등록순 + 最新发表顺 + 最新登録順 + Newest Submitted Order + Orden de agregados recientemente + list_order + + + 최근 변경순 + 最新修改顺 + 最近変更順 + Newest Modified Order + Orden de modificados recientemente + update_order + + + + 정렬 방법 + 排序方式 + ソートタイプ + Sorting Type + Tipo de ordenamiento + select + 정렬대상을 내림차순 또는 올림차순으로 정렬할 수 있습니다. + 对其排序对象可进行升序/降序方式排序。 + ソートタイプを、降順、昇順にソートできます。 + You can sort target articles by asending or desending order. + Usted puede ordenar los documentos en orden acendente o en orden descendente. + + 내림차순 + 降序 + 降順 + Desending order + Orden Descendente + desc + + + 올림차순 + 升序 + 昇順 + Asending order + Orden Acendente + asc + + + + new 표시 시간 (hours) + new图标显示时间(hours) + Newの表示時間 (Hours) + Duration of indication for new item + text + 새로 등록된 게시물의 new 표시시간을 정할 수 있습니다. (시간 단위) + 可以设置最新更新主题的new图标显示时间。 + 新しく登録された書き込みに対して「New」の表示時間を指定します(時間単位)。 + You may set the duration of indication for fresh item. (unit is hour) + + + 제목 글자수 + タイトルの文字数 + 标题字数 + Length of Subject + Número de letras del título + text + 제목 글자수를 지정할 수 있습니다. (0또는 비워주시면 자르지 않습니다) + タイトルの文字数が指定できます(「0」または空欄の場合は、文字数を制限しません)。 + 可以设置标题的字数。(0或留空为不限) + Length of Subject can be assigned. (0 or blank value will not restrict the length) + El largo del título puede ser asignado. (valor 0 o en blanco no restringe el largo) + + + 썸네일 생성 방법 + サムネール生成方法 + 缩略图生成方式 + 썸네일 생성 방법을 선택할 수 있습니다. (crop : 꽉 채우기, ratio : 비율 맞추기) + 可以选择缩略图生成方式。 (crop : 裁减, ratio : 比例) + select + + Crop (채우기) + Crop (切り取り) + Crop (裁减) + crop + + + Ratio (비율 맞추기) + Ratio (比率) + Ratio (比例) + ratio + + + + 이미지 가로크기 + イメージ横幅 + 宽度 + Width of Image + Ancho de la imagen + text + 출력될 이미지의 가로크기를 정하실 수 있습니다. (기본 100) + 表示されるイメージの横幅のサイズを指定することができます(デフォルト100)。 + 可以指定要显示的图片宽度。(默认为100) + You can set the width of image. (100 as default) + Usted puede definir el ancho de la imagen. (predefinido:100) + + + 이미지 세로크기 + イメージ縦幅 + 高度 + 이미지의 세로 크기를 지정할 수 있습니다. (기본 100px) + イメージの立幅サイズを指定します(デフォルト 100px) + 可以指定图片高度。(默认为100px) + text + + + 글쓴이 표시 + 投稿者表示 + 显示昵称 + Display Author + Mostrar el Autor + select + + + 표시 + 表示 + 显示 + Show + Mostrar + Y + + + 표시하지 않음 + 非表示 + 不显示 + Hide + Ocultar + N + + + + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Mostrar el día agregado + select + + + 표시 + 表示 + 显示 + Show + Mostrar + Y + + + 표시하지 않음 + 非表示 + 不显示 + Hide + Ocultar + N + + + + 조회수 표시 + 照合数表示 + 显示查看数 + Display Hit + Mostrar Ayuda + + select + + 표시 + 表示 + 显示 + Show + Mostrar + Y + + + 표시하지 않음 + 非表示 + 不显示 + Hide + Ocultar + N + + + + 추천수 표시 + 推薦数表示 + 显示推荐数 + Display Votes + Mostrar Recomendados + + select + + 표시 + 表示 + 显示 + Show + Mostrar + Y + + + 표시하지 않음 + 非表示 + 不显示 + Hide + Ocultar + N + + + + 대상 모듈 + 模块对象 + モジュール + Target Module + Módulo Objetivo + mid_list + 선택하신 모듈에 등록된 글을 대상으로 합니다. + 将把被选模块当中的主题作为对象。 + チェックされたモジュールに登録されたコンテンツ(書き込み)を対象とします。 + The target articles to be sorted will be the ones submitted in the selected module. + El objetivo de los documentos agregados serán los del módulo selccionado. + + + diff --git a/widgets/tab_newest_document/queries/getNewestDocuments.xml b/widgets/tab_newest_document/queries/getNewestDocuments.xml new file mode 100644 index 000000000..2478b314c --- /dev/null +++ b/widgets/tab_newest_document/queries/getNewestDocuments.xml @@ -0,0 +1,15 @@ + + +
+ + + + + + + + + + + + diff --git a/widgets/tab_newest_document/skins/xe_official/css/normal.css b/widgets/tab_newest_document/skins/xe_official/css/normal.css new file mode 100644 index 000000000..415a12245 --- /dev/null +++ b/widgets/tab_newest_document/skins/xe_official/css/normal.css @@ -0,0 +1,33 @@ +.tabWdiget { overflow:hidden; } + +.tabWdiget .tabBox { border-bottom:1px solid #DEDEDE; height:27px; z-index:1; } +.tabWdiget .tabBox a { text-decoration:none; color:#666666; } +.tabWdiget .tab { position:relative; top:1px; border:1px solid #DEDEDE; margin-right:4px; float:left; cursor:pointer; background-color:#FFFFFF; z-index:2; height:25px; } +.tabWdiget .on { position:relative; top:1px; border:1px solid #DEDEDE; border-bottom:1px solid #FFFFFF; margin-right:4px; float:left; cursor:pointer; background-color:#FFFFFF; z-index:2; height:25px; } + +.tabWdiget .tab div { float:left; height:15px; border-bottom:5px solid #EEEEEE; font-size:9pt; padding:5px 8px 0 8px; color:#666666; } +.tabWdiget .tab div a { color:#666666; } +.tabWdiget .on div { float:left; height:15px; border-bottom:5px solid #FFFFFF; font-size:9pt; padding:5px 8px 0 8px; color:#000000; } +.tabWdiget .on div a { color:#000000; } + +.tabWdiget .tabContent { border:1px solid #DEDEDE; padding:10px; border-top:none; background-color:#FFFFFF; z-index:1;} +.tabWdiget .show { display:block; } +.tabWdiget .hide { display:none; } + +.tabWdiget .tabContent table { border:0; width:100%; table-layout:fixed; } + +.tabWdiget .tabContent .thumbnail { text-align:center; } +.tabWdiget .tabContent .thumbnail img { border:1px solid #EEEEEE; padding:5px; float:left; } + +.tabWdiget .tabContent .titleBox { padding-top:3px; padding-left:10px; color:#888888; } +.tabWdiget .tabContent .titleBox .regdate { font-family:tahoma; font-size:.85em; color:#AAAAAA;} +.tabWdiget .tabContent .titleBox .title { background:url(../images/normal/bullet.gif) no-repeat 3px 6px; padding-left:10px; margin-top:3px; height:20px; white-space:nowrap; overflow:hidden; } +.tabWdiget .tabContent .titleBox .title .comment_cnt { font-weight:normal; font-size:0.8em; color:#F48A23; } +.tabWdiget .tabContent .titleBox .title a { color:#666666; text-decoration:none; } +.tabWdiget .tabContent .titleBox .title a:hover { text-decoration:underline; } + +.tabWdiget .tabContent .titleBox .title .author { color:#AAAAAA; } +.tabWdiget .tabContent .titleBox .title .readAndVoted { font-family:tahoma; font-size:.8em; color:#AAAAAA;} +.tabWdiget .tabContent .titleBox .title .readAndVoted .readed { color:#4BC4C8;} +.tabWdiget .tabContent .titleBox .title .readAndVoted .voted { color:#C8A64B;} + diff --git a/widgets/tab_newest_document/skins/xe_official/images/blank.gif b/widgets/tab_newest_document/skins/xe_official/images/blank.gif new file mode 100644 index 000000000..35d42e808 Binary files /dev/null and b/widgets/tab_newest_document/skins/xe_official/images/blank.gif differ diff --git a/widgets/tab_newest_document/skins/xe_official/images/normal/bullet.gif b/widgets/tab_newest_document/skins/xe_official/images/normal/bullet.gif new file mode 100644 index 000000000..ff31db23c Binary files /dev/null and b/widgets/tab_newest_document/skins/xe_official/images/normal/bullet.gif differ diff --git a/widgets/tab_newest_document/skins/xe_official/images/normal/bulletD0.gif b/widgets/tab_newest_document/skins/xe_official/images/normal/bulletD0.gif new file mode 100644 index 000000000..e8e17d4c6 Binary files /dev/null and b/widgets/tab_newest_document/skins/xe_official/images/normal/bulletD0.gif differ diff --git a/widgets/tab_newest_document/skins/xe_official/images/normal/lineNotice.gif b/widgets/tab_newest_document/skins/xe_official/images/normal/lineNotice.gif new file mode 100644 index 000000000..dbf2c8220 Binary files /dev/null and b/widgets/tab_newest_document/skins/xe_official/images/normal/lineNotice.gif differ diff --git a/widgets/tab_newest_document/skins/xe_official/js/tab.js b/widgets/tab_newest_document/skins/xe_official/js/tab.js new file mode 100644 index 000000000..e6c7208f9 --- /dev/null +++ b/widgets/tab_newest_document/skins/xe_official/js/tab.js @@ -0,0 +1,22 @@ +function overTab(obj) { + var tab_id = obj.id; + + var cObj = obj.parentNode.firstChild; + while(cObj) { + if(cObj.nodeName == "DIV" && cObj.id) { + var cTabID= cObj.id; + if(cTabID.indexOf('tab')<0) continue; + var cContentID = cTabID.replace(/^tab/,'content'); + + if(tab_id == cTabID) { + cObj.className = "tab on"; + xGetElementById(cContentID).className = "tabContent show"; + } else { + cObj.className = "tab"; + xGetElementById(cContentID).className = "tabContent hide"; + } + } + cObj = cObj.nextSibling; + } + +} diff --git a/widgets/tab_newest_document/skins/xe_official/list.html b/widgets/tab_newest_document/skins/xe_official/list.html new file mode 100644 index 000000000..8a8263055 --- /dev/null +++ b/widgets/tab_newest_document/skins/xe_official/list.html @@ -0,0 +1,64 @@ + + + + + + + +{@ $_id_prefix = time() } +{@ $_checked = false; } + +
+ + + {@ $_checked = false; } + +
+ {@ $_thumbnail_checked = false; } +
+ + + + + {@ $_thumbnail_checked = true; } + + + + + +
+ + + +
+ + [{$v->getRegdate("m-d")}] + + + {$v->getTitleText($widget_info->subject_cut_size)} {$v->printExtraImages($widget_info->duration_new)} + *{$v->getCommentCount()} + + + by {$v->getNickName()} + + + + + ({$v->get('readed_count')}/ {$v->get('voted_count')}) + + + +
+ +
+
+ +
+ + + diff --git a/widgets/tab_newest_document/skins/xe_official/skin.xml b/widgets/tab_newest_document/skins/xe_official/skin.xml new file mode 100644 index 000000000..b12ca5f66 --- /dev/null +++ b/widgets/tab_newest_document/skins/xe_official/skin.xml @@ -0,0 +1,25 @@ + + + 웹진형 최근글 출력 기본 스킨 + 웹진형 최근글 출력 기본 스킨 + 웹진형 최근글 출력 기본 스킨 + Display newest documents like webzine style + + 제로 + Zero + Zero + Zero + 글 목록과 이미지가 같이 출력되는 웹진형 스킨입니다. 이미지가 있는 글들만 노출이 됩니다. + 글 목록과 이미지가 같이 출력되는 웹진형 스킨입니다. 이미지가 있는 글들만 노출이 됩니다. + 글 목록과 이미지가 같이 출력되는 웹진형 스킨입니다. 이미지가 있는 글들만 노출이 됩니다. + 글 목록과 이미지가 같이 출력되는 웹진형 스킨입니다. 이미지가 있는 글들만 노출이 됩니다. + + + + 기본 컬러 + デフォルトカラー + 默认颜色 + Default Color + + + diff --git a/widgets/tab_newest_document/tab_newest_document.class.php b/widgets/tab_newest_document/tab_newest_document.class.php new file mode 100644 index 000000000..b2dc2060f --- /dev/null +++ b/widgets/tab_newest_document/tab_newest_document.class.php @@ -0,0 +1,119 @@ +order_target = $args->order_target; + if(!in_array($widget_info->order_target, array('list_order','update_order'))) $widget_info->order_target = 'list_order'; + + // 정렬 순서 + $widget_info->order_type = $args->order_type; + if(!in_array($widget_info->order_type, array('asc','desc'))) $widget_info->order_type = 'asc'; + + // 글자 제목 길이 + $widget_info->subject_cut_size = (int)$args->subject_cut_size; + + // 목록 수 + $widget_info->list_count = $args->list_count; + if(!$widget_info->list_count) $widget_info->list_count = 5; + + // 썸네일 생성 방법 + $widget_info->thumbnail_type = $args->thumbnail_type; + if(!$widget_info->thumbnail_type) $widget_info->thumbnail_type = 'crop'; + + // 썸네일 가로 크기 + $widget_info->thumbnail_width = (int)$args->thumbnail_width; + if(!$widget_info->thumbnail_width) $widget_info->thumbnail_width = 100; + + // 썸네일 세로 크기 + $widget_info->thumbnail_height = (int)$args->thumbnail_height; + if(!$widget_info->thumbnail_height) $widget_info->thumbnail_height = 100; + + // 노출 여부 체크 + if($args->display_author!='Y') $widget_info->display_author = 'N'; + else $widget_info->display_author = 'Y'; + if($args->display_regdate!='Y') $widget_info->display_regdate = 'N'; + else $widget_info->display_regdate = 'Y'; + if($args->display_readed_count!='Y') $widget_info->display_readed_count = 'N'; + else $widget_info->display_readed_count = 'Y'; + if($args->display_voted_count!='Y') $widget_info->display_voted_count = 'N'; + else $widget_info->display_voted_count = 'Y'; + + // 최근 글 표시 시간 + $widget_info->duration_new = (int)$args->duration_new * 60 * 60; + if(!$widget_info->duration_new) $widget_info->duration_new = 12 * 60 * 60; + + + // 대상 모듈 정리 + $mid_list = explode(",",$args->mid_list); + + // 템플릿 파일에서 사용할 변수들을 세팅 + if(count($mid_list)==1) $widget_info->module_name = $mid_list[0]; + + // mid에 해당하는 module_srl을 구함 + $oModuleModel = &getModel('module'); + $oDocumentModel = &getModel('document'); + $module_srl_list = $oModuleModel->getModuleSrlByMid($mid_list); + if(is_array($module_srl_list)) $obj->module_srls = implode(",",$module_srl_list); + else $obj->module_srls = $module_srl_list; + + // 모듈 목록을 구함 + $tab_list = $oModuleModel->getMidList($obj); + if(!$tab_list || !count($tab_list)) return; + + // 각 모듈에 해당하는 문서들을 구함 + $obj = null; + $obj->list_count = $widget_info->list_count; + $obj->sort_index = $widget_info->order_target; + $obj->order_type = $widget_info->order_type=="desc"?"asc":"desc"; + foreach($tab_list as $key => $value) { + $mid = $key; + $module_srl = $value->module_srl; + $browser_title = $value->browser_title; + + $obj->module_srl = $module_srl; + $output = executeQuery("widgets.tab_newest_document.getNewestDocuments", $obj); + unset($data); + + if($output->data && count($output->data)) { + foreach($output->data as $k => $v) { + $oDocument = null; + $oDocument = $oDocumentModel->getDocument(); + $oDocument->setAttribute($v); + $data[$k] = $oDocument; + } + } else { + $data = array(); + } + $tab_list[$key]->document_list = $data; + } + + Context::set('widget_info', $widget_info); + Context::set('tab_list', $tab_list); + + // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) + $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); + Context::set('colorset', $args->colorset); + + // 템플릿 파일을 지정 + $tpl_file = 'list'; + + // 템플릿 컴파일 + $oTemplate = &TemplateHandler::getInstance(); + return $oTemplate->compile($tpl_path, $tpl_file); + } + } +?>