Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-04-17 02:28:03 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-04-17 02:28:03 +0400
commitf85e6caa77c092cfb736b4d0250bec92a0d973a3 (patch)
tree87b870466b3ae7e36f3bddca06b3dbc82ec37c31 /plugins/Feedback
parent48187389f65599017f4f1fabcc8054069015e445 (diff)
[mauser]- refs #62 commited huge work by Maciej ZawadziƄski: thanks! still some work to do + QA but looks really good :)
[mauser]- refs #116 commited partial fix [mauser]- refs #65 commited partial fix - fixed broken tests
Diffstat (limited to 'plugins/Feedback')
-rw-r--r--plugins/Feedback/Controller.php50
-rw-r--r--plugins/Feedback/Feedback.php25
-rw-r--r--plugins/Feedback/index.tpl24
-rw-r--r--plugins/Feedback/lang/en.php7
-rw-r--r--plugins/Feedback/sent.tpl3
5 files changed, 109 insertions, 0 deletions
diff --git a/plugins/Feedback/Controller.php b/plugins/Feedback/Controller.php
new file mode 100644
index 0000000000..08e61a71f9
--- /dev/null
+++ b/plugins/Feedback/Controller.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
+ * @version $Id: Controller.php 169 2008-01-14 05:41:15Z matt $
+ *
+ * @package Piwik_Feedback
+ */
+
+
+
+/**
+ *
+ * @package Piwik_Feedback
+ */
+class Piwik_Feedback_Controller extends Piwik_Controller
+{
+ function index()
+ {
+ $view = new Piwik_View('Feedback/index.tpl');
+
+ echo $view->render();
+ }
+
+ /**
+ * send email to Piwik team and display nice thanks
+ */
+ function sendFeedback()
+ {
+ // TODO: require user login or captcha if anonymous
+
+ $name = Piwik_Common::getRequestVar('name', '', 'string');
+ $topic = Piwik_Common::getRequestVar('topic', '', 'string');
+ $body = Piwik_Common::getRequestVar('body', '', 'string');
+ $email = Piwik_Common::getRequestVar('email', '', 'string');
+ $category = Piwik_Common::getRequestVar('category', '', 'string');
+
+ $mail = new Piwik_Mail();
+ $mail->setFrom($email, $name);
+ $mail->addTo('hello@piwik.org','Piwik Team');
+ $mail->setSubject('[feedback:'.$category.'] '.$topic);
+ $mail->setBodyText($body);
+ $mail->send();
+
+ $view = new Piwik_View('Feedback/sent.tpl');
+ echo $view->render();
+ }
+}
diff --git a/plugins/Feedback/Feedback.php b/plugins/Feedback/Feedback.php
new file mode 100644
index 0000000000..3f6c1ab9d8
--- /dev/null
+++ b/plugins/Feedback/Feedback.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
+ * @version $Id: ExamplePlugin.php 169 2008-01-14 05:41:15Z matt $
+ *
+ * @package Piwik_Feedback
+ */
+
+class Piwik_Feedback extends Piwik_Plugin
+{
+ public function getInformation()
+ {
+ return array(
+ 'name' => 'Feedback',
+ 'description' => '',
+ 'author' => 'Piwik',
+ 'homepage' => 'http://piwik.org/',
+ 'version' => '0.1',
+ 'translationAvailable' => true,
+ );
+ }
+}
diff --git a/plugins/Feedback/index.tpl b/plugins/Feedback/index.tpl
new file mode 100644
index 0000000000..08998c7a41
--- /dev/null
+++ b/plugins/Feedback/index.tpl
@@ -0,0 +1,24 @@
+<form method="post" action="?module=Feedback&action=sendFeedback">
+
+<p><strong>Your name:</strong>
+<br /><input type="text" name="name" size="50" /></p>
+
+<p><strong>Your e-mail:</strong>
+<br /><input type="text" name="email" size="50" /></p>
+
+<p><strong>Choose category:</strong>
+<br /><select name="category">
+ <option value="bug">Bug report</option>
+ <option value="feature">Feature missing</option>
+</select>
+</p>
+
+<p><strong>Topic:</strong>
+<br /><input type="text" name="topic" size="50" /></p>
+
+<p><strong>Body:</strong>
+<br /><textarea name="body" cols="50" rows="15"></textarea></p>
+
+<p><input type="submit" value="Send feedback" />
+
+</form>
diff --git a/plugins/Feedback/lang/en.php b/plugins/Feedback/lang/en.php
new file mode 100644
index 0000000000..3f2cf9cb39
--- /dev/null
+++ b/plugins/Feedback/lang/en.php
@@ -0,0 +1,7 @@
+<?php
+
+// not translated - feedback should be sent in English!!!
+
+$translations = array(
+);
+
diff --git a/plugins/Feedback/sent.tpl b/plugins/Feedback/sent.tpl
new file mode 100644
index 0000000000..b92a15f160
--- /dev/null
+++ b/plugins/Feedback/sent.tpl
@@ -0,0 +1,3 @@
+<p>A mail was sent to Piwik developers</p>
+
+<p><strong>Thank you for your feedback.</strong><br /> - Piwik Team</p>