<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>기능 제안</title>
		<link>http://metabbs.org/board/idea</link>
		<description>The latest posts from 기능 제안</description>
		<pubDate>Thu, 10 Jul 2008 18:06:59 +0900</pubDate>
		<item>
			<title><![CDATA[아래 제안한 기능(제한된 아이디만 게시판 접근) 만들어버렸습니다.]]></title>
			<link>http://metabbs.org/post/469</link>
			<description><![CDATA[
	<p>훌쩍 만들어 버렸네요. ^^a ㅎㅎㅎ <br />갑자기 든 생각인데, 소스 수정 권한을 저에게 주신는게 어떨지..ㅋㅋㅋ<br /><br />patch가 <a href="http://metabbs.org/post/468">http://metabbs.org/post/468</a> 를 반영후에 만든거라 lib/ko.php 가 변경내용이 번복이네요.&nbsp; -_-a<br /><br />기능은 게시판에 접근할수 있는 멤버를 추가해줄수 있고, level퍼미션과 같이 사용합니다. <br />멤버가 없을때에는 이전 기능과 같습니다. <br /><br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 35em"><pre>
Index: app/models/user.php
===================================================================
--- app/models/user.php (revision 1212)
+++ app/models/user.php (working copy)
@@ -117,6 +117,10 @@
                        break;
                }
        }
+       function is_member($object) {
+               if ($this-&gt;is_admin()) return true;
+               return $object-&gt;is_member($this);
+       }
 }

 class Guest extends Model
@@ -178,5 +182,9 @@
                        break;
                }
        }
+       function is_member($object) {
+               if ($this-&gt;is_admin()) return true;
+               return $object-&gt;is_member($this);
+       }
 }
 ?&gt;
Index: app/models/board.php
===================================================================
--- app/models/board.php        (revision 1212)
+++ app/models/board.php        (working copy)
@@ -17,6 +17,7 @@

        function _init() {
                $this-&gt;admin_table = get_table_name('board_admin');
+               $this-&gt;member_table = get_table_name('board_member');
                $this-&gt;post_table = get_table_name('post');
                $this-&gt;comment_table = get_table_name('comment');
                $this-&gt;category_table = get_table_name('category');
@@ -110,9 +111,34 @@
                }
                $this-&gt;db-&gt;execute(&quot;INSERT INTO $this-&gt;admin_table (board_id, user_id) VALUES($this-&gt;id, $user-&gt;id)&quot;);
        }
