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 000000000..b2ddb01d9 Binary files /dev/null and b/widgets/member_group/skins/default/images/normal/user.gif differ 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 @@ + + + 그룹회원 출력 위젯 기본 스킨 + + 제로 + 그룹회원 출력 위젯의 기본 스킨 + + + + 기본 컬러 + + +