![]() |
![]() |
![]() |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Administrator
Join Date: Sep 2005
Posts: 9,285
![]() ![]() ![]() ![]() ![]() ![]() |
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>
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}
*** open contacts.php and find the following code *** Code:
/** requires common header file **/
require_once('header.php');
Code:
session_start(); Code:
if (!$error)
{
$gDirDb->addContact(addslashes($fullname), addslashes($email), addslashes($body));
$msg = "[*]{$gDirLang['contact_added']}";
}
Code:
/** check for captcha **/
if ($gDirConfig['captcha'])
{
$sc1 = $_POST['security_code'];
$sc2 = $_SESSION['pass'];
if (strcmp($sc1, $sc2))
{
$error = true;
$msg .= "[*]{$gDirLang['error_captcha']}";
}
}
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. |
|
|
|
|
|
#2 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Guess what!
I still cant see my captcha Fed up today..think i will go back to bed ![]() |
|
|
|
|
|
#3 |
|
Administrator
Join Date: Sep 2005
Posts: 9,285
![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
#4 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
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'; Code:
$gDirConfig['captcha'] = '1'; ![]() |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Sep 2005
Posts: 9,285
![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
#6 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
I had enabled it there
thats the bizarre thing! |
|
|
|
|
|
#7 |
|
Administrator
Join Date: Sep 2005
Posts: 9,285
![]() ![]() ![]() ![]() ![]() ![]() |
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 |
|
|
|
|
|
#8 |
|
Join Date: May 2006
Posts: 55
![]() |
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} |
|
|
|
|
|
#9 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Hi uscasinos Welcome to the forums!
![]() Are you giving an answer or asking a question? ![]() |
|
|
|
|
|
#10 |
|
Join Date: Jun 2006
Posts: 11
![]() |
Hi
I did exactly what you have said but i got this : PHP Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |