×
Support Offline :
Mon - Fri / 08:00am - 05:00pm (GMT +7)
Your Time:
Our Time:
Forum
JUX Member Forum - Restricted to Members Only
JUX Other Extensions
JUX Real Estate
How to add captcha to agent contact form
How to add captcha to agent contact form
Less
More
Posts: 1717
Karma: 22
Thank you received: 117
9 years 1 week ago #9220
by NT
Hi,
OK. I understand your problem, I have confused the real estate version together
. This problem is relatively difficult. I need a bit more time to edit. Thanks
****************
Best Regards
__DiepNT__
Please Log in or Create an account to join the conversation.
Less
More
Posts: 1717
Karma: 22
Thank you received: 117
9 years 1 week ago #9221
by NT
Hi
I've edited directly on your site.
1. Add function SendMessage, realty.php files (components / com_jux_real_estate / controllers / realty.php)
line 71->102
function sendmessage() {
$app = JFactory::getApplication();
$id = JRequest::getVar('id');
$menu = $app->getMenu()->getActive()->id;
$db = JFactory::getDBO();
$msg = JText::_('You have entered wrong captcha');
$user = JFactory::getUser();
$post = JRequest::get('post', JREQUEST_ALLOWHTML);
$post = $menu;
if (isset($post)) {
if (isset($_SESSION["captcha_code"])) {
if ( trim($post) != trim($_SESSION["captcha_code"])) {
$url = JRoute::_('index.php?option=com_jux_real_estate&view=realty&id=' . (int)$id);
$app->redirect($url,$msg);
}
}
}
$model = $this->getModel('message');
$ret = $model->store($post);
$model->sendEmails($post, $ret);
$document = JFactory::getDocument();
$script = "window.addEvent('domready',
function() {
parent.SqueezeBox.close();
parent.window.location=parent.window.location;
});";
$document->addScriptDeclaration($script);
}
2. I edit files default.php (components / com_jux_real_estate / views / realty / tmpl / default.php)
line 379
<input type="hidden" name="task" id="task" value="messages.sendmessage"/>
=>
<input type="hidden" name="task" id="task" value="realty.sendmessage"/>
Please check out the problem, now, I'm out of work hours, if there is a problem I will check for you tomorrow. Thanks
****************
Best Regards
__DiepNT__
Please Log in or Create an account to join the conversation.
Forum
JUX Member Forum - Restricted to Members Only
JUX Other Extensions
JUX Real Estate
How to add captcha to agent contact form
Time to create page: 0.186 seconds