Support » Fixing WordPress » How do I create a "report broken link" button?

  • I have videos on my site and sometimes they are getting blocked or doesn’t work for some reason.
    Do you know of a plugin that creates a button/report like this?

    Do you think I can do something like this but with wordpress hook to catch the url of current page?

    <form action="reportbrokenlink.php" method="post">
    <input type="hidden" name="page" value="<?=$pageurl?>">
    <input type="radio" name="problem" value="wrong">Wrong Link &nbsp;
    <input type="radio" name="problem" value="broken">Broken Link &nbsp;
    <input type="radio" name="problem" value="video">Video Broken &nbsp;
    <input type="submit" name="submit" value="Report Problem">
    </form>

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • anyone??

    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 &nbsp;
    	<input type="radio" name="problem" value="broken">Broken Link &nbsp;
    	<input type="radio" name="problem" value="video">Video Broken &nbsp;
    	<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

    Did it work for you?

    I hope so.

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I create a "report broken link" button?’ is closed to new replies.