Results 1 to 1 of 1
October 8th, 2012, 08:51 AM #1Report post button (Wordpress)?
I run a Wordpress blog & I'd like to add "Report expired post" button (href + image, not input type button hopefully). I will settle with page reloading, but I'd prefer AJAX so page doesn't reload.
On click I need 2 functions executed - send mail w/ reported post's permalink in message & rewrite "Report expired post" link to inactive Reported text. Of cource, some anti-spammy feature, like one IP can report 1 post per hour would be great, but not necessary.
I currently got this far, but I can't get permalink into my email message, whats wrong?
THIS CODE IS WITHIN LOOP, SO GET_PERMALINK() SHOULD WORK<a href="#" onclick="callFunction();">Report expired<img src="warn_sign.png"/></a>
$message = the_permalink();
$to = "email@example.com";
$subject = "Expired post report";
$from = "firstname.lastname@example.org";
$headers = "From:" . $from;
By Haiko de Poel, Jr. in forum Midnight Cafe'Replies: 6Last Post: June 28th, 2011, 11:39 AM
By writerguy in forum Programming / Datafeeds / ToolsReplies: 12Last Post: March 9th, 2009, 09:58 PM
By MnemonicGuy in forum Midnight Cafe'Replies: 4Last Post: July 8th, 2008, 08:18 PM
By JessieJ in forum PopShopsReplies: 10Last Post: January 18th, 2008, 07:59 PM