Changeset 944228
- Timestamp:
- 07/07/2014 09:05:48 AM (12 years ago)
- Location:
- pondol-bbs/trunk
- Files:
-
- 2 added
- 1 deleted
- 7 edited
-
assets/css/gallery/pondol-bbs.css (modified) (1 diff)
-
assets/js/admin.pondol.bbs.js (added)
-
assets/js/pondolplugin-carousel-creator.js (deleted)
-
includes/class.pondol.bbs.admin.php (modified) (3 diffs)
-
includes/class.pondol.bbs.php (modified) (3 diffs)
-
pages/admin.gallery.images.php (added)
-
pondolbbs.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/gallery/archive-list.php (modified) (1 diff)
-
templates/gallery/archive-view.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pondol-bbs/trunk/assets/css/gallery/pondol-bbs.css
r943236 r944228 4 4 #pondol-bbs-list div.desc {text-align: center;font-weight: normal;width: 120px;margin: 5px;} 5 5 #pondol-bbs-list:after {content:""; display:block; clear:both;} 6 .button_group {content:""; display:block; clear:both; padding:10px;} 7 6 .tablenav {content:""; display:block; clear:both; padding:10px;} 8 7 #pondol-bbs-view table{width:100%;} 9 8 #pondol-bbs-view th {background-color:#CCCCCC; padding:10px;} -
pondol-bbs/trunk/includes/class.pondol.bbs.admin.php
r943236 r944228 14 14 add_action(PONDOL_BBS_TAXO.'_edit_form_fields', array($this, 'pondol_bbs_taxonomy_edit_meta_field')); 15 15 16 add_action( 'edited_'.PONDOL_BBS_TAXO, array( $this, 'save_tax_meta' ), 10, 2 ); 17 add_action( 'create_'.PONDOL_BBS_TAXO, array( $this, 'save_tax_meta' ), 10, 2 ); 16 add_action('edited_'.PONDOL_BBS_TAXO, array( $this, 'save_tax_meta' ), 10, 2 ); 17 add_action('create_'.PONDOL_BBS_TAXO, array( $this, 'save_tax_meta' ), 10, 2 ); 18 add_filter('plugin_row_meta', array($this, 'add_pondol_links'), 10, 2); 19 //save bbs post at back_end 20 add_action('save_post', array($this->ctrl->bbs, 'update_bbs_meta'), 20, 1);//actually open new post 18 21 19 add_filter('plugin_row_meta', array($this, 'add_pondol_links'), 10, 2); 22 //add_action('add_meta_boxes', array($this, 'pondol_bbs_add_post_meta_boxes') ); 23 //add_action('wp_enqueue_scripts', array($this, 'pondol_bbs_admin_scripts')); 24 //wp_enqueue_script( 'pondolbbs-core-script', plugins_url('../assets/js/pondol-bbs.js', __FILE__ ), false, '1.1.0', true); 25 wp_enqueue_script( 'pondolbbs-admin-script', plugins_url('../assets/js/admin.pondol.bbs.js', __FILE__ ), false, '1.0.0', true); 26 } 27 /* 28 function pondol_bbs_add_post_meta_boxes() { 29 add_meta_box( 30 'pondol_bbs_image_box', // Unique ID 31 esc_html__( 'Gallery Image', 'pondol_bbs' ), // Title 32 array( $this, 'pondol_bbs_image_meta_box'), // Callback function 33 PONDOL_BBS, // Admin page (or post type) 34 'side', // Context 35 'default' // Priority 36 ); 20 37 } 21 38 22 39 function pondol_bbs_image_meta_box( $object, $box ) { 40 global $post; 41 //print_r($post); 42 wp_nonce_field( basename( __FILE__ ), 'class.pondol.bbs.admin.php' ); 43 echo '<div id="product_images_container"> 44 <ul class="pondolbbs_gallery_images ui-sortable"> 45 </ul> 46 47 <input type="hidden" id="product_image_gallery" name="product_image_gallery" value=""> 48 49 </div>'; 50 echo '<p class="add_pondolbbs_gallery_images hide-if-no-js"> 51 <a href="#" data-choose="Add Images to Pondol BBS Gallery" data-update="Add to gallery" data-delete="Delete image" data-text="Delete">Add gallery images</a> 52 </p>'; 53 } 54 */ 55 23 56 function pondol_bbs_taxonomy_add_new_meta_field() { 24 57 @include_once PONDOL_BBS_PATH.'pages/admin.taxonomy.edit.php'; … … 38 71 39 72 if ( isset( $_POST['pondol_taxo'] ) ) { 40 $pondol_taxo = array();73 $pondol_taxo = array(); 41 74 $pondol_taxo["skin"] = isset ( $_POST["pondol_taxo"]["skin"] ) ? $_POST["pondol_taxo"]["skin"] : ""; 42 75 $pondol_taxo["copyright"] = isset ( $_POST["pondol_taxo"]["copyright"] ) ? $_POST["pondol_taxo"]["copyright"] : ""; … … 64 97 return $links; 65 98 } 99 100 101 function pondol_bbs_admin_scripts() 102 { 103 wp_enqueue_script( 'pondolbbs-admin-script', plugins_url('../assets/js/admin.pondol.bbs.js', __FILE__ ), false, '1.0.0', true); 104 //wp_enqueue_script( 'pondolbbs-user_ajax-script', plugins_url('../assets/js/dummy_ajax.js', __FILE__ ), false, '1.1.0', true); 105 } 106 107 66 108 } -
pondol-bbs/trunk/includes/class.pondol.bbs.php
r943236 r944228 168 168 //echo count($fileData['name']); 169 169 //exit; 170 $thumImage = true;//as image is attached, the first image set to thumimages 170 171 for ($i = 0; $i < count($fileData['name']); $i++) { 171 172 $imageInfo = @getimagesize($fileData['tmp_name'][$i]); … … 175 176 $key = "public-submission-attachment-{$i}"; 176 177 177 $_FILES[$key] = array();178 $_FILES[$key]['name'] = $fileData['name'][$i];179 $_FILES[$key]['tmp_name'] = $fileData['tmp_name'][$i];180 $_FILES[$key]['type'] = $fileData['type'][$i];181 $_FILES[$key]['error'] = $fileData['error'][$i];182 $_FILES[$key]['size'] = $fileData['size'][$i];178 $_FILES[$key] = array(); 179 $_FILES[$key]['name'] = $fileData['name'][$i]; 180 $_FILES[$key]['tmp_name'] = $fileData['tmp_name'][$i]; 181 $_FILES[$key]['type'] = $fileData['type'][$i]; 182 $_FILES[$key]['error'] = $fileData['error'][$i]; 183 $_FILES[$key]['size'] = $fileData['size'][$i]; 183 184 184 185 $attachmentId = media_handle_upload($key, $POST_ID); … … 186 187 if (!is_wp_error($attachmentId)) {// && wp_attachment_is_image($attachmentId) 모든 파일을 첨부 187 188 $attachmentIds[] = $attachmentId; 188 add_post_meta($POST_ID, PONDOL_BBS_IMAGES, wp_get_attachment_url($attachmentId)); 189 //echo "pass here"; 190 //echo "post_id:", $POST_ID, ", PONDOL_BBS_IMAGES:", PONDOL_BBS_IMAGES, ", wp_get_attachment_url:", wp_get_attachment_url($attachmentId); 189 if(wp_attachment_is_image($attachmentId) && $thumImage){ 190 update_post_meta($POST_ID, '_thumbnail_id', $attachmentId); 191 delete_post_meta($post_ID, PONDOL_BBS_IMAGES); 192 $thumImage = false; 193 }else{ 194 add_post_meta($POST_ID, PONDOL_BBS_IMAGES, wp_get_attachment_url($attachmentId)); 195 } 196 197 198 199 200 191 201 $imageCounter++; 192 202 } else { -
pondol-bbs/trunk/pondolbbs.php
r943236 r944228 5 5 Description: General BBS Program 6 6 Author: Pondol 7 Version: 1.1. 27 Version: 1.1.3 8 8 Author URI: http://www.shop-wiz.com/wp/plugins/pondol_bbs 9 9 License: GPL2 … … 49 49 50 50 //save bbs post at back_end 51 add_action('save_post', array($this->ctrl->bbs, 'update_bbs_meta'), 20, 1);//actually open new post51 //add_action('save_post', array($this->ctrl->bbs, 'update_bbs_meta'), 20, 1);//actually open new post 52 52 53 53 //save bbs post at front_end … … 57 57 { 58 58 add_action("admin_init", array($this->ctrl->admin, 'admin_init')); 59 59 60 60 61 } else {//! is_admin() -
pondol-bbs/trunk/readme.txt
r943236 r944228 4 4 Requires at least: 3.0 5 5 Tested up to: 3.8.1 6 Stable tag: 1.1. 26 Stable tag: 1.1.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 31 31 2. Activate the plugin through the 'Plugins' menu in WordPress 32 32 3. GoTo Pondol BBS > BBS Category and create Category. 33 4. As use this bbs as image gallery, add Image "Featured Images" on admin 33 34 34 35 -
pondol-bbs/trunk/templates/gallery/archive-list.php
r943236 r944228 34 34 <?php 35 35 if(is_array($rows)) foreach($rows as $key => $val){ 36 $meta_values = get_post_meta( $val->ID); 36 //$meta_values = get_post_meta( $val->ID); 37 //print_r(get_post_thumbnail_id($val->ID)); 38 $feat_image = wp_get_attachment_url( get_post_thumbnail_id($val->ID) ); 39 37 40 ?> 38 41 <div id="pondol-bbs-list"> 39 42 <a href="<?php echo $val->guid?>"> 40 <img src="<?php echo $meta_values["pondol_bbs_file"][0];?>" alt="<?php echo $val->post_title;?>" width="110" height="90"> 43 <!--<img src="<?php echo $meta_values["pondol_bbs_file"][0];?>" alt="<?php echo $val->post_title;?>" width="110" height="90">--> 44 <img src="<?php echo $feat_image;?>" alt="<?php echo $val->post_title;?>" width="110" height="90"> 45 46 41 47 </a> 42 48 <div class="desc"><?php echo $val->post_title;?></div> -
pondol-bbs/trunk/templates/gallery/archive-view.php
r943236 r944228 31 31 <?php 32 32 if ( has_post_thumbnail() ) { 33 the_post_thumbnail( thumbnail );//the_post_thumbnail()33 the_post_thumbnail( );//the_post_thumbnail(thumbnail ) 34 34 } 35 35 ?> 36 37 36 <?php if ( have_posts() ) { the_post(); the_content(); }?> 38 37 … … 47 46 </td> 48 47 </tr> 49 50 48 </table> 51 49
Note: See TracChangeset
for help on using the changeset viewer.