[mod] captcha on contact us page - eSyndiCat User Forums
eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [FREE] > Modifications

Modifications Simple to complex modifications, made by users or by our team, applied to logic or presentation, all kinds of modifications are discussed and requested here.

Reply
 
Thread Tools Display Modes
Old 05-08-2006   #1
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,285
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default [mod] captcha on contact us page

Hi
Here is the mod to have captchas on contact us page:

*** open contacts.tpl and find the following code ***
Code:
<input type="submit" name="contact" value="{$lang.submit}" /></td>
*** insert the following code before ***
Code:
{if $config.captcha}
	<p class="field"><img src="{$config.base}{$config.dir}plugins/captcha/image.php" />
<input type="text" name="security_code" /></p>
{/if}
*** save changes ***

*** open contacts.php and find the following code ***
Code:
/** requires common header file **/
require_once('header.php');
*** insert the following before ***
Code:
session_start();
*** find the following code ***
Code:
if (!$error)
{
	$gDirDb->addContact(addslashes($fullname), addslashes($email), addslashes($body));
	$msg = "[*]{$gDirLang['contact_added']}";
}
*** add the following code before ***
Code:
/** check for captcha **/
if ($gDirConfig['captcha'])
{
	$sc1 = $_POST['security_code'];
	$sc2 = $_SESSION['pass'];
	if (strcmp($sc1, $sc2))
	{
		$error = true;
		$msg .= "[*]{$gDirLang['error_captcha']}";
	}
}
*** save changes ***

Please try now
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software

Last edited by Vasily B.; 07-11-2006 at 05:57 AM.
Vasily B. is online now   Reply With Quote
Old 05-08-2006   #2
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

Guess what!

I still cant see my captcha

Fed up today..think i will go back to bed
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 05-08-2006   #3
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,285
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

did you delete .htaccess file in your plugins directory?
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is online now   Reply With Quote
Old 05-08-2006   #4
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

no hun i didn't because i didn't have .htaccess file in there but i have solved it!


For some reason i opened my config.inc.php folder and was looking down the list...in the vain hope i would see an anomaly and i happened to look at
Code:
$gDirConfig['captcha'] = '0';
so i thought that strange considering everything has been installed, and others had '1' so i changed the code to this

Code:
$gDirConfig['captcha'] = '1';
and blow me down...that was the problem! Why or how i don't know but if anyone else is having the same problem check that file and that line
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 05-08-2006   #5
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,285
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

hmm, you should have the following option in your admin panel->configuration->general configuration

Captcha

You should have enabled captchas there
Anyhow I'm very glad you have solved that problem
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is online now   Reply With Quote
Old 05-08-2006   #6
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

I had enabled it there thats the bizarre thing!
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 05-09-2006   #7
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,285
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

really strange :unsure:
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is online now   Reply With Quote
Old 07-01-2006   #8
uscasinos
 
Join Date: May 2006
Posts: 55
uscasinos is on a distinguished road
Default

The codes inserted into contacts.tpl should be like this.

{if $config.captcha}
<p class="field"><img src="{$config.base}{$config.dir}plugins/captcha/image.php" alt="captcha" /><br /><input type="text" name="security_code" /></p>
{/if}
uscasinos is offline   Reply With Quote
Old 07-01-2006   #9
Loren
 
Loren's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 1,095
Loren is an unknown quantity at this point
Default

Hi uscasinos Welcome to the forums!

Are you giving an answer or asking a question?
__________________
Light and Peace
Spirit Mind Body UK ~ Holistic Directory

Loren is offline   Reply With Quote
Old 07-09-2006   #10
faisal1
 
Join Date: Jun 2006
Posts: 11
faisal1 is on a distinguished road
Default

Hi

I did exactly what you have said but i got this :

PHP Code:
[img]http://www.mydomain.com/plugins/captcha/image.php[/img] 
beside the field while i have enabled captchas !
faisal1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
send email from contact page tisoy Modifications 13 03-01-2007 04:55 PM
Using Captcha Shannon Hutcheson User interface 5 06-04-2006 05:57 PM
Contact Us page joe smiths Common Questions 5 06-01-2006 06:50 AM
contact us + tell a friend page sinxelo Modifications 31 01-01-1970 01:54 AM


All times are GMT. The time now is 06:36 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us | SEO Resources