-       function drop_admin($admin) {
-               $this-&gt;db-&gt;execute(&quot;DELETE FROM $this-&gt;admin_table WHERE board_id=$this-&gt;id AND user_id=$admin-&gt;id&quot;);
+       function drop_admin($user) {
+               $this-&gt;db-&gt;execute(&quot;DELETE FROM $this-&gt;admin_table WHERE board_id=$this-&gt;id AND user_id=$user-&gt;id&quot;);
        }
+       function get_members() {
+               if (!isset($this-&gt;_members)) {
+                       $table = get_table_name('user');
+                       $this-&gt;_members = $this-&gt;db-&gt;fetchall(&quot;SELECT u.* FROM $this-&gt;member_table a, $table u WHERE u.level=255 OR (a.board_id=$this-&gt;id AND a.user_id=u.id) GROUP BY u.id&quot;, &quot;User&quot;);
+               }
+               return $this-&gt;_members;
+       }
+       function is_member($user) {
+               foreach ($this-&gt;get_members() as $member) {
+                       if ($member-&gt;id == $user-&gt;id) return true;
+               }
+               return false;
+       }
+       function add_member($user) {
+               foreach ($this-&gt;get_members() as $member) {
+                       if ($member-&gt;id == $user-&gt;id) return;
+               }
+               $this-&gt;db-&gt;execute(&quot;INSERT INTO $this-&gt;member_table (board_id, user_id) VALUES($this-&gt;id, $user-&gt;id)&quot;);
+       }
+       function drop_member($user) {
+               $this-&gt;db-&gt;execute(&quot;DELETE FROM $this-&gt;member_table WHERE board_id=$this-&gt;id AND user_id=$user-&gt;id&quot;);
+       }
+       function is_member_mode() {
+               return $this-&gt;db-&gt;fetchone(&quot;SELECT COUNT(*) FROM $this-&gt;member_table WHERE board_id=$this-&gt;id&quot;) &gt; 0;
+       }
        function reset_sort_keys() {
                if (!$this-&gt;order_by) $this-&gt;order_by = 'id DESC';
                $this-&gt;db-&gt;execute(&quot;UPDATE $this-&gt;post_table SET sort_key=-id WHERE notice=1&quot;);
Index: app/views/board/edit_permission.php
===================================================================
--- app/views/board/edit_permission.php (revision 1212)
+++ app/views/board/edit_permission.php (working copy)
@@ -18,6 +18,37 @@
 &lt;p&gt;&lt;input type=&quot;submit&quot; value=&quot;OK&quot; /&gt;&lt;/p&gt;
 &lt;/form&gt;

+&lt;h3&gt;&lt;?=i('Members')?&gt;&lt;/h3&gt;
+&lt;p&gt;&lt;?=i('Set members are able to access this board.')?&gt;&lt;/p&gt;
+&lt;table id=&quot;users&quot;&gt;
+&lt;tr&gt;
+       &lt;th class=&quot;name&quot;&gt;&lt;?=i('Name')?&gt;&lt;/th&gt;
+       &lt;th class=&quot;level&quot;&gt;&lt;?=i('Level')?&gt;&lt;/th&gt;
+       &lt;th class=&quot;actions&quot;&gt;&lt;?=i('Actions')?&gt;&lt;/th&gt;
+&lt;/tr&gt;
+&lt;? $_ = $board-&gt;get_members(); if ($_) { foreach ($_ as $member) { ?&gt;
+&lt;tr&gt;
+       &lt;td&gt;&lt;?=$member-&gt;name?&gt; &lt;small&gt;(&lt;?=$member-&gt;user?&gt;)&lt;/small&gt;&lt;/td&gt;
+       &lt;td&gt;&lt;?=$member-&gt;level?&gt;&lt;/td&gt;
+       &lt;td&gt;
+       &lt;? if (!$member-&gt;is_admin()) { ?&gt;
+       &lt;a href=&quot;&lt;?=url_for($board, 'members')?&gt;?action=drop&amp;amp;id=&lt;?=$member-&gt;id?&gt;&quot;&gt;멤버 제거&lt;/a&gt;
+       &lt;? } else { ?&gt;
+       -
+       &lt;? } ?&gt;
+       &lt;/td&gt;
+&lt;/tr&gt;
+&lt;? } } else { ?&gt;
+&lt;tr&gt;
+       &lt;td colspan=&quot;3&quot; style=&quot;text-align: center; height: 4em&quot;&gt;멤버가 없습니다.&lt;/td&gt;
+&lt;/tr&gt;
+&lt;? } ?&gt;
+&lt;/table&gt;
+&lt;form method=&quot;post&quot; action=&quot;&lt;?=url_for($board, 'members')?&gt;?action=add&quot;&gt;
+&lt;p&gt;멤버로 추가할 사용자의 아이디를 입력하세요.&lt;/p&gt;
+&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;member_id&quot; /&gt; &lt;input type=&quot;submit&quot; value=&quot;&lt;?=i('Add')?&gt;&quot; /&gt;&lt;/p&gt;
+&lt;/form&gt;
+
 &lt;h3&gt;&lt;?=i('Administrators')?&gt;&lt;/h3&gt;
 &lt;table id=&quot;users&quot;&gt;
 &lt;tr&gt;
Index: lib/permission.php
===================================================================
--- lib/permission.php  (revision 1212)
+++ lib/permission.php  (working copy)
@@ -3,8 +3,10 @@

 function permission_required($action, $object) {
        global $account;
-       $result = $account-&gt;has_perm($action, $object);
-       if (!$result)
+       $result_permission = $account-&gt;has_perm($action, $object);
+       $result_member = $account-&gt;is_member($object);
+       $flag = $object-&gt;is_member_mode();
+       if (($flag &amp;&amp; (!$result_permission || !$result_member)) || !$flag &amp;&amp; !$result_permission )
                access_denied();
        else if ($result === ASK_PASSWORD)
                ask_password_of($object);
Index: lang/ko.php
===================================================================
--- lang/ko.php (revision 1212)
+++ lang/ko.php (working copy)
@@ -143,3 +143,8 @@
 $lang['Maintenance'] = '유지 보수';
 $lang['Site theme'] = '사이트 테마';
 $lang['Information'] = '정보';
+$lang['Inputs is Empty.'] = '입력란이 비었습니다.';
+$lang['Fill out The Title and Body.'] = '제목과 내용을 채워주세요.';
+$lang['Back to Write Page'] = '쓰기 페이지로 이동';
+$lang['Members'] = '접근 가능한 멤버';
+$lang['Set members are able to access this board.'] = '게시판에 접근할수 있는 멤버를 설정합니다.';
Index: app/controllers/board/members.php
===================================================================
--- app/controllers/board/members.php   (revision 0)
+++ app/controllers/board/members.php   (revision 0)
@@ -0,0 +1,20 @@
+&lt;?php
+if (!$account-&gt;is_admin()) {
+       access_denied();
+}
+var_dump($_POST);
+
+switch ($_GET['action']) {
+       case 'add':
+               $user = User::find_by_user($_POST['member_id']);
+               if ($user-&gt;exists() &amp;&amp; !$user-&gt;is_admin())
+                       $board-&gt;add_member($user);
+       break;
+       case 'drop':
+               $admin = User::find($_GET['id']);
+               if ($admin-&gt;exists())
+                       $board-&gt;drop_member($admin);
+       break;
+}
+redirect_to(url_for($board, 'edit', array('tab' =&gt; 'permission')));
+?&gt;
</pre></div></div></div><p>DB 추가(update에 포함될 것)<br /><br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 15em"><pre>&lt;?php
	$t = new Table('board_member');
	$t-&gt;column('board_id', 'integer');
	$t-&gt;column('user_id', 'integer');
	$t-&gt;add_index('board_id');
	$conn-&gt;add_table($t);
	$conn-&gt;query(&quot;INSERT INTO &quot;.get_table_name('board_member').&quot; (board_id, user_id) VALUES(0, 0)&quot;); // insert dummy data
?&gt;</pre></div></div></div>]]></description>
			<author><![CDATA[엽기민원]]></author>
			<pubDate>Thu, 10 Jul 2008 18:06:59 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[meta2me ^^]]></title>
			<link>http://metabbs.org/post/536</link>
			<description><![CDATA[
	<p>메타bbs 에서 글올리면 me2day 에 등록되는..<br />^^ 굳이 설명이 필요가 없네요;</p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Fri, 31 Oct 2008 21:43:33 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[사이트 통계기능..]]></title>
			<link>http://metabbs.org/post/530</link>
			<description><![CDATA[
	<p>네이버의 그것처럼..<br />플러그인으로 제공하면 좋겠네요.</p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Sat, 25 Oct 2008 11:37:24 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[오픈 아디 플러그인 관련...]]></title>
			<link>http://metabbs.org/post/511</link>
			<description><![CDATA[
	<p>만약 제 아디가<br />test.myid.net 이라면<br />test 만 쳐도 로그인이 됬으면 좋겠군요.</p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Sat, 23 Aug 2008 21:31:41 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[최근글 말고 최근 댓글을 출력 할수 없을까요?]]></title>
			<link>http://metabbs.org/post/60</link>
			<description><![CDATA[
	<p>최근 글 말고 최근 댓글을 출력할 수 있는 것도 필요하지 않을까요?<br />옛날글에 댓글이 달리면 알아내기 힘듭니다.<br /><br />그나저나 getLatestPosts와 getLatestPost는 어떻게 쓰는 건가요?<br />$metabbs-&gt;getLatestPost(보드이름)해도 반응이 없고 혹시나 해서 <br />echo를 붙여줘도 Object id #16만 나오는군요.</p>]]></description>
			<author><![CDATA[Junichel]]></author>
			<pubDate>Fri, 16 Feb 2007 16:51:32 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[회원가입 및 회원정보에 대한 의견 (이메일 인증 등...)]]></title>
			<link>http://metabbs.org/post/471</link>
			<description><![CDATA[
	<p>안녕하세요.<br />이번에 메타bbs를 이용하여 웹표준 홈피를 만들까 합니다~~~~만<br /><br /><br /><br />무분별한 가입을 막기 위해,<br />'이메일 인증 기능'같은 것이 있으면 좋겠다고 생각합니다.<br /><br />가능하면 암호를 잊어버렸을 경우, 이메일로 새 암호를 받을 수 있는 기능이 있으면 더 좋을 듯...<br /><br /><br /><br />그리고, 추가로 얘기하자면... 회원 정보에 차후 플러그인 등에 이용할 수 있도록 user테이블에 몇가지 필드를 추가할 수 있으면 좋겠습니다.<br />레벨 외의 몇가지 포인트를 추가하여 재미있는 기능을 넣고 싶긴 한데...<br />그렇게 하려면 메타bbs 자체를 개조해야 하니... -ㅅ-;;<br /><br /><br /><br />메타bbs가 앞으로 더 발전하려면 회원관리 기능이 좀 더 강력해져야 할 것 같습니다.<br />오픈아이디 기능도 좋긴 하지만... 역시, 회원정보를 이용해 여러가지 추가 기능을 구현하는 커뮤니티를 만들려면 일반적인 회원관리 쪽도...<br /><br />'ㅅ'/ 수고하세요~</p>]]></description>
			<author><![CDATA[puyo]]></author>
			<pubDate>Mon, 14 Jul 2008 00:37:02 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[api 분리]]></title>
			<link>http://metabbs.org/post/493</link>
			<description><![CDATA[
	<p>api만 모아서 분리 폴더에 집어넣는건 어떨까요.<br />/root<br /> /root/api<br />&nbsp; /root/api/apitest<br />&nbsp; &nbsp;/root/api/apitest/apitest.api.php<br />&nbsp; /root/api/apitest2<br />&nbsp; &nbsp;/root/api/apitest2/apitest2.api.php<br /><br />시간이 없어서 간간히 소스를 조금씩 파악하고 있는 저로써는<br />아직 metabbs가 어렵기만 합니다. (문서도 부족하구요.. =3)<br /></p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Mon, 11 Aug 2008 12:19:03 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[서로 다른 MetaBBS 끼리의 컨텐츠 교환]]></title>
			<link>http://metabbs.org/post/491</link>
			<description><![CDATA[
	<p>즉 사이트A의 MetaBBS 의 글이 <br />약간의 추가설정만 해주고&nbsp; '컨텐츠 교환' 기능을 실행하여<br />사이트B의 MetaBBS 의 게시판으로 이동된다던가 하는거 말이죠.<br />(이런 데이터교환은 제가 만드는 대부분의 웹 애플리케이션에 채택하고 있습니다 :)<br />사이트 이전 등의 작업에 보다 편리함을 줄거 같습니다.<br /><br /><br /></p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Sun, 10 Aug 2008 20:44:49 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[사이트 빌더 기능에 대해]]></title>
			<link>http://metabbs.org/post/490</link>
			<description><![CDATA[
	<p>그러나, 그러한 기능을 지저분하다고 생각하고 원하지 않는 사람이 있을수도 있습니다<br />(사이트 빌더 파일에 대한 존재를 싫어할수도 있어요)<br />그니까 일종의 플러그인으로 개발하는게 좋겠습니다.<br />원하지 않는다면 MetaBBS 에서 떼어내 버려도 이상 없는.<br />또는 설치할때 선택해서 설치하도록 하도록 합니다.<br /><br />]그나저나 문서화..</p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Sun, 10 Aug 2008 19:36:24 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[태그 기능]]></title>
			<link>http://metabbs.org/post/488</link>
			<description><![CDATA[
	<p>제목그대로<br />네이버의 태그처럼..</p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Sat, 09 Aug 2008 11:09:50 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[간단한 사이트 빌더 기능]]></title>
			<link>http://metabbs.org/post/487</link>
			<description><![CDATA[
	<p>간단하게 사이트를 구축해주는 빌더 기능이 추가되었으면 하네요.<br />최소기능만이라도 간추려서;</p>]]></description>
			<author><![CDATA[민석]]></author>
			<pubDate>Sat, 09 Aug 2008 11:02:54 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[특정 글이나 댓글 노출 비노출 제어.]]></title>
			<link>http://metabbs.org/post/476</link>
			<description><![CDATA[
	<p>특정 댓글이나 글을 지우지 않은 상태에서 게시물 목록이나 댓글 사이에서 보이지 않도록 하는 기능을 제안합니다.<br /><br />이는 이번에 바뀌는 법령중, 포탈 사이트 책임자에게 명예회손과 관련된 요청이 있을시 일차적으로 게시물이나 댓글을 보이지 않도록 해야하는 것과 관련된 것이기에 차후 꼭 필요하다고 봅니다.</p>]]></description>
			<author><![CDATA[junichel]]></author>
			<pubDate>Wed, 23 Jul 2008 07:39:00 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[디토님]]></title>
			<link>http://metabbs.org/post/465</link>
			<description><![CDATA[
	<p>제가 어떤 기회로 MetaBBS 코드를 손보게 되는 기회를 가졌는데...<br /><br />수정부분을 한번 쭉올릴테니 보시고 소스 수정 하시면 어떨까 합니다. ^^</p>]]></description>
			<author><![CDATA[엽기민원]]></author>
			<pubDate>Wed, 09 Jul 2008 16:31:35 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[기능 제안이요....]]></title>
			<link>http://metabbs.org/post/460</link>
			<description><![CDATA[
	<p>1. 로그인후에 자기가 읽지 않은 글에는 Bold 하여 출력<br /><br />2. 답글에도 첨부파일?<br /><br />음... 여러가지로 잘 활용하는데 아쉽게 윗부분이 가능하다면 더할나위 없이 좋을것같아요ㅠㅠ</p>]]></description>
			<author><![CDATA[히히]]></author>
			<pubDate>Sun, 29 Jun 2008 23:16:13 +0900</pubDate>
		</item>
		<item>
			<title><![CDATA[한가지 더, 게시판 사용 아이디를 제한하는 기능]]></title>
			<link>http://metabbs.org/post/456</link>
			<description><![CDATA[
	<p>level기능도 있지만, 한 게시판에 특정아이디의 사람들만 사용하게 하는 기능입니다. <br /><br />255와 특정아이디만요. <br /><br />저도 시간날때 한번 고민해보겠슴다. ^^</p>]]></description>
			<author><![CDATA[엽기민원]]></author>
			<pubDate>Thu, 29 May 2008 18:28:56 +0900</pubDate>
		</item>
	</channel>
</rss>
