# Perform database query $date = date( "Y-m-d H:i:s" ); $ip = getenv('REMOTE_ADDR'); $query2 = "INSERT INTO #__akocomment SET contentid='$contentid', ip='$ip', name='$acname', web='$web', email='$email', title='$title', comment='$comment', date='$date', published='$ac_autopublish', iduser='$iduser', subscribe='$subscribe';"; // modify by bpixel (add "web='$web', email='$email'," ) Modified by visualclinic.fr (add ", iduser='$iduser', subscribe='$subscribe'") $database->setQuery( $query2 ); $database->query();
# EMAIL NOTIFICATION TO THE AUTHOR by ArXoS ######################################## # Search the identity of the creator $query_id_author = "SELECT created_by FROM #__content WHERE id=$contentid"; $database->setQuery( $query_id_author ); $id_author = $database->loadResult(); # Search for the creators email $queryauthor = "SELECT email FROM #__users WHERE id=$id_author"; $database->setQuery( $queryauthor ); $authorEmail = $database->loadResult(); # Search for item title $itemtitle = "SELECT title FROM #__content WHERE id=$contentid"; $database->setQuery( $itemtitle ); $id_title = $database->loadResult(); $url_articolo = "http://your_site/index.php?option=com_content&task=view&id=$contentid"; $commento = "\r\nΤίτλος δημοσίευσης·: ".$id_title."\r\nΗμερομηνία: ".$date."\r\nΌομα: ".$acname."\r\nΣχόλιο: ".$comment; $messaggio = "Έχει σχολιαστεί δημοσίευσή σας στο your_site. Για να δείτε τη δημοσίευση που σχολιάστηκε μπορείτε να χρησιμοποιήσετε τον παρακάτω σύνδεσμο:\r\n$url_articolo\r\n\r\n $commento"; mail($authorEmail,_AKOCOMMENT_ADMINMAILHEADER,$messaggio,"From: your_site<your@email>"); ########################################
// Check already favoured $query = "SELECT * FROM #__akocomment_favoured WHERE id_content = '$id' AND ip='$ip'";
$id_user = $my->id; // Check already favoured $query = "SELECT * FROM #__akocomment_favoured WHERE id_content = '$id' AND id_user='$id_user'";