Revision history for FeedbackActionUpgrade
Revision [23199]
Last edited on 2016-05-20 07:38:47 by DarTar [Replaces old-style internal links with new pipe-split links.]Additions:
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." | main page]]");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." | main page]]");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." | main page]]");
Deletions:
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
No Differences
Additions:
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
if ($name && $email && $comments && $recipientmail) {
// send email and display message
$msg = "Name:\t".$name."\n";
$msg .= "Email:\t".$email."\n";
$msg .= "Comments:".$comments."\n";
$subject = "Feedback from ".$this->GetConfigValue("wakka_name");
$mailheaders = "From:".$email."\n";
$mailheaders .= "Reply-To:".$email."\n\n";
mail($recipientmail, $subject, $msg, $mailheaders);
echo $this->Format("== Feedback sent! == --- ");
echo $this->Format("Thanks for your interest: your message has been sent to [[".$recipient."]] --- --- ");
// optionally displays the feedback text
echo $this->Format("---- ''**Your name:** ".$name."---**Your email:** ".$email."---**Your comments:**".$comments."'' ---- ");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
}
} else {
// Display initial form
echo $form;
?>
%%
CategoryUserContributions
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
if ($name && $email && $comments && $recipientmail) {
// send email and display message
$msg = "Name:\t".$name."\n";
$msg .= "Email:\t".$email."\n";
$msg .= "Comments:".$comments."\n";
$subject = "Feedback from ".$this->GetConfigValue("wakka_name");
$mailheaders = "From:".$email."\n";
$mailheaders .= "Reply-To:".$email."\n\n";
mail($recipientmail, $subject, $msg, $mailheaders);
echo $this->Format("== Feedback sent! == --- ");
echo $this->Format("Thanks for your interest: your message has been sent to [[".$recipient."]] --- --- ");
// optionally displays the feedback text
echo $this->Format("---- ''**Your name:** ".$name."---**Your email:** ".$email."---**Your comments:**".$comments."'' ---- ");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
}
} else {
// Display initial form
echo $form;
?>
%%
CategoryUserContributions
Deletions:
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
if ($name
Additions:
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
if ($name
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
if ($name
Deletions:
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
if ($name && $email && $comments && $recipientmail) {
// send email and display message
$msg = "Name:\t".$name."\n";
$msg .= "Email:\t".$email."\n";
$msg .= "Comments:".$comments."\n";
$subject = "Feedback from ".$this->GetConfigValue("wakka_name");
$mailheaders = "From:".$email."\n";
$mailheaders .= "Reply-To:".$email."\n\n";
mail($recipientmail, $subject, $msg, $mailheaders);
echo $this->Format("== Feedback sent! == --- ");
echo $this->Format("Thanks for your interest: your message has been sent to [[".$recipient."]] --- --- ");
// optionally displays the feedback text
echo $this->Format("---- ''**Your name:** ".$name."---**Your email:** ".$email."---**Your comments:**".$comments."'' ---- ");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
}
} else {
// Display initial form
echo $form;
?>
%%
CategoryUserContributions
Additions:
===== Feedback Action Upgrade=====
''Last Updated: 2004-11-22 - ""RewriteRules"" bug fixed''
>>**See also:**
AdminModules
>>::c::
This is action extends the basic FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable
<<This action is meant as a module to integrate the FeedbackAction into the **UserAdmin** tool.
To use it as a standalone action simply add ##""{{userfeedback}}""## in one of your pages.<< ::c::
Save the following code as ##actions/userfeedback.php##.
-- DarTar
----
<<##actions/userfeedback.php##<<
%%(php)
<?php
// USER FEEDBACK ACTION
// Displays a form to send feedback to the site administrator, as specified in the configuration file,
// or to a registered user as specified by a "user" GET variable
// Build feedback form
if ($_REQUEST["user"]) {
$form = "<p>Send feedback to :".$this->Link($_REQUEST["user"])."</p>".
$this->FormOpen().
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
"Comments:<br />\n".
"<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />".
"<input type=\"submit\" />".
$this->FormClose();
} else {
$form = "<p>Fill in the form below to send us your comments:</p>".
$this->FormOpen().
"Name: <input name=\"name\" value=\"".$_POST["name"]."\" type=\"text\" /><br />".
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"Email: <input name=\"email\" value=\"".$_POST["email"]."\" type=\"text\" /><br />".
"Comments:<br />\n<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />\n".
"<input type=\"submit\" />".
$this->FormClose();
}
// Results
if ($_REQUEST["mail"]=="result") {
$comments = $_POST["comments"];
if ($_REQUEST["user"]) {
// Sender
$name = $this->GetUserName();
$senderdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$name."\"");
$email = $senderdata["email"];
// Recipient
$recipient = $_REQUEST["user"];
$recipientdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$recipient."\"");
$recipientmail = $recipientdata["email"];
if (!$recipientmail) {
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
} else {
$name = $_POST["name"];
$email = $_REQUEST["email"];
$recipient = $this->GetConfigValue("admin_users");
$recipientmail = $this->GetConfigValue("admin_email");
list($user, $host) = sscanf($email, "%[a-zA-Z0-9._-]@%[a-zA-Z0-9._-]");
if (!$name) {
// a valid name must be entered
echo "<p class=\"error\">Please enter your name</p>";
echo $form;
} elseif (!$email || !strchr($email, "@") || !$user || !$host) {
// a valid email address must be entered
echo "<p class=\"error\">Please enter a valid email address</p>";
echo $form;
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
}
if ($name && $email && $comments && $recipientmail) {
// send email and display message
$msg = "Name:\t".$name."\n";
$msg .= "Email:\t".$email."\n";
$msg .= "Comments:".$comments."\n";
$subject = "Feedback from ".$this->GetConfigValue("wakka_name");
$mailheaders = "From:".$email."\n";
$mailheaders .= "Reply-To:".$email."\n\n";
mail($recipientmail, $subject, $msg, $mailheaders);
echo $this->Format("== Feedback sent! == --- ");
echo $this->Format("Thanks for your interest: your message has been sent to [[".$recipient."]] --- --- ");
// optionally displays the feedback text
echo $this->Format("---- ''**Your name:** ".$name."---**Your email:** ".$email."---**Your comments:**".$comments."'' ---- ");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
}
} else {
// Display initial form
echo $form;
}
?>
%%
----
''Last Updated: 2004-11-22 - ""RewriteRules"" bug fixed''
>>**See also:**
AdminModules
>>::c::
This is action extends the basic FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable
<<This action is meant as a module to integrate the FeedbackAction into the **UserAdmin** tool.
To use it as a standalone action simply add ##""{{userfeedback}}""## in one of your pages.<< ::c::
Save the following code as ##actions/userfeedback.php##.
-- DarTar
----
<<##actions/userfeedback.php##<<
%%(php)
<?php
// USER FEEDBACK ACTION
// Displays a form to send feedback to the site administrator, as specified in the configuration file,
// or to a registered user as specified by a "user" GET variable
// Build feedback form
if ($_REQUEST["user"]) {
$form = "<p>Send feedback to :".$this->Link($_REQUEST["user"])."</p>".
$this->FormOpen().
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
"Comments:<br />\n".
"<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />".
"<input type=\"submit\" />".
$this->FormClose();
} else {
$form = "<p>Fill in the form below to send us your comments:</p>".
$this->FormOpen().
"Name: <input name=\"name\" value=\"".$_POST["name"]."\" type=\"text\" /><br />".
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"Email: <input name=\"email\" value=\"".$_POST["email"]."\" type=\"text\" /><br />".
"Comments:<br />\n<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />\n".
"<input type=\"submit\" />".
$this->FormClose();
}
// Results
if ($_REQUEST["mail"]=="result") {
$comments = $_POST["comments"];
if ($_REQUEST["user"]) {
// Sender
$name = $this->GetUserName();
$senderdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$name."\"");
$email = $senderdata["email"];
// Recipient
$recipient = $_REQUEST["user"];
$recipientdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$recipient."\"");
$recipientmail = $recipientdata["email"];
if (!$recipientmail) {
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
} else {
$name = $_POST["name"];
$email = $_REQUEST["email"];
$recipient = $this->GetConfigValue("admin_users");
$recipientmail = $this->GetConfigValue("admin_email");
list($user, $host) = sscanf($email, "%[a-zA-Z0-9._-]@%[a-zA-Z0-9._-]");
if (!$name) {
// a valid name must be entered
echo "<p class=\"error\">Please enter your name</p>";
echo $form;
} elseif (!$email || !strchr($email, "@") || !$user || !$host) {
// a valid email address must be entered
echo "<p class=\"error\">Please enter a valid email address</p>";
echo $form;
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
}
if ($name && $email && $comments && $recipientmail) {
// send email and display message
$msg = "Name:\t".$name."\n";
$msg .= "Email:\t".$email."\n";
$msg .= "Comments:".$comments."\n";
$subject = "Feedback from ".$this->GetConfigValue("wakka_name");
$mailheaders = "From:".$email."\n";
$mailheaders .= "Reply-To:".$email."\n\n";
mail($recipientmail, $subject, $msg, $mailheaders);
echo $this->Format("== Feedback sent! == --- ");
echo $this->Format("Thanks for your interest: your message has been sent to [[".$recipient."]] --- --- ");
// optionally displays the feedback text
echo $this->Format("---- ''**Your name:** ".$name."---**Your email:** ".$email."---**Your comments:**".$comments."'' ---- ");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
}
} else {
// Display initial form
echo $form;
}
?>
%%
----
Deletions:
''Last Updated: 2004-11-22 - ""RewriteRules"" bug fixed''
This is action extends the basic FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable
<<This action is meant as a module to integrate the FeedbackAction into the **UserAdmin** tool.
To use it as a standalone action simply add ##""{{userfeedback}}""## in one of your pages.<< ::c::
Save the following code as ##actions/userfeedback.php##.
-- DarTar
----
<<##actions/userfeedback.php##<<
%%(php)
<?php
// USER FEEDBACK ACTION
// Displays a form to send feedback to the site administrator, as specified in the configuration file,
// or to a registered user as specified by a "user" GET variable
// Build feedback form
if ($_REQUEST["user"]) {
$form = "<p>Send feedback to :".$this->Link($_REQUEST["user"])."</p>".
$this->FormOpen().
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
"Comments:<br />\n".
"<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />".
"<input type=\"submit\" />".
$this->FormClose();
} else {
$form = "<p>Fill in the form below to send us your comments:</p>".
$this->FormOpen().
"Name: <input name=\"name\" value=\"".$_POST["name"]."\" type=\"text\" /><br />".
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"Email: <input name=\"email\" value=\"".$_POST["email"]."\" type=\"text\" /><br />".
"Comments:<br />\n<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />\n".
"<input type=\"submit\" />".
$this->FormClose();
}
// Results
if ($_REQUEST["mail"]=="result") {
$comments = $_POST["comments"];
if ($_REQUEST["user"]) {
// Sender
$name = $this->GetUserName();
$senderdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$name."\"");
$email = $senderdata["email"];
// Recipient
$recipient = $_REQUEST["user"];
$recipientdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$recipient."\"");
$recipientmail = $recipientdata["email"];
if (!$recipientmail) {
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
} else {
$name = $_POST["name"];
$email = $_REQUEST["email"];
$recipient = $this->GetConfigValue("admin_users");
$recipientmail = $this->GetConfigValue("admin_email");
list($user, $host) = sscanf($email, "%[a-zA-Z0-9._-]@%[a-zA-Z0-9._-]");
if (!$name) {
// a valid name must be entered
echo "<p class=\"error\">Please enter your name</p>";
echo $form;
} elseif (!$email || !strchr($email, "@") || !$user || !$host) {
// a valid email address must be entered
echo "<p class=\"error\">Please enter a valid email address</p>";
echo $form;
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
}
if ($name && $email && $comments && $recipientmail) {
// send email and display message
$msg = "Name:\t".$name."\n";
$msg .= "Email:\t".$email."\n";
$msg .= "Comments:".$comments."\n";
$subject = "Feedback from ".$this->GetConfigValue("wakka_name");
$mailheaders = "From:".$email."\n";
$mailheaders .= "Reply-To:".$email."\n\n";
mail($recipientmail, $subject, $msg, $mailheaders);
echo $this->Format("== Feedback sent! == --- ");
echo $this->Format("Thanks for your interest: your message has been sent to [[".$recipient."]] --- --- ");
// optionally displays the feedback text
echo $this->Format("---- ''**Your name:** ".$name."---**Your email:** ".$email."---**Your comments:**".$comments."'' ---- ");
echo $this->Format(" --- Return to the [[".$this->GetConfigValue("root_page")." main page]]");
}
} else {
// Display initial form
echo $form;
}
?>
%%
----
Additions:
CategoryUserContributions
Deletions:
Additions:
''Last Updated: 2004-11-22 - ""RewriteRules"" bug fixed''
This is action extends the basic FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable
// USER FEEDBACK ACTION
// Build feedback form
if ($_REQUEST["user"]) {
$form = "<p>Send feedback to :".$this->Link($_REQUEST["user"])."</p>".
$this->FormOpen().
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
"Comments:<br />\n".
"<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />".
"<input type=\"submit\" />".
$this->FormClose();
$form = "<p>Fill in the form below to send us your comments:</p>".
$this->FormOpen().
"Name: <input name=\"name\" value=\"".$_POST["name"]."\" type=\"text\" /><br />".
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"Email: <input name=\"email\" value=\"".$_POST["email"]."\" type=\"text\" /><br />".
"Comments:<br />\n<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />\n".
"<input type=\"submit\" />".
$this->FormClose();
// Results
if ($_REQUEST["mail"]=="result") {
if ($_REQUEST["user"]) {
$recipient = $_REQUEST["user"];
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
$email = $_REQUEST["email"];
if ($name && $email && $comments && $recipientmail) {
// Display initial form
CategoryDevelopment
This is action extends the basic FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable
// USER FEEDBACK ACTION
// Build feedback form
if ($_REQUEST["user"]) {
$form = "<p>Send feedback to :".$this->Link($_REQUEST["user"])."</p>".
$this->FormOpen().
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"<input type=\"hidden\" name=\"user\" value=\"".$_REQUEST["user"]."\">".
"Comments:<br />\n".
"<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />".
"<input type=\"submit\" />".
$this->FormClose();
$form = "<p>Fill in the form below to send us your comments:</p>".
$this->FormOpen().
"Name: <input name=\"name\" value=\"".$_POST["name"]."\" type=\"text\" /><br />".
"<input type=\"hidden\" name=\"mail\" value=\"result\">".
"Email: <input name=\"email\" value=\"".$_POST["email"]."\" type=\"text\" /><br />".
"Comments:<br />\n<textarea name=\"comments\" rows=\"15\" cols=\"40\">".$_POST["comments"]."</textarea><br />\n".
"<input type=\"submit\" />".
$this->FormClose();
// Results
if ($_REQUEST["mail"]=="result") {
if ($_REQUEST["user"]) {
$recipient = $_REQUEST["user"];
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
} elseif (!$comments) {
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
echo $form;
}
$email = $_REQUEST["email"];
if ($name && $email && $comments && $recipientmail) {
// Display initial form
CategoryDevelopment
Deletions:
// 1. Build feedback form
if ($_GET["user"]) {
// feedback-to-user form
$form = '<p>Send feedback to :'.$this->Link($_GET["user"]).'</p>
<form method="post" action="'.$this->GetPageTag().'?user='.$_GET["user"].'&mail=result">
Comments:<br />
<textarea name="comments" rows="15" cols="40">'.$_POST["comments"].'</textarea><br />
<input type="submit" />
</form>';
// feedback-to-admin form
$form = '<p>Fill in the form below to send us your comments:</p>
<form method="post" action="'.$this->GetPageTag().'?mail=result">
Name: <input name="name" value="'.$_POST["name"].'"type="text" /><br />
Email: <input name="email" value="'.$_POST["email"].'" type="text" /><br />
Comments:<br />
<textarea name="comments" rows="15" cols="40">'.$_POST["comments"].'</textarea><br />
<input type="submit" />
</form>';
// 2. Validate form
if ($_GET["mail"]=="result") {
if ($_GET["user"]) {
// A. feedback-to-user validation
$recipient = $_GET["user"];
echo $this->Format("== User ".$recipient." unknown == --- ");
echo $this->Format("Sorry, the recipient of your message (**".$recipient."**) is unknown --- --- --- ");
echo $this->Format("Return to the [[".$this->GetConfigValue("root_page")." main page]]");
// some text must be entered
echo "<p class=\"error\">Please enter some text</p>";
echo $alert;
// B. feedback-to-admin validation
$email = $_POST["email"];
// 3. Form is valid => send feedback
if ($name && $email && $comments && $recipientmail) {
// Print form
CategoryDevelopment
Additions:
%%
CategoryDevelopment
CategoryDevelopment
Deletions:
Additions:
$recipient = $this->GetConfigValue("admin_users");
$recipientmail = $this->GetConfigValue("admin_email");
if ($name && $email && $comments && $recipientmail) {
$recipientmail = $this->GetConfigValue("admin_email");
if ($name && $email && $comments && $recipientmail) {
Deletions:
$recipient = ($_GET["user"])? $recipient : $this->GetConfigValue("admin_users");
$recipientmail = ($_GET["user"])? $recipientmail : $this->GetConfigValue("admin_email");
Additions:
<<This action is meant as a module to integrate the FeedbackAction into the **UserAdmin** tool.
To use it as a standalone action simply add ##""{{userfeedback}}""## in one of your pages.<< ::c::
To use it as a standalone action simply add ##""{{userfeedback}}""## in one of your pages.<< ::c::
Deletions:
No Differences
Additions:
Save the following code as ##actions/userfeedback.php##.
<<##actions/userfeedback.php##<<
<<##actions/userfeedback.php##<<
Deletions:
No Differences
Additions:
This is an upgraded version of FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable
<<(This action is meant as a module to integrate the FeedbackAction into the UserAdmin tool).<<
<<(This action is meant as a module to integrate the FeedbackAction into the UserAdmin tool).<<
Deletions:
The code is still a bit messy - apologies...
Additions:
<<##actions/feedback.php##<<
Deletions:
Additions:
<<##actions/feedback.php :##<<
Deletions:
Additions:
----
<<##actions/feedback.php##<<
<<##actions/feedback.php##<<
Additions:
This is an upgraded version of FeedbackAction. It allows not only to send feedback to the Wikka administrator but also to any other registered user via a ##user## GET variable (This is a way to integrate the FeedbackAction as a module into the UserAdmin tool.
Deletions:
Additions:
// Displays a form to send feedback to the site administrator, as specified in the configuration file,
// 1. Build feedback form
// feedback-to-user form
// feedback-to-admin form
// 2. Validate form
// A. feedback-to-user validation
// B. feedback-to-admin validation
// 3. Form is valid => send feedback
// Print form
// 1. Build feedback form
// feedback-to-user form
// feedback-to-admin form
// 2. Validate form
// A. feedback-to-user validation
// B. feedback-to-admin validation
// 3. Form is valid => send feedback
// Print form
Deletions:
// Build feedback form
// Results
// Display initial form
Additions:
$recipientmail = $recipientdata["email"];
if (!$recipientmail) {
if (!$recipientmail) {
Deletions:
if (!$recipientemail) {
Additions:
// Results
$senderdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$name."\"");
$recipientdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$recipient."\"");
// optionally displays the feedback text
// Display initial form
$senderdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$name."\"");
$recipientdata = $this->LoadSingle("select email from ".$this->config["table_prefix"]."users WHERE name =\"".$recipient."\"");
// optionally displays the feedback text
// Display initial form
Deletions:
// feedback-to-admin form
// Form validation
// A. feedback-to-user validation
$senderdata = $this->LoadSingle("select email from ".$this->config["table_prefix"].
"users WHERE name =\"".$name."\"");
$recipientdata = $this->LoadSingle("select email from ".$this->config["table_prefix"].
"users WHERE name =\"".$recipient."\"");
// B. feedback-to-admin validation
// C. (common) Form is valid => send message
// displays the feedback text
// print form