Skip to content

Commit 80686ca

Browse files
committed
VirtueMart Ask question
Added anti-spam for VM Ask question form.
1 parent 301d2b1 commit 80686ca

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

antispambycleantalk.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* CleanTalk joomla plugin
55
*
6-
* @version 1.74
6+
* @version 1.75
77
* @package Cleantalk
88
* @subpackage Joomla
99
* @author CleanTalk (welcome@cleantalk.ru)
@@ -372,6 +372,7 @@ function onAfterDispatch() {
372372
|| $page_cmd == 'shop.registration'
373373
|| $page_cmd == 'checkout.index'
374374
|| $page_cmd == 'shop.ask'
375+
|| $task_cmd == 'askquestion'
375376
) {
376377
$this->getJSTest('/(<input type="hidden" name="option" value="com_virtuemart"\s?\/>)/');
377378
}
@@ -393,7 +394,7 @@ function onAfterRoute() {
393394
$view_cmd = JRequest::getCmd('view');
394395
$task_cmd = JRequest::getCmd('task');
395396
$page_cmd = JRequest::getCmd('page');
396-
//var_dump($option_cmd, $view_cmd, $task_cmd, $page_cmd);
397+
397398
$ver = new JVersion();
398399
$app = JFactory::getApplication();
399400
if ($app->isAdmin()) {
@@ -537,6 +538,17 @@ function onAfterRoute() {
537538
if (isset($_POST["vtem_name"]))
538539
$contact_nickname = $_POST["vtem_name"];
539540
}
541+
542+
//
543+
// VirtueMart AskQuestion
544+
//
545+
if ($option_cmd == 'com_virtuemart' && $task_cmd == 'mailAskquestion' && isset($_POST["email"])) {
546+
$contact_email = $_POST["email"];
547+
548+
if (isset($_POST["comment"])) {
549+
$contact_message = $_POST["comment"];
550+
}
551+
}
540552

541553
if ($contact_email !== null){
542554
self::getCleantalk();

0 commit comments

Comments
 (0)