newscoop / send-feedback-plugin
发送反馈和联系插件。
0.5.6
2016-01-26 16:22 UTC
Requires
- php: >=5.3.3
- newscoop/plugins-installer: >=v0.2
README
基本联系表单功能插件。支持大多数常用字段,支持存储在数据库中并上传附件。
此插件与Newscoop 4.3及更高版本兼容。
功能
- 发送反馈消息(支持字段:名、姓、电子邮件、主题和消息)
- 支持通过AJAX和正常POST方式提交,并支持自定义重定向页面
- 附件处理(仅限图片和PDF文档),可附加到邮件或上传到Newscoop媒体库
- 让网站访客决定发送电子邮件的对象(具有反垃圾邮件保护)
- 将反馈存储在数据库中,并在Newscoop后端查看(请参阅详细说明)
安装
安装是一个快速的过程
- 如何安装此插件?
- 就这样!
步骤 1:如何安装此插件?
运行命令
$ php application/console plugins:install "newscoop/send-feedback-plugin"
$ php application/console assets:install public/
插件将被安装到您的项目的 newscoop/plugins/Newscoop
目录中。
步骤 2:就这样!
前往Newscoop管理面板,然后打开 插件
选项卡。插件将显示在那里。您现在可以使用该插件。
注意
要更新此插件,请运行命令
$ php application/console plugins:update "newscoop/send-feedback-plugin"
$ php application/console assets:install public/
要删除此插件,请运行命令
$ php application/console plugins:remove "newscoop/send-feedback-plugin"
文档
扩展插件文档
有关更多信息,请参阅我们的 维基页面。
读取插件设置
借助标签 {{ get_feedback_settings }},可以在前端读取插件设置。以下列出了所有可以读取的当前键。
{{ get_feedback_settings }}
{{ get_feedback_settings assign="mySettingVariable" }}
{{ $mySettingVariable.to }} // Email addresses of valid receivers
{{ $mySettingVariable.storeInDatabase }} // Whether the feedback will be stored in the database
{{ $mySettingVariable.allowAttachments }} // Whether attachments are allowed
{{ $mySettingVariable.allowAnonymous }} // Whether non-registered users can send feedback
基本示例
<form id="sendFeedbackForm" method="post" action="/plugin/send-feedback" enctype="multipart/form-data"> <div class="form-group"> <label for="sendFeedbackForm_first_name">First Name</label> <input type="text" id="sendFeedbackForm_first_name" name="sendFeedbackForm[first_name]" required="required" class="form-control" placeholder="First name"> </div> <div class="form-group"> <label for="sendFeedbackForm_last_name">Last Name</label> <input type="text" id="sendFeedbackForm_last_name" name="sendFeedbackForm[last_name]" required="required" class="form-control" placeholder="Last name"> </div> <div class="form-group"> <label for="sendFeedbackForm_email">Email</label> <input type="text" id="sendFeedbackForm_email" name="sendFeedbackForm[email]" required="required" class="form-control" placeholder="Email"> </div> <div class="form-group"> <label for="sendFeedbackForm_subject">Subject</label> <input type="text" id="sendFeedbackForm_subject" name="sendFeedbackForm[subject]" required="required" class="form-control" placeholder="Subject"> </div> <div class="form-group"> <label for="sendFeedbackForm_message">Message</label> <textarea id="sendFeedbackForm_message" name="sendFeedbackForm[message]" required="required" class="form-control" placeholder="Message"></textarea> </div> <input id="submitSendFeedbackForm" class="btn btn-primary" type="submit" value="Submit"> </form>
许可证
此捆绑包受GNU通用公共许可证v3的约束。请参阅捆绑包中的完整许可证。
LICENSE
关于
此捆绑包是 Sourcefabric z.ú. 的一个倡议。