WordPress.org

Plugin Directory

Changeset 627983


Ignore:
Timestamp:
11/21/12 00:48:39 (17 months ago)
Author:
ssamture
Message:

1.2 released.

Location:
mh-board/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • mh-board/trunk/admin/mh-board-permalink.php

    r625099 r627983  
    1212function mh_board_permalink(){ 
    1313    global $wp_rewrite; 
     14 
    1415?> 
    1516<div class="wrap"> 
     
    2526        MH_Custom_Post_Type_Permalinks::set_archive_rewrite(); 
    2627        MH_Custom_Post_Type_Permalinks::set_rewrite(); 
    27         flush_rewrite_rules(); 
     28 
     29        //flush_rewrite_rules(); 
     30         
     31         
    2832 
    2933        ?> 
     
    193197    public function set_permalink( $post_link, $post,$leavename ) { 
    194198        global $wp_rewrite; 
     199 
     200         
    195201        $draft_or_pending = isset( $post->post_status ) && in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) ); 
    196202        if( $draft_or_pending and !$leavename ) 
     
    314320 
    315321        foreach ($taxonomies as $taxonomy) : 
    316             $post_types = get_taxonomy($taxonomy)->object_type; 
     322            //$post_types = get_taxonomy($taxonomy)->object_type; 
     323            $post_types = array('board'); 
     324            //print_r($post_types); 
    317325 
    318326            foreach ($post_types as $post_type): 
  • mh-board/trunk/admin/mh-board-permission.php

    r625099 r627983  
    66    $categories = get_terms('board_cat',array('hide_empty'=>0)); 
    77    foreach($categories as $category){ 
    8         register_setting( 'mh-board-permission-'.$category->slug, 'mh_board_permission_'.$category->slug ); 
     8        register_setting( 'mh-board-permission-'.$category->term_id, 'mh_board_permission_'.$category->term_id ); 
    99    } 
    1010} 
     
    1212?> 
    1313<div class="wrap"> 
    14     <div id="icon-options-general" class="icon32"><br></div><h2>MH Board Permission</h2> 
     14    <div id="icon-options-general" class="icon32"><br></div><h2><?php echo __('MH Board Permission','mhboard');?></h2> 
    1515    <p class="ssamture_net" style="text-align:right"> 
    1616    <a href="http://ssamture.net"><img src="http://ssamture.net/ssamturenet.png" border="0"></a> 
     
    3434    <div class="postbox" style="float:left;"> 
    3535    <form method="post" action="options.php"> 
    36     <?php settings_fields( 'mh-board-permission-'.$category->slug ); ?> 
     36    <?php settings_fields( 'mh-board-permission-'.$category->term_id ); ?> 
    3737    <h3 style="cursor:default;"><span><?php echo $category->name;?></span></h3> 
    3838    <table> 
     
    4343        </tr> 
    4444    <?php 
    45     $mh_board_per_o = get_option('mh_board_permission_'.$category->slug); 
     45    $mh_board_per_o = get_option('mh_board_permission_'.$category->term_id); 
    4646 
    4747    foreach($ure_roles as $key => $value):?> 
     
    5757        <tr> 
    5858            <td class="role"><?php echo translate_user_role($value['name']);?></td> 
    59             <td><input type="checkbox" name="mh_board_permission_<?php echo $category->slug;?>[<?php echo $key;?>][read]"<?php if($mh_board_per[$key]['read'] == 'on'){echo ' checked';}?>/></td> 
    60             <td><input type="checkbox" name="mh_board_permission_<?php echo $category->slug;?>[<?php echo $key;?>][write]"<?php if($mh_board_per[$key]['write'] == 'on'){echo ' checked';}?>/></td> 
     59            <td><input type="checkbox" name="mh_board_permission_<?php echo $category->term_id;?>[<?php echo $key;?>][read]"<?php if($mh_board_per[$key]['read'] == 'on'){echo ' checked';}?>/></td> 
     60            <td><input type="checkbox" name="mh_board_permission_<?php echo $category->term_id;?>[<?php echo $key;?>][write]"<?php if($mh_board_per[$key]['write'] == 'on'){echo ' checked';}?>/></td> 
    6161        </tr> 
    6262    <?php endforeach;?> 
     
    7272        <tr> 
    7373            <td class="role"><?php echo __('guest','mhboard');?></td> 
    74             <td><input type="checkbox" name="mh_board_permission_<?php echo $category->slug;?>[guest][read]"<?php if($mh_board_per['guest']['read'] == 'on'){echo ' checked';}?>/></td> 
    75             <td><input type="checkbox" name="mh_board_permission_<?php echo $category->slug;?>[guest][write]"<?php if($mh_board_per['guest']['write'] == 'on'){echo ' checked';}?>/></td> 
     74            <td><input type="checkbox" name="mh_board_permission_<?php echo $category->term_id;?>[guest][read]"<?php if($mh_board_per['guest']['read'] == 'on'){echo ' checked';}?>/></td> 
     75            <td><input type="checkbox" name="mh_board_permission_<?php echo $category->term_id;?>[guest][write]"<?php if($mh_board_per['guest']['write'] == 'on'){echo ' checked';}?>/></td> 
    7676        </tr> 
    7777    </table> 
  • mh-board/trunk/includes/mh-functions.php

    r625099 r627983  
    8787add_shortcode('mh_board','mh_board'); 
    8888 
    89 add_filter('pre_option_posts_per_page', 'mh_limit_posts_per_page'); 
     89//add_filter('pre_option_posts_per_page', 'mh_limit_posts_per_page'); 
    9090function mh_limit_posts_per_page(){ 
    9191    global $wp_query; 
     
    105105} 
    106106 
    107 add_filter('parse_query', 'my_custom_posts_per_page'); 
     107//add_filter('parse_query', 'my_custom_posts_per_page'); 
    108108function mh_get_board_write_link($post_id = '',$par = ''){ 
    109109    global $wpdb; 
     
    138138} 
    139139function mh_get_board_edit_link(){ 
    140     global $wpdb; 
     140    global $wpdb,$post; 
    141141    $board_link =  get_permalink(); 
     142    $category = wp_get_object_terms(get_the_ID(),'board_cat'); 
     143    $link = ''; 
    142144    if(strstr($board_link, '?')){ 
    143         return $board_link . '&edit=1'; 
    144     } 
    145     return $board_link . '?edit=1'; 
     145        $link = $board_link . '&edit=1';     
     146    }else{ 
     147        $link = $board_link . '?edit=1'; 
     148    } 
     149     
     150    if($category[0]->slug){ 
     151        $link .= '&board_cat='.$category[0]->slug; 
     152    } 
     153    return $link; 
    146154    if($link = get_option('mh_board_edit_link')){ 
    147155        return $link; 
     
    158166        return '/edit'; 
    159167    } 
     168} 
     169function mh_get_board_link_by_board_cat($board_cat = ''){ 
     170    if($board_cat){ 
     171        return get_term_link(intval($board_cat),'board_cat'); 
     172    }else{ 
     173        return get_post_type_archive_link('board'); 
     174    } 
     175 
    160176} 
    161177function mh_update_post_author($post_id , $author = 0){ 
     
    215231    return $board_link; 
    216232} 
    217 function mh_board_edit_link($post_id){ 
     233function mh_board_edit_link($post_id, $board_cat = ''){ 
    218234    global $mh_board_link; 
    219235    if($mh_board_link) 
  • mh-board/trunk/mh-board.php

    r625099 r627983  
    1313 * Plugin Name: MH Board 
    1414 * Plugin URI:  http://ssamture.net 
    15  * Description: 워드프레스 한국형 게시판 플러그인입니다. 별도의 테이블을 생성한 별개가 아니기때문에 다른 플러그인과 숏코드등도 같이 사용 가능합니다. 
     15 * Description: MH Board is bulletin board for WordPress. 
    1616 * Author:      MinHyeong Lim 
    1717 * Author URI:  http://ssamture.net 
    18  * Version:     1.1 
     18 * Version:     1.2 
    1919 * Text Domain: mhboard 
    2020 * Domain Path: /mhb-languages/ 
    2121 */ 
    22 define('MH_BOARD_VERSION','1.1'); 
     22define('MH_BOARD_VERSION','1.2'); 
    2323define('MH_BOARD_UPDATE_URL','http://ssamture.net/mh_board.xml'); 
    2424ini_set('memory_limit', -1); 
     
    240240 
    241241function mh_board_meta_boxes() { 
    242     add_meta_box( 'mh_board_notice', '공지여부', 'mh_board_notice_meta_box', 'board', 'side', 'default'); 
     242    add_meta_box( 'mh_board_notice', __('notice','mhboard'), 'mh_board_notice_meta_box', 'board', 'side', 'default'); 
    243243} 
    244244function mh_board_notice_meta_box($post){ 
     
    247247    <div> 
    248248        <p class="form-field"> 
    249             <label for="notice">공지여부</label> 
     249            <label for="notice"><?php echo __('notice','mhboard');?></label> 
    250250            <input type="checkbox" name="notice" value="1"<?php if($mh_board_notice == 1){echo "checked";}?>/> 
    251251        </p> 
  • mh-board/trunk/mhb-languages/mhboard.po

    r625099 r627983  
    99"Content-Type: text/plain; charset=UTF-8\n" 
    1010"Content-Transfer-Encoding: 8bit\n" 
    11 "PO-Revision-Date: 2012-11-01 10:12+0900\n" 
     11"PO-Revision-Date: 2012-11-21 09:38+0900\n" 
    1212"Last-Translator: MinHyeong Lim <ssamture@gmail.com>\n" 
    1313"Language-Team: Minhyeong Lim <ssamture@gmail.com>\n" 
     
    187187msgstr "첨부파일" 
    188188 
     189msgid "Cancel" 
     190msgstr "취소" 
     191 
     192#admin/mh-board-option.php:9 
     193#admin/mh-board-permission.php:14 
     194msgid "MH Board Permission" 
     195msgstr "게시판 권한 설정" 
     196 
     197#admin/mh-board-permission.php:41 
     198msgid "Read" 
     199msgstr "읽기" 
     200 
     201#templates/default/mhboard-single.php:121 
     202msgid "List" 
     203msgstr "목록" 
     204 
     205#mh-board.php:242,249 
     206msgid "notice" 
     207msgstr "공지" 
     208 
  • mh-board/trunk/readme.txt

    r625527 r627983  
    1010MH Board is bulletin board for WordPress. 
    1111 
     12MH Board available to the community. It’s on your site will create a new space of communication. 
     13 
     14Will be continually updated to provide new features 
     15 
    1216== Description == 
    1317 
    14 MH Board is bulletin board for WordPress. 
     18MH Board is bulletin board for your WordPress. 
     19MH Board available to the community. It’s on your site will create a new space of communication. 
     20Will be continually updated to provide new features 
    1521 
    16 * [Docs](http://ssamture.net/archives/2638) 
    17 * [FAQ](http://ssamture.net/board/board_cat/faq) 
    18 * [Support](http://ssamture.net/community/) 
     22* [Docs(Korean)](http://ssamture.net/archives/2638) 
     23* [FAQ(Korean)](http://ssamture.net/board/board_cat/faq) 
     24* [Support(Korean)](http://ssamture.net/community/) 
     25* [Support(English)](http://en.ssamture.net) 
    1926 
    2027== Installation == 
     
    3643== Changelog == 
    3744= 0.6.2 = 
    38 최초 배포 
     45First released. 
     46 
    3947= 0.6.2 = 
    40 * New : 글쓰기 및 수정 시 고유주소 설정에 따른 링크 자동 생성  
    41 * New : 고유주소 수정시 글쓰기 및 수정 링크 재생성 옵션 추가 
    42 * New : 카테고리 없을 시 오류 해결 
     48* New : Automatic link.  
     49* New : Link re-create when modify the permalink. 
     50* Bugfix : Non category error. 
    4351* Bugfix. 
    4452 
    4553= 0.7.0 = 
    46 * New :  비회원 글쓰기 권한 설정 추가 
    47 * New : 글쓰기 보안 강화 
    48 * New : 에디터 추가 
     54* New :  Add nonmembers writing permission set. 
     55* New : Writing strengthening security. 
     56* New : Add editor. 
    4957 
    5058= 0.7.1 = 
    51 * Bugfix :  고유주소를 기본으로 사용 할 경우 링크 버그 수정 
     59* Bugfix :  Link using the default permalink bug fixes 
    5260 
    5361= 0.7.3 = 
    54 * Bugfix :  관리자 화면에서 게시판 전체 보기가 없어진 버그 수정 
     62* Bugfix :  Admin panel, the entire board was missing bug fixes. 
    5563 
    5664= 0.8.0 = 
    57 * New :  카테고리 표시 유무 
    58 * New : 답글 기능 사용유무 등 설정 추가 
    59 * New : 비공개 글을 대시보드에 안가고 관리자가 바로 확인 할 수 있도록 변경 
     65* New :  Category display/hide 
     66* New : Reply display/hide 
     67* New : Private article did not go to the dashboard so that the administrator can change. 
    6068 
    6169= 0.9.0 = 
    62 * New :  버튼 스타일 지정 
    63 * New : 반응형 웹 지원 
    64 * New : 숏코드 게시판 생성 추가 
     70* New :  Button style 
     71* New : support responsive web 
     72* New : Shortcode to generate support  
    6573 
    6674= 0.9.1 = 
     
    7583= 0.9.4 = 
    7684* Bugfix : add & edit link 
    77 * New : 관리자인 경우 비공개 글에 댓글 등록 가능하도록 추가 
     85* New : If you are an administrator, a private Posts Comments can be registered to add 
    7886* New : permalink for MH Board 
    7987 
     
    99107* New : add function for devloper.  get_recent_mh_board('board_cat slug', 'count'); 
    100108 
     109= 1.2 = 
     110* Bugfix : Permission Bugfix. 
     111* Change : If wrting in the category list, category select box hide. 
     112* Change : Category select box hide in the Edit view. 
     113* New : add list button. 
     114* New : add cancel button. 
    101115 
    102116== Upgrade Notice == 
  • mh-board/trunk/templates/default/mhboard-archive.php

    r625099 r627983  
    200200    $para = ''; 
    201201    if($board_cat){ 
    202         $para = 'board_cat='.$board_cat; 
     202        $para = '&board_cat='.$board_cat; 
    203203    } 
    204204    $redirect_url = '&redirect_url='.urlencode($_SERVER['REDIRECT_URL']); 
    205205    ?> 
    206206    <?php if($guestwrite == '1' || is_user_logged_in()):?> 
    207         <a href="<?php echo wp_nonce_url(mh_get_board_write_link(),'_mh_board_nonce').$redirect_url;?>" class="button"><?php echo __('Write' ,'mhboard');?></a> 
     207        <a href="<?php echo wp_nonce_url(mh_get_board_write_link(),'_mh_board_nonce').$redirect_url.$para;?>" class="button"><?php echo __('Write' ,'mhboard');?></a> 
    208208    <?php endif;?> 
    209209    <div class="pagenavi"> 
  • mh-board/trunk/templates/default/mhboard-edit.php

    r625099 r627983  
    4141        if($update){ 
    4242            if($mh_board_update->update_post()){ 
    43                 echo "<script type='text/javascript'>location.href='".get_post_type_archive_link('board')."';</script>"; 
     43                echo "<script type='text/javascript'>location.href='".mh_get_board_link_by_board_cat($_POST['board_category'])."';</script>"; 
    4444            }else{ 
    4545                 
     
    109109        <?php if(function_exists('wp_nonce_field')) wp_nonce_field('mh_board_nonce','_mh_board_nonce');?> 
    110110        <table cellpadding="0" cellspacing="0"> 
     111            <?php if(isset($_GET['board_cat'])):?> 
     112            <?php 
     113            $category = get_term_by('slug',$_GET['board_cat'],'board_cat'); 
     114            ?> 
     115            <input type="hidden" name="board_category" value="<?php echo $category->term_id;?>"> 
     116            <?php else:?> 
    111117            <?php if(sizeof($categories) > 0):?> 
    112118            <tr> 
     
    121127            </select></td> 
    122128            </tr> 
     129            <?php endif;?> 
    123130            <?php endif;//카테고리?> 
    124131            <tr> 
     
    159166        <div class="action clearfix"> 
    160167            <input type="submit" value="<?php echo __('Edit' ,'mhboard');?>" class="button"> 
     168            <input type="button" value="<?php echo __('Cancel' ,'mhboard');?>" class='button' id="mh-cancel"/> 
    161169            <input type="hidden" name="action" value="update" /> 
    162170        </div>       
  • mh-board/trunk/templates/default/mhboard-single.php

    r625099 r627983  
    11<?php  
    22do_action('mh_board_read_permission'); 
    3 global $mh_board; 
     3global $mh_board,$category; 
    44$mh_board_options = get_option('mh_board_options'); 
    55if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); 
     
    1212        <?php $category =@ wp_get_object_terms(get_the_ID(),'board_cat');?> 
    1313        <?php 
    14              
    1514             
    1615            $author = get_the_author(); 
     
    119118        </form> 
    120119    <?php endif;?> 
     120    <input type="button" name="mh-list" value="<?php echo __('List' ,'mhboard');?>" class='button mh-list' id="mh-cancel"/> 
    121121</div> 
    122122<div class="pagenavi"> 
  • mh-board/trunk/templates/default/mhboard-write.php

    r625099 r627983  
    5555                echo "<script type='text/javascript'>location.href='".$_POST['redirect_to']."';</script>"; 
    5656            }else{ 
    57                 echo "<script type='text/javascript'>location.href='".get_post_type_archive_link('board')."';</script>"; 
     57                echo "<script type='text/javascript'>location.href='".mh_get_board_link_by_board_cat($_POST['board_category'])."';</script>"; 
    5858            } 
    5959        }else{ 
     
    103103            ?> 
    104104            <input type="hidden" name="board_category" value="<?php echo $category[0]->term_id;?>"> 
     105            <?php elseif(isset($_GET['board_cat'])):?> 
     106            <?php 
     107            $category = get_term_by('slug',$_GET['board_cat'],'board_cat'); 
     108            ?> 
     109            <input type="hidden" name="board_category" value="<?php echo $category->term_id;?>"> 
    105110            <?php else:?> 
    106111            <?php if(sizeof($categories) > 0):?> 
     
    151156        <div class="action clearfix"> 
    152157            <input type="submit" value="<?php echo __('Write' ,'mhboard');?>" class="button"> 
     158            <input type="button" value="<?php echo __('Cancel' ,'mhboard');?>" class='button' id="mh-cancel"/> 
    153159            <input type="hidden" name="mh_action" value="post" /> 
    154160        </div>       
  • mh-board/trunk/templates/js/mh_board.js

    r625099 r627983  
    5858        } 
    5959    }); 
     60    jQuery('#mh-cancel').click(function(){ 
     61        history.back(); 
     62    }); 
    6063}); 
  • mh-board/trunk/templates/style.css

    r625099 r627983  
    1818    padding:0px 10px; 
    1919} 
    20 #mh-board input.button:hover{ 
     20#mh-board input.button:hover, 
     21#mh-board-write input.button:hover{ 
    2122    cursor:pointer; 
    2223} 
    23 #mh-board a.button:hover{ 
     24#mh-board a.button:hover, 
     25#mh-board-write a.button:hover{ 
    2426    text-decoration:none; 
    2527} 
     
    9092    text-align:center; 
    9193} 
    92 #mh-board .action form{ 
     94#mh-board .action form, 
     95#mh-board .action .mh-list{ 
    9396    float:right; 
    9497} 
Note: See TracChangeset for help on using the changeset viewer.