
Quick Press Widget
介个插件可以说是我第一个插件。惭愧惭愧,鼓捣 WordPress 有段日子了,才鼓捣出来个东西。这个插件作用就是给你网站的前台页面侧栏中,增加一个快速发表文章的功能。
为啥要加一个这么个功能呢?听我细细道来(别烦,没准你就用得上!)
话说现在貌似有个东西叫 Twitter。可以方便的在页面上发表自己的简短信息(俺就喜欢这么一点,其他功能就不说了)。然后 WordPress 官方人员看到这个功能比较尿性,于是乎就弄出来个仿 Twitter 的那种有前台页面发表文章功能的主题——Prologue。而想使用这个功能,不会叫我们都安装这个主题吧?与似乎我就合计着把这个功能给移植到其他主题里面去。但这样还是限制了用户选择主题的范围和安装难度。
所以,还是搞成插件的形式比较通用一些。这样,不管你用的啥主题,只要支持 Widget 功能。就可以使用这个插件。
那到底为啥做这个插件呢?看到我网站上那些 Aside Post 没?嗯!简短的几句话,真不想浪费时间去登录后台然后编写文章,加载一大堆的按钮等等。我只需要把想说的几句话马上写下来就好。于是乎,这个插件就“蛋”生了~~~
我本身并不会编写什么代码。之所以能弄出来这个插件,完全是照猫画虎,外加一点运气(运气不错,修改部分代码的时候居然没出什么大错)。所以,基本上也就到这个程度了。而且,这个侧栏单元,是只有管理人员才可以看到的。一般的访客是不会看到这个编写窗口的。故没有在美工上面下太大功夫。各位如果有兴趣,可以自行美化一下。但只有你自己能欣赏了。
该插件代码基本上照搬了 Prologue 这个主题的文章发布部分的代码。进行了少量修改。加入了自定义标题的功能(那个主题是截取文章前多少个字作为文章标题,有的时候标题链接会非常恶心)。其他的代码参考了几款有侧栏功能的插件抄过来的。暂时测试没啥毛病。
插件的使用方法也非常简单.解压缩上传,在后台启动插件以后,然后在主题的 Widgets 管理界面会看到新加了一个“Quick Press Widget”单元。把它拖过去就行了,没有什么可以设置的东西。保存后刷新首页就可以看到这个东西了。
插件可以在这里下载:Quick Press Widget
== Update Log ==
1.2
移除 Slug 输入窗口。
修正在 WordPress MU 集成 BuddyPress 后出现的问题。
-----
1.1
增加自定义文章 Slug 功能。
修改编辑框样式,小规模调整。(严重感谢一下漫步的耐心指导。)
-----
1.0
刚刚发布,没啥说地!希望插件有点用是真地~


不错,可以结合一些twitter主题搭建一个自己的Twitter了
其实装上 Aside 相关的插件就可以了。单独使用这个插件还真没什么效果。呵呵……
我首页就整了一个跟mini博客,正好装这个插件了,不过好像有点问题不能解决呢。
我觉得应该有个设置,能够在后台设置这类文章的分类。
一般情况下,Sideblog 都是放在一个分类里面的。而这个插件编写的文章会放在默认分类里面。功能够就行了。哈哈……
你也知道我不会写代码。那难度得多大捏?嘎嘎~
那就不加!哦也!
我觉得应该加入 Ajax,能够更爽地写文章
……很是无语。第一,我不会写代码。第二,给谁看啊?
……很是无语。第一,可以学。第二,给牙牙看!
什么是 Ajax? 好吃不?
不错,哈哈,支持下!!
that sounds be awsome ! but download link ( http://downloads.wordpress.org/plugin/quick-press-widget.1.1.zip ) is broken
What's problem with your download?
I test it, and everything is OK.
So strange...
it is ok now , at first time i faced to "404 error"
] and thanks for this nice plugin
sorry for that [ & my bad english
I'm so happy that somebody can understand what I said.
Because my english is not good tooooo. Haha......
hi. Thanks for plugin
perfect.
Regards
很好的插件
这样进入发布页面快捷多了!
Warning: Cannot modify header information - headers already sent by (output started at /home/***************:2) in /home/******************on line 776
不好意思,我只在 WordPress 上面测试过。还没有在 MU 上面使用过。这两天我看看是哪里的毛病。希望尽快能够更新。
谢谢提供~~~~~~
问问post-form.php里面的第一个是干啥的?一直没有找到
question here! just wanted to ask if only the administrator and can see this and create posts with this or other users as well? i'm running a blog with multiple authors (contributors level) but only I am the administrator.
can the "other authors" see and use this widget as well?
I found that Contributor could not posted any post at all. And if somebody wanna post. Thay must at least have the role of Author.
You can look at line 44 of quick_press_widget.php. Maybe you can try to change 'publish_posts' to 'edit_posts' to let Contributors can post.
And you can visit this Codex Page:
http://codex.wordpress.org/Roles_and_Capabilities
to find out more informations.
Thank you for your visited.
Can you also make it that people can select categories before they submit the post? And that only registered members or certain members with specific permissions can use quickpress?
It would also be useful to have a approval system so new submissions can be screened.
Hi!
Thanks for a nice plugin.
I have put it on the front page of my Buddypress installation. However, it only seems to work for the site admin. All other users don't see the widget at all.
You write in the info that the plugin is compatible with Buddypress, so it's probably me doing something wrong. Could you help me fix this?
It just a tool for site admin to quick post some words (Ex: Site news or aside). And it could not be to used by others.
is there a way to put the widget on a single page? how do i call the widget from a single page if its possible.
If your single page support widget, you can call it. For example edit kubrick's single.php file and add "< ?php get_sidebar(); ?>" to call sidebar.
Thank you very much ! Its very useull.
I spend so much time for searching for something like that, i was until today using tdo-mini-form plugin but your solution is excellent for an open-publishing solution.
Just one question : how can I apply a default category to the post ?
I tried to modify quick_press_widget.php (line 52) like this :
$TheCategoryIWant = 'wordpress';
$post_id = wp_insert_post( array(
'post_author' => $user_id,
'post_title' => $post_title,
'post_content' => $post_content,
'tags_input' => $tags,
'post_status' => 'publish',
'category_name' => $TheCategoryIWant
but i doesn't work. Any idea ?
Thanks
No need to edit the plugin. It will post in the default category. You just need set the default category in WordPress backend - Writing Settings - Default Post Category. Good luck.
Thank you very much !
A last thing : I would like to help by translating your plugin, will you release a internalisable version or do I have to translate directly in the files ?
see here : http://codex.wordpress.org/I18n_for_WordPress_Developers
See ya !
You can translate the plugin directly in the files. And if I have enough time, maybe I can release a version that can translate by gettext.
But now I couldn't tell you when. Sorry. I have so much work to do. And I know it's a long time I haven't update the plugin. Sorry.
Hi there,
I modified quick-press-widget to allow anonymous posting (without registering, added a captcha) and include the form in a page instead of in the sidebar (comments are in french, ask if you need a translation)
see here : http://wordpress.org/support/topic/354501
My answer :
I still nedd to activate the plugin AND to register the widget in the sidebar for this to work.
I would like to 'dewidgetize it' : include the plugin file in my functions.php so I don't need to set the widget in the sidebar and activate the plugin.
Do you know which lines I have to copy to functions.php, wich ones I can erase ?
Thanks for sharing !
Its ok !
see here to create a page with anonymous posting :
http://wordpress.org/support/topic/354501?replies=2#post-1359383