• Howdy! This is the best reporting plugin I’ve seen so far.

    I use BuddyPress/rtMedia for a site, and the URLs that it creates are based on media uploaded by a user. This plugin is being used to report inappropriate pictures/videos.

    The problem I’m running across is that there are no post ID’s for these items. I manually insert the code into the form to show the report form.

    Would there be a way to add the current URL/URI to the emails?

    Something like $_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”]; would work very well. ??

    I tried implementing that myself, by changing the $post_URL =$_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”]; however that returns admin-ajax.php, rather than the host/URI of the page the user is submitting the actual form from.

    Thanks much for any help!

    Ben

    https://www.ads-software.com/plugins/report-content/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hassan Akhtar

    (@khaxan)

    Maybe you could save the url in an input field in the form:

    <input type=”text” name=”somename” value=”<?php echo $_SERVER[“HTTP_HOST”] . $_SERVER[“REQUEST_URI”] ?>”>

    And then send it along with the other form contents. The input will get populated on page load so you won’t get admin-ajax.php.

    Let me know if this is helpful.

    Thread Starter WCVendors

    (@wcvendors)

    Thanks! Whats the best way to pass the value to the email notifications?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Capturing current URL/URI for form submission’ is closed to new replies.