From ab399752d9463ad99b272ebf2f3c87e3a5e25264 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 30 Jul 2007 05:25:25 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8A=B9=EC=A0=95=20=EA=B7=B8=EB=A3=B9?= =?UTF-8?q?=EC=9D=98=20=ED=9A=8C=EC=9B=90=EB=AA=A9=EB=A1=9D=EC=9D=84=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=ED=95=98=EB=8A=94=20=EC=9C=84=EC=A0=AF=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/trunk@2079 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/member_group/conf/info.xml | 29 ++++++++ widgets/member_group/member_group.class.php | 69 ++++++++++++++++++ .../member_group/skins/default/css/normal.css | 6 ++ .../skins/default/images/normal/user.gif | Bin 0 -> 77 bytes widgets/member_group/skins/default/list.html | 25 +++++++ widgets/member_group/skins/default/skin.xml | 13 ++++ 6 files changed, 142 insertions(+) create mode 100644 widgets/member_group/conf/info.xml create mode 100644 widgets/member_group/member_group.class.php create mode 100644 widgets/member_group/skins/default/css/normal.css create mode 100644 widgets/member_group/skins/default/images/normal/user.gif create mode 100644 widgets/member_group/skins/default/list.html create mode 100644 widgets/member_group/skins/default/skin.xml diff --git a/widgets/member_group/conf/info.xml b/widgets/member_group/conf/info.xml new file mode 100644 index 000000000..fa3fad729 --- /dev/null +++ b/widgets/member_group/conf/info.xml @@ -0,0 +1,29 @@ + + + 특정 그룹 회원 출력 위젯 + + 제로 + + 특정 그룹에 속한 회원의 목록을 출력하는 위젯입니다. + 아직 테스트용 위젯이며 해당 그룹에 지정된 수 이상의 회원이 있을 경우 최근 가입순서대로 출력이 됩니다. + 아래 그룹이름 입력칸에 출력을 원하는 그룹명을 , (콤마)로 연결하여 입력하시면 됩니다. + + + + + 제목 + text + 최근 게시물의 제목으로 출력됩니다. + + + 목록수 + text + 출력될 목록의 수를 정하실 수 있습니다. (기본 5개) + + + 대상 회원 그룹 + text + 소속 회원 출력을 원하는 회원 그룹명을 ,(콤마)로 연결하여 입력하세요. + + + diff --git a/widgets/member_group/member_group.class.php b/widgets/member_group/member_group.class.php new file mode 100644 index 000000000..ec925ab1b --- /dev/null +++ b/widgets/member_group/member_group.class.php @@ -0,0 +1,69 @@ +title; + $list_count = (int)$args->list_count; + if(!$list_count) $list_count = 5; + + $tmp_groups = explode(",",$args->target_group); + $count = count($tmp_groups); + for($i=0;$i<$count;$i++) { + $group_name = trim($tmp_groups[$i]); + if(!$group_name) continue; + $target_group[] = $group_name; + + } + + if(count($target_group)) { + + // 그룹 목록을 구해옴 + $oMemberModel = &getModel('member'); + $group_list = $oMemberModel->getGroups(); + + foreach($group_list as $group_srl => $val) { + if(!in_array($val->title, $target_group)) continue; + $target_group_srl_list[] = $group_srl; + } + + // 해당 그룹의 멤버를 구해옴 + if(count($target_group_srl_list)) { + $obj->selected_group_srl = implode(',',$target_group_srl_list); + $obj->list_count = $list_count; + $output = executeQuery('member.getMemberListWithinGroup', $obj); + $widget_info->member_list = $output->data; + } + } + + $widget_info->title = $title; + Context::set('widget_info', $widget_info); + + // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) + $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); + Context::set('colorset', $args->colorset); + + // 템플릿 파일을 지정 + $tpl_file = 'list'; + + // 템플릿 컴파일 + $oTemplate = &TemplateHandler::getInstance(); + $output = $oTemplate->compile($tpl_path, $tpl_file); + return $output; + } + } +?> diff --git a/widgets/member_group/skins/default/css/normal.css b/widgets/member_group/skins/default/css/normal.css new file mode 100644 index 000000000..daa4f1916 --- /dev/null +++ b/widgets/member_group/skins/default/css/normal.css @@ -0,0 +1,6 @@ +.member_group .title_box { border:1px solid #EEEEEE; padding:5px; height:14px; overflow:hidden; margin-bottom:.3em; } + +.member_group .member_box { padding:3px 3px 3px 28px; clear:both; border-bottom:1px solid #EEEEEE; height:16px; overflow:hidden; margin:0px 0px 2px 0px; background:url(../images/normal/user.gif) no-repeat 5px 3px; } + +.member_group .nick_name { float:left; } +.member_group .homepage a { color:#d1d9db; text-decoration:none; margin-left:10px; } diff --git a/widgets/member_group/skins/default/images/normal/user.gif b/widgets/member_group/skins/default/images/normal/user.gif new file mode 100644 index 0000000000000000000000000000000000000000..b2ddb01d9ecd70b7dd4baef04671dd2aac30db07 GIT binary patch literal 77 zcmZ?wbhEHb6krfwn8?KN|Nnns>o_3Ez`&sRlZBCifr&u}$Og&^0NHXOeKVK6GXMYp literal 0 HcmV?d00001 diff --git a/widgets/member_group/skins/default/list.html b/widgets/member_group/skins/default/list.html new file mode 100644 index 000000000..64f033f58 --- /dev/null +++ b/widgets/member_group/skins/default/list.html @@ -0,0 +1,25 @@ + + + + + + +
+ +
+
{$widget_info->title}
+
+ + +
+
{htmlspecialchars($val->nick_name)}
+ + + +
+
+ + +
diff --git a/widgets/member_group/skins/default/skin.xml b/widgets/member_group/skins/default/skin.xml new file mode 100644 index 000000000..f220e6141 --- /dev/null +++ b/widgets/member_group/skins/default/skin.xml @@ -0,0 +1,13 @@ + + + 그룹회원 출력 위젯 기본 스킨 + + 제로 + 그룹회원 출력 위젯의 기본 스킨 + + + + 기본 컬러 + + +