Plugin Directory

Changeset 948001


Ignore:
Timestamp:
07/14/2014 07:57:47 AM (12 years ago)
Author:
pondol
Message:

Version: 1.1.6

Location:
pondol-bbs/trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • pondol-bbs/trunk/assets/css/default/pondol-bbs.css

    r943236 r948001  
    1 #pondol-bbs-list > table{width:100%; }
     1/*#pondol-bbs-list > table{width:100%; }*/
     2#pondol-bbs-list > table{display: table;border-collapse: separate;border-spacing: 2px;border-color: gray;
     3border: 0;border-top: 1px solid #ddd;border-bottom: 1px solid #ddd;width: 100%;font-family: Sans-serif;
     4}
     5#pondol-bbs-list thead {display: table-header-group; vertical-align: middle; border-color: inherit;}
    26#pondol-bbs-list th {background-color:#CCCCCC; padding-left:5px; vertical-align: middle;}
    3 #pondol-bbs-list tr {height:40px;}
    4 #pondol-bbs-list td {vertical-align: middle;}
     7#pondol-bbs-list th {border: 0;border-bottom: 1px solid #fff;padding: 7px;white-space: nowrap;text-align: center;color: #333;background: #fff url(bg_th.gif) repeat-x left bottom;line-height: normal;}
    58
     9/*#pondol-bbs-list tr {height:40px;}*/
     10#pondol-bbs-list tr {display: table-row;vertical-align: inherit;border-color: inherit;}
     11#pondol-bbs-list tr:nth-child(even) {  background-color: #fbfbfb; }
     12
     13/*#pondol-bbs-list td {vertical-align: middle;}*/
     14#pondol-bbs-list td {border: 0;border-top: 1px solid #eee;padding: 6px;white-space: nowrap;text-align: center;color: #666;line-height: normal;}
     15#pondol-bbs-list td.title {width: 100%;white-space: normal;text-align: left;}
    616#pondol-bbs-list .tablenav {float:left;}
    717#pondol-bbs-list .button_group {float:right; clear:both;}
  • pondol-bbs/trunk/includes/class.pondol.bbs.admin.php

    r946704 r948001  
    3939
    4040        if ( isset( $_POST['pondol_taxo'] ) ) {
    41             $pondol_taxo                    = array();
    42             $pondol_taxo["skin"]            = isset ( $_POST["pondol_taxo"]["skin"] ) ? $_POST["pondol_taxo"]["skin"] : "";
    43             $pondol_taxo["copyright"]       = isset ( $_POST["pondol_taxo"]["copyright"] ) ? $_POST["pondol_taxo"]["copyright"] : "";
    44             $pondol_taxo["access_write"]    = isset ( $_POST["pondol_taxo"]["access_write"] ) ?  $_POST["pondol_taxo"]["access_write"] : "";
    45             $pondol_taxo["access_read"]     = isset ( $_POST["pondol_taxo"]["access_read"] ) ? $_POST["pondol_taxo"]["access_read"] : "";
    46             $pondol_taxo["access_list"]     = isset ( $_POST["pondol_taxo"]["access_list"] ) ?  $_POST["pondol_taxo"]["access_list"] : "";
    47             $pondol_taxo["files_count"]     = isset ( $_POST["pondol_taxo"]["files_count"] ) ?  $_POST["pondol_taxo"]["files_count"] : "";
    48             $pondol_taxo["dhtml_editor"]    = isset ( $_POST["pondol_taxo"]["dhtml_editor"] ) ?  $_POST["pondol_taxo"]["dhtml_editor"] : "";
    49             $pondol_taxo["bbs_width"]       = isset ( $_POST["pondol_taxo"]["bbs_width"] ) ?  $_POST["pondol_taxo"]["bbs_width"] : "";
    50             $pondol_taxo["list_count"]      = isset ( $_POST["pondol_taxo"]["list_count"] ) ?  $_POST["pondol_taxo"]["list_count"] : "";
    51             $pondol_taxo["bbs_align"]       = isset ( $_POST["pondol_taxo"]["bbs_align"] ) ?  $_POST["pondol_taxo"]["bbs_align"] : "";
     41            $pondol_taxo                        = array();
     42            $pondol_taxo["skin"]                = isset ( $_POST["pondol_taxo"]["skin"] ) ? $_POST["pondol_taxo"]["skin"] : "";
     43            $pondol_taxo["copyright"]           = isset ( $_POST["pondol_taxo"]["copyright"] ) ? $_POST["pondol_taxo"]["copyright"] : "";
     44            $pondol_taxo["access_write"]        = isset ( $_POST["pondol_taxo"]["access_write"] ) ?  $_POST["pondol_taxo"]["access_write"] : "";
     45            $pondol_taxo["access_read"]         = isset ( $_POST["pondol_taxo"]["access_read"] ) ? $_POST["pondol_taxo"]["access_read"] : "";
     46            $pondol_taxo["access_list"]         = isset ( $_POST["pondol_taxo"]["access_list"] ) ?  $_POST["pondol_taxo"]["access_list"] : "";
     47            $pondol_taxo["files_count"]         = isset ( $_POST["pondol_taxo"]["files_count"] ) ?  $_POST["pondol_taxo"]["files_count"] : "";
     48            $pondol_taxo["dhtml_editor"]        = isset ( $_POST["pondol_taxo"]["dhtml_editor"] ) ?  $_POST["pondol_taxo"]["dhtml_editor"] : "";
     49            $pondol_taxo["bbs_width"]           = isset ( $_POST["pondol_taxo"]["bbs_width"] ) ?  $_POST["pondol_taxo"]["bbs_width"] : "";
     50            $pondol_taxo["list_count"]          = isset ( $_POST["pondol_taxo"]["list_count"] ) ?  $_POST["pondol_taxo"]["list_count"] : "";
     51            $pondol_taxo["bbs_align"]           = isset ( $_POST["pondol_taxo"]["bbs_align"] ) ?  $_POST["pondol_taxo"]["bbs_align"] : "";
     52            $pondol_taxo["uploading_files_ext"] = isset ( $_POST["pondol_taxo"]["uploading_files_ext"] ) ?  $_POST["pondol_taxo"]["uploading_files_ext"] : "";
    5253           
    5354            update_option( "taxonomy_".$term_id, $pondol_taxo );
  • pondol-bbs/trunk/includes/class.pondol.bbs.php

    r946704 r948001  
    33
    44    private $ctrl;
     5
    56   
    67    function __construct($controller) {
     
    188189       
    189190                if ($fileData !== '') {
     191                    add_filter('upload_mimes', array($this, 'bbs_upload_mimes'));
     192                    //apply_filters('upload_mimes', $category);
     193                   
     194                   
    190195                    $thumImage = true;//as image is attached, the first image set to thumimages
    191196                    for ($i = 0; $i < count($fileData['name']); $i++) {
     
    201206           
    202207                        $attachmentId = media_handle_upload($key, $POST_ID);
    203                
     208
    204209                        if (!is_wp_error($attachmentId)) {// && wp_attachment_is_image($attachmentId) 모든 파일을 첨부
    205210                            $attachmentIds[] = $attachmentId;
    206211                            if(wp_attachment_is_image($attachmentId) && $thumImage){
    207212                                update_post_meta($POST_ID, '_thumbnail_id', $attachmentId);
    208                                 delete_post_meta($post_ID, PONDOL_BBS_IMAGES);
     213                                //delete_post_meta($post_ID, PONDOL_BBS_IMAGES);
    209214                                $thumImage = false;
    210215                            }else{
     
    227232
    228233    public function insert_into_board($arr){
    229         global $wpdb;
     234        global $wpdb;//$IP                  = $_SERVER['REMOTE_ADDR'];
    230235        //"OP_FIELD"        => $OP_FIELD,
    231236        return $wpdb->query( $wpdb->prepare(
     
    233238                            INSERT INTO
    234239                                ".$this->ctrl->model->get_table_name("board")."
    235                                 (POST_ID, NOTICE, THREAD, FID, USER_ID, USER_NAME, USER_PASSWD, OP_FIELD, COUNT)
     240                                (POST_ID, NOTICE, THREAD, FID, USER_ID, USER_NAME, USER_PASSWD, USER_IP, OP_FIELD, COUNT)
    236241                            VALUES
    237                                 (%s, %d, %s, %s, %s, %s, %s, %s, %d)
     242                                (%s, %d, %s, %s, %s, %s, %s, %s, %s, %d)
    238243                            ",
    239                             $arr["POST_ID"], $arr["NOTICE"], $arr["THREAD"], $arr["FID"], $arr["USER_ID"], $arr["USER_NAME"], $arr["USER_PASSWD"], $arr["OP_FIELD"], $arr["COUNT"]
     244                            $arr["POST_ID"], $arr["NOTICE"], $arr["THREAD"], $arr["FID"], $arr["USER_ID"], $arr["USER_NAME"], $arr["USER_PASSWD"], $_SERVER['REMOTE_ADDR'], $arr["OP_FIELD"], $arr["COUNT"]
    240245                    ) );
    241246    }//end of insert_into_board
     
    249254                    NOTICE      = %d,
    250255                    USER_NAME   = %s,
    251                     OP_FIELD    = %s
     256                    OP_FIELD    = %s,
     257                    USER_IP     = %s
    252258                WHERE
    253259                    POST_ID     = %d
    254260                ",
    255                 $arr["NOTICE"], $arr["USER_NAME"], $arr["OP_FIELD"], $arr["POST_ID"]
     261                $arr["NOTICE"], $arr["USER_NAME"], $arr["OP_FIELD"],$_SERVER['REMOTE_ADDR'], $arr["POST_ID"]
    256262            ) );
    257263    }//end of update_into_board
     
    464470    }
    465471   
     472    public function bbs_upload_mimes($existing_mimes=array()){
     473        $toxonomy = $this->ctrl->func->get_custom_taxonomy();
     474        $uploading_files_ext =  $toxonomy->pondol_taxo["uploading_files_ext"];
     475       
     476        $exts = explode(",", $uploading_files_ext);
     477       
     478        if(is_array($exts)) foreach($exts as $key => $val){
     479            $val    = trim($val);
     480            switch(strtolower($val)){
     481                case "hwp":
     482                    $existing_mimes['hwp'] = 'application/hangul';
     483                    break;
     484                   
     485                default:
     486                    $existing_mimes[$val] = 'file/unknown';
     487                    break;
     488               
     489            }
     490        }
     491       
     492        return $existing_mimes;
     493    }
     494   
    466495}
    467496
  • pondol-bbs/trunk/includes/class.pondol.bbs.templates.php

    r946704 r948001  
    263263        $row = $wpdb->get_row("
    264264                        select
    265                             p.*, b.USER_NAME, b.OP_FIELD, b.FID
     265                            p.*, b.USER_NAME, b.OP_FIELD, b.FID, b.COUNT, b.USER_IP
    266266                        from
    267267                            ".$this->ctrl->model->get_table_name("board")." b
  • pondol-bbs/trunk/pages/admin.taxonomy.edit.php

    r946704 r948001  
    125125                    </td>
    126126                </tr>
     127                <tr class="form-field">
     128                    <th scope="row" for="pondol_taxo[uploading_files_ext]">
     129                        <label><?php _e( 'Allow Files Ext.', 'pondol_bbs' );?></label>
     130                    </th>
     131                    <td>
     132                        <input type="text" value="<?php echo $pondol_taxo["uploading_files_ext"];?>" name="pondol_taxo[uploading_files_ext]">
     133                    </br>
     134                        <span class="description"><?php _e( 'If you want to enable upload, put file extension seperate as comma(,)', 'pondol_bbs' )?></span>
     135                        <br>
     136                        <span class="description"><?php _e( 'ex) hwp, ddr', 'pondol_bbs' )?></span>
     137                        <br>
     138                        <span class="description"><?php _e( 'See http://codex.wordpress.org/Uploading_Files, if you want to know what default extention wordpress allow', 'pondol_bbs' )?></span>
     139                    </td>
     140                </tr>
    127141            </tbody>
    128142        </table>
  • pondol-bbs/trunk/pondolbbs.php

    r946704 r948001  
    55Description: General BBS Program
    66Author: Pondol
    7 Version: 1.1.5
     7Version: 1.1.6
    88Author URI: http://www.shop-wiz.com/wp/plugins/pondol_bbs
    99License: GPL2
     
    2121define('PONDOL_URL', 'http://www.shop-wiz.com');
    2222define('PONDOL_EMAIL', '[email protected]');
    23 define('PONDOL_BBS_VERSION', '1.1.5');
     23define('PONDOL_BBS_VERSION', '1.1.6');
    2424define('PONDOL_BBS', 'bbs');
    2525define('PONDOL_BBS_TAXO', 'board');
     
    3737   
    3838    public function init() {
    39        
    4039       
    4140        $this->ctrl = new Pondol_BBS_Controller();
  • pondol-bbs/trunk/readme.txt

    r946704 r948001  
    3838
    3939== Changelog ==
     40= 1.1.6 =
     41insert writer ip
     42add user allow extension
     43
     44
    4045= 1.1.5 =
    4146debuggin prohibit a nologinuser could access items what ohter nobody users wrote 
  • pondol-bbs/trunk/templates/default/archive-list.php

    r946704 r948001  
    5555            ?>
    5656            <tr>
    57                 <td><?php _e( 'Notice', 'pondol_bbs' ); ?></td>
    58                 <td><a href="javascript:goto_bbs_view('<?php echo $val->guid?>', '<?php echo $val->ID;?>')"><?php echo $val->bbs_title;?></a></td>
    59                 <td><?php echo $val->USER_NAME;?></td>
    60                 <td><?php echo date("Y.m.d", strtotime($val->post_date));?></td>
    61                 <td><?php echo number_format($val->COUNT);?></td>
     57                <td class="num"><?php _e( 'Notice', 'pondol_bbs' ); ?></td>
     58                <td class="title"><a href="javascript:goto_bbs_view('<?php echo $val->guid?>', '<?php echo $val->ID;?>')"><?php echo $val->bbs_title;?></a></td>
     59                <td calss="author"><?php echo $val->USER_NAME;?></td>
     60                <td calss="date"><?php echo date("Y.m.d", strtotime($val->post_date));?></td>
     61                <td class="vcount"><?php echo number_format($val->COUNT);?></td>
    6262            </tr>
    6363            <?php } ?>
     
    6666            ?>
    6767            <tr>
    68                 <td><?php echo ($start_no - $key); ?></td>
    69                 <td><a href="javascript:goto_bbs_view('<?php echo $val->guid?>', '<?php echo $val->ID;?>')"><?php echo $val->bbs_title;?></a></td>
    70                 <td><?php echo $val->USER_NAME;?></td>
    71                 <td><?php echo date("Y.m.d", strtotime($val->post_date));?></td>
    72                 <td><?php echo number_format($val->COUNT);?></td>
     68                <td class="num"><?php echo ($start_no - $key); ?></td>
     69                <td class="title"><a href="javascript:goto_bbs_view('<?php echo $val->guid?>', '<?php echo $val->ID;?>')"><?php echo $val->bbs_title;?></a></td>
     70                <td calss="author"><?php echo $val->USER_NAME;?></td>
     71                <td calss="date"><?php echo date("Y.m.d", strtotime($val->post_date));?></td>
     72                <td class="vcount"><?php echo number_format($val->COUNT);?></td>
    7373            </tr>
    7474           
Note: See TracChangeset for help on using the changeset viewer.