Changeset 450960
- Timestamp:
- 10/14/2011 08:53:17 AM (14 years ago)
- Location:
- banner-manager/trunk
- Files:
-
- 3 added
- 6 edited
- 1 moved
-
banner-manager.php (modified) (2 diffs)
-
languages (moved) (moved from banner-manager/trunk/lang)
-
languages/banner-manager-eu.mo (added)
-
languages/banner-manager-eu.po (added)
-
languages/default.pot (added)
-
pages.php (modified) (4 diffs)
-
templates/banners.php (modified) (11 diffs)
-
templates/categories.php (modified) (7 diffs)
-
templates/layout.php (modified) (1 diff)
-
widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
banner-manager/trunk/banner-manager.php
r371341 r450960 9 9 License: GPL3 10 10 */ 11 12 11 13 12 define('BM_PLUGIN_DIR', dirname(__FILE__)); … … 23 22 24 23 // textgdomain 25 load_plugin_textdomain( 'banner-manager', null, BM_PLUGIN_DIR .'/lang/');24 load_plugin_textdomain('banner-manager', false, basename(dirname(__FILE__)) .'/languages'); 26 25 27 26 // Install plugin -
banner-manager/trunk/pages.php
r317177 r450960 24 24 public function set_menu() 25 25 { 26 add_menu_page(__('Banner manager' ), __('Banners'), 'level_5', 'bm-index', array($this, 'page_load'));26 add_menu_page(__('Banner manager', 'banner-manager'), __('Banners', 'banner-manager'), 'level_5', 'bm-index', array($this, 'page_load')); 27 27 } 28 28 … … 32 32 public function set_submenu() 33 33 { 34 add_submenu_page('bm-index', __('Categories' ), __('Categories'), 'level_5', 'bm-categories', array($this, 'page_load'));34 add_submenu_page('bm-index', __('Categories', 'banner-manager'), __('Categories', 'banner-manager'), 'level_5', 'bm-categories', array($this, 'page_load')); 35 35 } 36 36 … … 95 95 { 96 96 data::new_banner( $category, $title, $src, $link, $blank, $active, $groupkey ); 97 $params['message'] = __('Banner saved.' );97 $params['message'] = __('Banner saved.', 'banner-manager'); 98 98 } 99 99 else 100 100 { 101 101 data::update_banner( $id, $category, $title, $src, $link, $blank, $active, $groupkey ); 102 $params['message'] = __('Banner edited.' );102 $params['message'] = __('Banner edited.', 'banner-manager'); 103 103 } 104 104 break; 105 105 case 'delete': 106 106 data::del_banner($id); 107 $params['message'] = __('Banner deleted.' );107 $params['message'] = __('Banner deleted.', 'banner-manager'); 108 108 break; 109 109 case 'edit': … … 128 128 { 129 129 data::new_category($category, $width, $height); 130 $params['message'] = __('Category saved.' );130 $params['message'] = __('Category saved.', 'banner-manager'); 131 131 } 132 132 else 133 133 { 134 134 data::update_category($id, $category, $width, $height); 135 $params['message'] = __('Category edited.' );135 $params['message'] = __('Category edited.', 'banner-manager'); 136 136 } 137 137 break; 138 138 case 'delete': 139 139 data::del_category($id); 140 $params['message'] = __('Banner deleted.' );140 $params['message'] = __('Banner deleted.', 'banner-manager'); 141 141 break; 142 142 case 'edit': -
banner-manager/trunk/templates/banners.php
r317177 r450960 3 3 <?php $this->start('title') ?> 4 4 <h2> 5 <?php _e('Banners' )?>6 <a class="button add-new-h2" href="?page=bm-index"><?php _e('Add New' )?></a>5 <?php _e('Banners', 'banner-manager')?> 6 <a class="button add-new-h2" href="?page=bm-index"><?php _e('Add New', 'banner-manager')?></a> 7 7 </h2> 8 8 <?php $this->stop() ?> … … 28 28 <?php if(isset($categories)): ?> 29 29 <select name="filter_category"> 30 <option value=""><?php _e('View all categories' )?></option>30 <option value=""><?php _e('View all categories', 'banner-manager')?></option> 31 31 <?php foreach($categories as $category): ?> 32 32 <option value="<?php echo $category->id;?>"<?php echo ($category->id==$filter_category)? ' selected=""':'';?>><?php echo $category->groups; ?></option> … … 36 36 37 37 <select class="postform" id="cat" name="filter_active"> 38 <option value=""><?php _e('View all actives' )?></option>39 <option value="1"<?php echo ($filter_active=='1')? ' selected=""':'';?>><?php _e('Yes' )?></option>40 <option value="0"<?php echo ($filter_active=='0')? ' selected=""':'';?>><?php _e('No' )?></option>38 <option value=""><?php _e('View all actives', 'banner-manager')?></option> 39 <option value="1"<?php echo ($filter_active=='1')? ' selected=""':'';?>><?php _e('Yes', 'banner-manager')?></option> 40 <option value="0"<?php echo ($filter_active=='0')? ' selected=""':'';?>><?php _e('No', 'banner-manager')?></option> 41 41 </select> 42 <input type="submit" class="button-secondary" value="<?php _e('Filter' );?>" id="post-query-submit">42 <input type="submit" class="button-secondary" value="<?php _e('Filter', 'banner-manager');?>" id="post-query-submit"> 43 43 </div> 44 44 </form> … … 50 50 <thead> 51 51 <tr> 52 <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Banner' )?></th>53 <th style="" class="manage-column column-name" scope="col"><?php _e('Category' )?></th>54 <th style="" class="manage-column column-name" scope="col"><?php _e('Group' )?></th>55 <th style="" class="manage-column column-name" scope="col"><?php _e('Views' )?></th>56 <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks' )?></th>57 <th style="" class="manage-column column-name" scope="col"><?php _e('Active' )?></th>52 <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Banner', 'banner-manager')?></th> 53 <th style="" class="manage-column column-name" scope="col"><?php _e('Category', 'banner-manager')?></th> 54 <th style="" class="manage-column column-name" scope="col"><?php _e('Group', 'banner-manager')?></th> 55 <th style="" class="manage-column column-name" scope="col"><?php _e('Views', 'banner-manager')?></th> 56 <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks', 'banner-manager')?></th> 57 <th style="" class="manage-column column-name" scope="col"><?php _e('Active', 'banner-manager')?></th> 58 58 </tr> 59 59 </thead> … … 61 61 <tfoot> 62 62 <tr> 63 <th style="" class="manage-column column-name" scope="col"><?php _e('Banner' )?></th>64 <th style="" class="manage-column column-name" scope="col"><?php _e('Category' )?></th>65 <th style="" class="manage-column column-name" scope="col"><?php _e('Group' )?></th>66 <th style="" class="manage-column column-name" scope="col"><?php _e('Views' )?></th>67 <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks' )?></th>68 <th style="" class="manage-column column-name" scope="col"><?php _e('Active' )?></th>63 <th style="" class="manage-column column-name" scope="col"><?php _e('Banner', 'banner-manager')?></th> 64 <th style="" class="manage-column column-name" scope="col"><?php _e('Category', 'banner-manager')?></th> 65 <th style="" class="manage-column column-name" scope="col"><?php _e('Group', 'banner-manager')?></th> 66 <th style="" class="manage-column column-name" scope="col"><?php _e('Views', 'banner-manager')?></th> 67 <th style="" class="manage-column column-name" scope="col"><?php _e('Clicks', 'banner-manager')?></th> 68 <th style="" class="manage-column column-name" scope="col"><?php _e('Active', 'banner-manager')?></th> 69 69 </tr> 70 70 </tfoot> … … 75 75 <tr class="alternate" id="tag-1"> 76 76 <td class="name column-name"> 77 <a href="?page=bm-index&status=edit&id=<?php echo $i_banner->id?>" class="row-title"><?php echo empty($i_banner->title)? '['.__('Empty' ).']' : $i_banner->title;?></a>77 <a href="?page=bm-index&status=edit&id=<?php echo $i_banner->id?>" class="row-title"><?php echo empty($i_banner->title)? '['.__('Empty', 'banner-manager').']' : $i_banner->title;?></a> 78 78 <div class="row-actions"> 79 <span class="edit"><a title="<?php _e('Edit this item' )?>" href="?page=bm-index&status=edit&id=<?php echo $i_banner->id?>&<?php echo $url_query; ?>"><?php _e('Edit')?></a> | </span>80 <span class="trash"><a href="?page=bm-index&status=delete&id=<?php echo $i_banner->id?>&<?php echo $url_query; ?>" class="delete" title="<?php _e('Move this item to the Trash' )?>" class="submitdelete"><?php _e('Trash')?></a> | </span>81 <span class="view"><a rel="permalink" title="<?php _e('View' )?>" target="_blank" href="<?php echo $i_banner->src;?>&<?php echo $url_query; ?>"><?php _e('View')?></a></span>79 <span class="edit"><a title="<?php _e('Edit this item', 'banner-manager')?>" href="?page=bm-index&status=edit&id=<?php echo $i_banner->id?>&<?php echo $url_query; ?>"><?php _e('Edit', 'banner-manager')?></a> | </span> 80 <span class="trash"><a href="?page=bm-index&status=delete&id=<?php echo $i_banner->id?>&<?php echo $url_query; ?>" class="delete" title="<?php _e('Move this item to the Trash', 'banner-manager')?>" class="submitdelete"><?php _e('Trash', 'banner-manager')?></a> | </span> 81 <span class="view"><a rel="permalink" title="<?php _e('View', 'banner-manager')?>" target="_blank" href="<?php echo $i_banner->src;?>&<?php echo $url_query; ?>"><?php _e('View', 'banner-manager')?></a></span> 82 82 </div> 83 83 </td> … … 86 86 <td class="column-name"><?php echo $i_banner->views;?></td> 87 87 <td class="column-name"><?php echo $i_banner->clicks;?></td> 88 <td class="column-name"><?php echo ($i_banner->active)? __('Yes' ) : __('No') ;?></td>88 <td class="column-name"><?php echo ($i_banner->active)? __('Yes', 'banner-manager') : __('No', 'banner-manager') ;?></td> 89 89 </tr> 90 90 <?php endforeach;?> 91 91 <?php else: ?> 92 92 <tr class="alternate" id="tag-1"> 93 <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty' );?></a></td>94 <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty' );?></a></td>93 <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty', 'banner-manager');?></a></td> 94 <td class="name column-name"><a href="#" class="row-title"><?php _e('Empty', 'banner-manager');?></a></td> 95 95 </tr> 96 96 <?php endif; ?> … … 110 110 <div class="form-wrap"> 111 111 <?php if(!isset($banner->id)): ?> 112 <h3><?php _e('Add New Banner' )?></h3>112 <h3><?php _e('Add New Banner', 'banner-manager')?></h3> 113 113 <?php else: ?> 114 <h3><?php _e('Edit Banner' )?></h3>114 <h3><?php _e('Edit Banner', 'banner-manager')?></h3> 115 115 <?php endif; ?> 116 116 <form class="validate" action="?page=bm-index&status=new" method="post" enctype="multipart/form-data"> 117 117 <div class="form-field form-required"> 118 <label for="tag-name"><?php _e('Category' )?></label>118 <label for="tag-name"><?php _e('Category', 'banner-manager')?></label> 119 119 <?php if(isset($categories)): ?> 120 120 <select name="category"> … … 125 125 <?php endif; ?> 126 126 127 <label for="tag-name"><?php _e('Title' )?></label>127 <label for="tag-name"><?php _e('Title', 'banner-manager')?></label> 128 128 <input type="text" size="40" value="<?php echo isset($banner->title)? $banner->title : '';?>" name="title"> 129 129 130 <label for="tag-name"><?php _e('Src' )?></label>130 <label for="tag-name"><?php _e('Src', 'banner-manager')?></label> 131 131 <input type="file" size="40" value="" name="src"> 132 132 … … 136 136 <?php endif; ?> 137 137 138 <label for="tag-name"><?php _e('Link' )?></label>138 <label for="tag-name"><?php _e('Link', 'banner-manager')?></label> 139 139 <input type="text" size="40" value="<?php echo isset($banner->link)? $banner->link : '';?>" name="link"> 140 140 141 <label for="tag-name"><?php _e('Blank' )?></label>141 <label for="tag-name"><?php _e('Blank', 'banner-manager')?></label> 142 142 <input type="checkbox" size="40" value="1" name="blank" <?php echo empty($banner->blank)? '' : 'checked="checked"';?>> 143 143 144 <label for="tag-name"><?php _e('Active' )?></label>144 <label for="tag-name"><?php _e('Active', 'banner-manager')?></label> 145 145 <input type="checkbox" size="40" value="1" name="active" <?php echo empty($banner->active)? '' : 'checked="checked"';?>> 146 146 147 <label for="tag-name"><?php _e('Group' )?> (<?php _e('Only one banner of group in same page') ?>)</label>147 <label for="tag-name"><?php _e('Group', 'banner-manager')?> (<?php _e('Only one banner of group in same page', 'banner-manager') ?>)</label> 148 148 <input type="text" size="40" value="<?php echo isset($banner->groupkey)? $banner->groupkey : '';?>" name="groupkey"> 149 149 … … 155 155 <p class="submit"> 156 156 <?php if(!isset($banner->id)): ?> 157 <input type="submit" value="<?php _e('Add New Banner' )?>" name="submit" class="button">157 <input type="submit" value="<?php _e('Add New Banner', 'banner-manager')?>" name="submit" class="button"> 158 158 <?php else: ?> 159 <input type="submit" value="<?php _e('Edit Banner' )?>" name="submit" class="button">159 <input type="submit" value="<?php _e('Edit Banner', 'banner-manager')?>" name="submit" class="button"> 160 160 <?php endif; ?> 161 161 </p> -
banner-manager/trunk/templates/categories.php
r315555 r450960 2 2 3 3 <?php $this->start('title') ?> 4 <h2><?php _e('Categories' )?></h2>4 <h2><?php _e('Categories', 'banner-manager')?></h2> 5 5 <?php $this->stop();?> 6 6 … … 22 22 <thead> 23 23 <tr> 24 <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Category' )?></th>25 <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag' )?></th>24 <th style="" class="manage-column column-name" id="name" scope="col"><?php _e('Category', 'banner-manager')?></th> 25 <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag', 'banner-manager')?></th> 26 26 27 27 </tr> … … 30 30 <tfoot> 31 31 <tr> 32 <th style="" class="manage-column column-name" scope="col"><?php _e('Category' )?></th>33 <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag' )?></th>32 <th style="" class="manage-column column-name" scope="col"><?php _e('Category', 'banner-manager')?></th> 33 <th style="" class="manage-column column-name" scope="col"><?php _e('Template tag', 'banner-manager')?></th> 34 34 </tr> 35 35 </tfoot> … … 42 42 <strong><a href="?page=bm-categories&status=edit&id=<?php echo $i_category->id; ?>" class="row-title"><?php echo $i_category->groups?></a></strong> 43 43 <div class="row-actions"> 44 <span class="edit"><a title="<?php _e('Edit this item' )?>" href="?page=bm-categories&status=edit&id=<?php echo $i_category->id; ?>"><?php _e('Edit')?></a> | </span>45 <span class="trash"><a class="delete" href="?page=bm-categories&status=delete&id=<?php echo $i_category->id; ?>" title="<?php _e('Move this item to the Trash' )?>" class="submitdelete"><?php _e('Trash')?></a></span>44 <span class="edit"><a title="<?php _e('Edit this item', 'banner-manager')?>" href="?page=bm-categories&status=edit&id=<?php echo $i_category->id; ?>"><?php _e('Edit', 'banner-manager')?></a> | </span> 45 <span class="trash"><a class="delete" href="?page=bm-categories&status=delete&id=<?php echo $i_category->id; ?>" title="<?php _e('Move this item to the Trash', 'banner-manager')?>" class="submitdelete"><?php _e('Trash', 'banner-manager')?></a></span> 46 46 </div> 47 47 </td> … … 52 52 <tr class="alternate" id="tag-1"> 53 53 <td class="name column-name"> 54 <strong><a href="#" class="row-title"><?php _e('Without category' );?></a></strong>54 <strong><a href="#" class="row-title"><?php _e('Without category', 'banner-manager');?></a></strong> 55 55 </td> 56 56 </tr> … … 72 72 <div class="form-wrap"> 73 73 <?php if(!isset($category->id)): ?> 74 <h3><?php _e('Add New Category' )?></h3>74 <h3><?php _e('Add New Category', 'banner-manager')?></h3> 75 75 <?php else: ?> 76 <h3><?php _e('Edit Category' )?></h3>76 <h3><?php _e('Edit Category', 'banner-manager')?></h3> 77 77 <?php endif; ?> 78 78 <form class="validate" action="?page=bm-categories&status=new" method="post"> 79 79 <div class="form-field form-required"> 80 80 81 <label for="tag-name"><?php _e('Name' )?></label>81 <label for="tag-name"><?php _e('Name', 'banner-manager')?></label> 82 82 <input type="text" size="40" value="<?php echo isset($category->groups)? $category->groups : '';?>" name="category"> 83 83 84 <label for="tag-name"><?php _e('Width' )?> (px)</label>84 <label for="tag-name"><?php _e('Width', 'banner-manager')?> (px)</label> 85 85 <input type="text" size="5" value="<?php echo isset($category->width)? $category->width : '';?>" name="width"> 86 86 87 <label for="tag-name"><?php _e('Height' )?> (px)</label>87 <label for="tag-name"><?php _e('Height', 'banner-manager')?> (px)</label> 88 88 <input type="text" size="5" value="<?php echo isset($category->height)? $category->height : '';?>" name="height"> 89 89 … … 95 95 <p class="submit"> 96 96 <?php if(!isset($category->id)): ?> 97 <input type="submit" value="<?php _e('Add New Category' )?>" name="submit" class="button">97 <input type="submit" value="<?php _e('Add New Category', 'banner-manager')?>" name="submit" class="button"> 98 98 <?php else: ?> 99 <input type="submit" value="<?php _e('Edit Category' )?>" name="submit" class="button">99 <input type="submit" value="<?php _e('Edit Category', 'banner-manager')?>" name="submit" class="button"> 100 100 <?php endif; ?> 101 101 </p> -
banner-manager/trunk/templates/layout.php
r291811 r450960 19 19 jQuery(".delete").click(function(){ 20 20 var href = jQuery(this).attr('href'); 21 var answer = confirm("<?php _e('Do you like delete this?' );?>")21 var answer = confirm("<?php _e('Do you like delete this?', 'banner-manager');?>") 22 22 if(answer) 23 23 { -
banner-manager/trunk/widget.php
r327531 r450960 5 5 public function banner_widget() 6 6 { 7 $widget_ops = array('description' => __( "Your banners" ) );7 $widget_ops = array('description' => __( "Your banners", 'banner-manager' ) ); 8 8 parent::WP_Widget(false, $name = 'Banners', $widget_ops); 9 9 }
Note: See TracChangeset
for help on using the changeset viewer.