Author Topic: captcha integration  (Read 9168 times)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« on: December 21, 2010, 01:13:30 AM »
Hi all,
    why the captcha are available in a separate page instead of appearing in login page , have i need to perform any customization to  make it see them in login page ..?
« Last Edit: February 17, 2011, 06:20:05 AM by Gautham Vignesh »
____________
B.Gautham Vignesh

__________________

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
captcha integration
« Reply #1 on: December 21, 2010, 06:27:49 AM »
captcha config:


/* Captcha challenge to enter authenticated state */
$rcmail_config['captcha_auth'] = TRUE;


./skins/default/templates/login.html





captcha.php


class captcha extends rcube_plugin {

  public 
$task "login|mail|logout";


It is not designed for this purpose. But these few hacks seem to do the job.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #2 on: December 21, 2010, 07:34:12 AM »
Hi Rosali,
          Thanks Rosali.. its integrated now..but after we logout it doesn't appear .. after clicking the login button only it does appears .. and some faults are happening like suddenly shows 0 mails in inbox - when we double click on inbox , it shows the mails.
____________
B.Gautham Vignesh

__________________

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
captcha integration
« Reply #3 on: December 21, 2010, 07:37:10 AM »
Did you do the following step? -> see '|logout'


class captcha extends rcube_plugin {

  public 
$task "login|mail|logout";
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #4 on: December 21, 2010, 08:09:42 AM »
Hi Rosali ,
               yeah i done those you have mentioned first.. still thats the problem
____________
B.Gautham Vignesh

__________________

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
captcha integration
« Reply #5 on: December 21, 2010, 08:47:01 AM »
Does it help to comment the login_after hook?


  
function init()
  {
    
$this->add_texts('localization/');  
    if(
file_exists("./plugins/captcha/config/config.inc.php"))
      
$this->load_config('config/config.inc.php');
    else
      
$this->load_config('config/config.inc.php.dist');
    
$this->add_hook('template_object_captcha', array($this'show_captcha'));
    
//$this->add_hook('login_after', array($this, 'check_captcha'));
    
$this->add_hook('render_page', array($this'check_captcha'));

  }
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #6 on: December 21, 2010, 09:50:41 AM »
Nopes .. haven't any changes happen :(
____________
B.Gautham Vignesh

__________________

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
captcha integration
« Reply #7 on: December 21, 2010, 10:28:41 AM »
I use Roundcube v0.5-RC.

Attached version works for me. Remove modification in login.html template.

EDIT: Attachment removed
« Last Edit: December 23, 2010, 01:06:20 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #8 on: December 21, 2010, 10:48:26 AM »
I made a redirection of page .. in index.php
 

 // end session
else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id'])) {
  
$userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language);
  
$OUTPUT->show_message('loggedout');
  
$RCMAIL->logout_actions();
---->
	
header('location:http://localhost/roundcubemail');  //redirects from ?_task=logout
  
$RCMAIL->kill_session();
  
$RCMAIL->plugins->exec_hook('logout_after'$userdata);
}
____________
B.Gautham Vignesh

__________________

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
captcha integration
« Reply #9 on: December 21, 2010, 11:09:19 AM »
That's a dirty hack. At least place it after kill_session and logout_after hook.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #10 on: December 21, 2010, 11:14:16 AM »
sure yeah ..

I do have some internal errors .. of inbox - shows up no mails in your mailbox .. and when i click on inbox , it displays the mails .. this happens only 1/10 of login .

can you tell me in which file have i need to change it or why is that happens..??
____________
B.Gautham Vignesh

__________________

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #11 on: December 21, 2010, 11:51:51 PM »
Issues to disappearance of captcha :

1. when the user -> correct and pass -> wrong , with captcha -> correct

2. Once the captcha verification is wrong due to abv problem.. i need to clear the history
    to make it appear
____________
B.Gautham Vignesh

__________________

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #12 on: December 21, 2010, 11:52:30 PM »
Issues to disappearance of captcha :

1. when the user -> correct and pass -> wrong , with captcha -> correct

2. Once the captcha verification is wrong due to abv problem.. i need to clear the history
    to make it appear

Rosali can you just find me a way to overcome it ya :)
____________
B.Gautham Vignesh

__________________

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
captcha integration
« Reply #13 on: December 22, 2010, 12:59:59 AM »
Why do you want to re-captcha if it was already solved correct?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Gautham Vignesh

  • Jr. Member
  • **
  • Posts: 41
captcha integration
« Reply #14 on: December 22, 2010, 01:08:33 AM »
i agree your statement Rosali..
this works cool now.. how possible is that i can customize the mailbox .. and under which file i wana to make modifications to do it .. ??
____________
B.Gautham Vignesh

__________________