首个优雅的TE手机客户端1815 阅
简介
这是权那他专为typecho博客写的android客户端
利用XMLRPC接口,无需繁琐操作,简单方便,轻松快捷。
目前版本已经支持多博客使用,独立页面编辑,撰写/编辑/删除文章,评论处理,评论回复,数据统计,评论查看,图片上传,文件管理等功能
使用方法
1.下载南博最新版本
2.下载最新版本XMLRPC替换原文件:https://github.com/kraity/typecho-xmlrpc
源文件地址:/var/Widget/XmlRpc.php
具体操作截图
1)管理员账号登陆:
2)文章发布及删除
3)测试文件上传及预览
持续更新中
注意:文件上传失败情况
key | value | 备注 | |
---|---|---|---|
通知 | 已修复上传文件限制问题 | 5 | |
更新 | 修改/var/Widget/Upload.php | 6 | |
需修改代码 | if (!file_put_contents($path, $file['bytes'])) {} | 7 | |
目标代码 | if (!file_put_contents($path, base64_decode($file['bytes']))) {} | 7 |
如果你使用了其他的附件上传插件,则可能无法使用上传图片,应为都没有写byte流写入内容的考虑
注意:新版本需要base64解密 base64_decode($file['bytes'])
key | value | |
---|---|---|
南博版本 | v1.5 | |
插件 | OssForTypecho | |
插件名字 | 阿里云OSS上传插件 | |
位置 | https://github.com/jqjiang819/typecho-plugin-ossfile/blob/master/Plugin.php |
//152行
$result = $ossClient->uploadFile($options->bucket, substr($path,1), $uploadfile);
//改为
if (isset($file['tmp_name'])) {
$result = $ossClient->uploadFile($options->bucket, substr($path, 1), $uploadfile);
} else {
$result = $ossClient->putObject($options->bucket, substr($path, 1), $uploadfile);
}
//310行
return isset($file['tmp_name']) ? $file['tmp_name'] : (isset($file['bytes']) ? $file['bytes'] : (isset($file['bits']) ? $file['bits'] : ''));
//改为
return isset($file['tmp_name']) ? $file['tmp_name'] : (isset($file['bytes']) ? base64_decode($file['bytes']) : (isset($file['bits']) ? $file['bits'] : ''));
//169行
'mime' => @Typecho_Common::mimeContentType($path)
//其改为
'mime' => (isset($file['tmp_name']) ? Typecho_Common::mimeContentType($file['tmp_name']) : $file['mime'])
key | value | |
---|---|---|
南博版本 | v1.5 | |
插件 | cosUploadV5 | |
插件名字 | cosUploadV5 | |
位置 | https://github.com/eocene317/cosUploadV5/blob/master/Plugin.php |
//164
elseif(isset($file['bytes'])){$contents = $file['bytes'];}
//其改为
elseif(isset($file['bytes'])){$contents = base64_decode($file['bytes']);}
未经作者允许,禁止转载!!!
End
发表评论(3 条评论)
不错不错,厉害
配图是马赛克嘛
还行还行,勉强还看得到?