Changeset 948001
- Timestamp:
- 07/14/2014 07:57:47 AM (12 years ago)
- Location:
- pondol-bbs/trunk
- Files:
-
- 1 added
- 8 edited
-
assets/css/default/bg_th.gif (added)
-
assets/css/default/pondol-bbs.css (modified) (1 diff)
-
includes/class.pondol.bbs.admin.php (modified) (1 diff)
-
includes/class.pondol.bbs.php (modified) (7 diffs)
-
includes/class.pondol.bbs.templates.php (modified) (1 diff)
-
pages/admin.taxonomy.edit.php (modified) (1 diff)
-
pondolbbs.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
templates/default/archive-list.php (modified) (2 diffs)
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; 3 border: 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;} 2 6 #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;} 5 8 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;} 6 16 #pondol-bbs-list .tablenav {float:left;} 7 17 #pondol-bbs-list .button_group {float:right; clear:both;} -
pondol-bbs/trunk/includes/class.pondol.bbs.admin.php
r946704 r948001 39 39 40 40 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"] : ""; 52 53 53 54 update_option( "taxonomy_".$term_id, $pondol_taxo ); -
pondol-bbs/trunk/includes/class.pondol.bbs.php
r946704 r948001 3 3 4 4 private $ctrl; 5 5 6 6 7 function __construct($controller) { … … 188 189 189 190 if ($fileData !== '') { 191 add_filter('upload_mimes', array($this, 'bbs_upload_mimes')); 192 //apply_filters('upload_mimes', $category); 193 194 190 195 $thumImage = true;//as image is attached, the first image set to thumimages 191 196 for ($i = 0; $i < count($fileData['name']); $i++) { … … 201 206 202 207 $attachmentId = media_handle_upload($key, $POST_ID); 203 208 204 209 if (!is_wp_error($attachmentId)) {// && wp_attachment_is_image($attachmentId) 모든 파일을 첨부 205 210 $attachmentIds[] = $attachmentId; 206 211 if(wp_attachment_is_image($attachmentId) && $thumImage){ 207 212 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); 209 214 $thumImage = false; 210 215 }else{ … … 227 232 228 233 public function insert_into_board($arr){ 229 global $wpdb; 234 global $wpdb;//$IP = $_SERVER['REMOTE_ADDR']; 230 235 //"OP_FIELD" => $OP_FIELD, 231 236 return $wpdb->query( $wpdb->prepare( … … 233 238 INSERT INTO 234 239 ".$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) 236 241 VALUES 237 (%s, %d, %s, %s, %s, %s, %s, %s, % d)242 (%s, %d, %s, %s, %s, %s, %s, %s, %s, %d) 238 243 ", 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"] 240 245 ) ); 241 246 }//end of insert_into_board … … 249 254 NOTICE = %d, 250 255 USER_NAME = %s, 251 OP_FIELD = %s 256 OP_FIELD = %s, 257 USER_IP = %s 252 258 WHERE 253 259 POST_ID = %d 254 260 ", 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"] 256 262 ) ); 257 263 }//end of update_into_board … … 464 470 } 465 471 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 466 495 } 467 496 -
pondol-bbs/trunk/includes/class.pondol.bbs.templates.php
r946704 r948001 263 263 $row = $wpdb->get_row(" 264 264 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 266 266 from 267 267 ".$this->ctrl->model->get_table_name("board")." b -
pondol-bbs/trunk/pages/admin.taxonomy.edit.php
r946704 r948001 125 125 </td> 126 126 </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> 127 141 </tbody> 128 142 </table> -
pondol-bbs/trunk/pondolbbs.php
r946704 r948001 5 5 Description: General BBS Program 6 6 Author: Pondol 7 Version: 1.1. 57 Version: 1.1.6 8 8 Author URI: http://www.shop-wiz.com/wp/plugins/pondol_bbs 9 9 License: GPL2 … … 21 21 define('PONDOL_URL', 'http://www.shop-wiz.com'); 22 22 define('PONDOL_EMAIL', '[email protected]'); 23 define('PONDOL_BBS_VERSION', '1.1. 5');23 define('PONDOL_BBS_VERSION', '1.1.6'); 24 24 define('PONDOL_BBS', 'bbs'); 25 25 define('PONDOL_BBS_TAXO', 'board'); … … 37 37 38 38 public function init() { 39 40 39 41 40 $this->ctrl = new Pondol_BBS_Controller(); -
pondol-bbs/trunk/readme.txt
r946704 r948001 38 38 39 39 == Changelog == 40 = 1.1.6 = 41 insert writer ip 42 add user allow extension 43 44 40 45 = 1.1.5 = 41 46 debuggin prohibit a nologinuser could access items what ohter nobody users wrote -
pondol-bbs/trunk/templates/default/archive-list.php
r946704 r948001 55 55 ?> 56 56 <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> 62 62 </tr> 63 63 <?php } ?> … … 66 66 ?> 67 67 <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> 73 73 </tr> 74 74
Note: See TracChangeset
for help on using the changeset viewer.