I will check this one for you, but, its too late in the process, for the visitor to check a link, discover its broken, then report it back to you, if he did in the first place. Additionally, broken links ruins your page rank by Search Engines. There is an automatic broken link checker that automatically scans all your posts, and report them back to you instantly in your dashboard or to your email, so you can decide what to do. Instead of making your visitors do it manually. Just a thought. You need this first and additionally adding the feature you want as a second line of defense.
I will try using this plugin but I would like also to know how to make it work. This is what I am trying to do, but I can’t make it work:
<form action="send_problem.php" method="POST">
<input type="hidden" name="page" value="<?php echo $_SERVER["REQUEST_URI"] ?>">
<input type="radio" name="problem" value="wrong">Wrong Link
<input type="radio" name="problem" value="broken">Broken Link
<input type="radio" name="problem" value="video">Video Broken
<input type="submit" name="submit" value="Report Problem">
</form>
<?php
include .'wp-includes/pluggable.php';
if(isset($_POST['submit'])) {
$to = "my_email_address";
$page = $_POST['page'];
$problem = $_POST['problem'];
$body = "$problem was reported on the following page: $page";
echo "Thank you";
wp_mail($to, $body);
} else {
echo "ERROR";
}
?>
My server doesn’t have pear installed so I need to make it work through wordpress and smtp function or plugin.
Please help.
Thanks
It will never. A quick note, any code you write for wordpress should be bound to wordpress actions filters and handlers. There are no visible wordpress filter or handler, so it will do nothing.
Anyway,
The following plugin provides this functionality, a REPORT LINK anywhere you want, with an email being send after.
You can use this plugin as base to modify and use, or refer to the code its uses, if you want to develop it on your own.
GD Broken Link
Hope it helps.
Regards
Since there is no answer, then it seems ti worked.
The least thing to do, answering, how did it go?.
This is my advice so you can find help anytime you need it.
Please mark this thread “RESOLVED”, if you don’t need help in this issue.
Thanks.
Hi,
Thanks for your help!
I managed doing it with a contact form plugin that we already had + tweaks.