├── README.md ├── LICENSE └── Plugin.php /README.md: -------------------------------------------------------------------------------- 1 | # PasteImage 2 | 为 Typecho 自带编辑器增加粘贴图片上传功能 3 | 4 | Typecho 最新开发版已经 [直接支持粘贴上传功能](https://github.com/typecho/typecho/commit/0b1096c588a68ac83eac283862fedb459afb3327),本插件仅供旧版本使用。 5 | 6 | ## 安装方法 7 | 1. Download ZIP 下载本插件最新版本 8 | 2. 解压,把 `PasteImage-master` 目录重命名为 `PasteImage` 上传至博客的 `/usr/plugins` 目录下 9 | 3. 在插件页面启用本插件 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Zou Guoqing 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Plugin.php: -------------------------------------------------------------------------------- 1 | bottom = array('PasteImage_Plugin', 'render'); 24 | Typecho_Plugin::factory('admin/write-page.php')->bottom = array('PasteImage_Plugin', 'render'); 25 | } 26 | 27 | /** 28 | * 禁用插件方法,如果禁用失败,直接抛出异常 29 | * 30 | * @static 31 | * @access public 32 | * @return void 33 | * @throws Typecho_Plugin_Exception 34 | */ 35 | public static function deactivate(){} 36 | 37 | /** 38 | * 获取插件配置面板 39 | * 40 | * @access public 41 | * @param Typecho_Widget_Helper_Form $form 配置面板 42 | * @return void 43 | */ 44 | public static function config(Typecho_Widget_Helper_Form $form){} 45 | 46 | /** 47 | * 个人用户的配置面板 48 | * 49 | * @access public 50 | * @param Typecho_Widget_Helper_Form $form 51 | * @return void 52 | */ 53 | public static function personalConfig(Typecho_Widget_Helper_Form $form){} 54 | 55 | /** 56 | * 插件实现方法 57 | * 58 | * @access public 59 | * @return void 60 | */ 61 | public static function render() 62 | { 63 | 64 | Typecho_Widget::widget('Widget_Options')->to($options); 65 | ?> 66 | 251 |