Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 2013 Abuse Android AntiHarvesting AntiSpam API Apple Battlefield billige Blocks Bootstrap Captcha cell cent chronolabs CHUNG content CĂN demo download Dresses facebook Fat floor for free Gateway Google Guide herre Honeypot HP html5 Human HỘ IP iPhone jQuery Language Legal List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Solution Spam stem Studio support tag tags tdmcreate The Theme themes User userlog web weight Wishcraft xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137872

ode64de

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post

(1) 2 »


#1 Posted on: 2011/11/23 7:57 class/captcha
HI.
I have this problem.
In config.php i have set the 'skipmember' => false, // Skip CAPTCHA check for members, but the capatcha code is not visible at users.... only anonymous

I use recapatcha code, the problem seems to be in the file xoopscaptcha.php.

Thank you very much!.


Top

Roby73
Joined:
2011/6/15 16:31
From Torino
Group:
Registered Users
Posts: 229
(Show More) (Show Less)


#2 Posted on: 2011/11/23 9:38 Re: class/captcha
For register only anonymous should see it, if you use it in other modules you need to add the code in these

Top


Blog| Modules, Themes, Tutorials|[url=http://mobile.txmodxoops.org]
timgno
Joined:
2007/6/21 13:54
From Italy
Group:
Registered Users
Posts: 1247
(Show More) (Show Less)


#3 Posted on: 2011/11/23 12:54 Re: class/captcha
What is the module displaying the captcha?

Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#4 Posted on: 2011/11/23 16:31 Re: class/captcha
I modified some modules with capatcha code (with system class).
tellafirend and xfguestbook

In these modules the capatcha code is visible only a anonymous users.

kipmember' => false/true don't change.



Top

Roby73
Joined:
2011/6/15 16:31
From Torino
Group:
Registered Users
Posts: 229
(Show More) (Show Less)


#5 Posted on: 2011/11/23 19:15 Re: class/captcha
Can you show me the code you used?
Did you try to add skipmember in recatpcha.config.php, both configs are loaded and merged.

Did you test the change during the same session? You may want to logout and login again after you apply the change.

Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#6 Posted on: 2011/11/23 21:17 Re: class/captcha
In the module xfguestbook and in the file xfcreate.php i add in all switch(op) the code:

xoops_load('XoopsCaptcha');
        
$xoopsCaptcha XoopsCaptcha::getInstance();
        if (!
$xoopsCaptcha->verify()) {
            
$msgstop .= $xoopsCaptcha->getMessage();
        }


And in the file form_sign.inc.php the code:

$button_tray->addElement(new XoopsFormCaptcha(), true);


With anonymous user all is ok, but not with register user.
I try add skipmember in config.recatpcha.php, don't work.
I test in new sessions, logout/login and cleaning all cache.

try changing the code in xoopscaptcha.php, recaptcha work in all condition.... registered user, anonymous and all groups.
the problem seems to be at line 112

if (!empty($this->config['skipmember']) && is_object($GLOBALS['xoopsUser'])) {
            
$this->active false;
            return 
$this->active;
        }


and line 209

} else if (is_object($GLOBALS['xoopsUser']) && ! empty($skipMember)) {
            
$is_valid true;


Thank you trabis

Top

Roby73
Joined:
2011/6/15 16:31
From Torino
Group:
Registered Users
Posts: 229
(Show More) (Show Less)


#7 Posted on: 2011/11/24 12:57 Re: class/captcha
I see the problem, you are using:
$button_tray->addElement(new XoopsFormCaptcha(), true);


Notice the that XoopsFormCaptcha constructor accepts the following params:
$caption ''$name 'xoopscaptcha'$skipmember true$configs = array()


As you see, by default, a XoopsFormCaptcha will skip members. I'm not sure if this behavior is ideal because it overrides the config file settings.

Anyway, you will need to change your line into:
$button_tray->addElement(new XoopsFormCaptcha('''xoopscaptcha'false), true);




Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#8 Posted on: 2011/11/24 18:29 Re: class/captcha
Thank trabis for your help.
The code work with registered user
But i don't understand, the general config 'skipmember' can be setted? Or is only possible set it in single module?

I would set skipmember for all modules in one time.

Thank you

Top

Roby73
Joined:
2011/6/15 16:31
From Torino
Group:
Registered Users
Posts: 229
(Show More) (Show Less)


#9 Posted on: 2011/11/24 18:45 Re: class/captcha
Quote:

Roby73 wrote:
But i don't understand, the general config 'skipmember' can be setted? Or is only possible set it in single module?)


That is why I said:
Quote:
I'm not sure if this behavior is ideal because it overrides the config file settings.


It does not make sense to have a config that does not apply as default.

I think this can be qualified as a bug in the XoopsCaptchaForm class.

skipmember should be set to null, and if null, it should check for the setting used on config file, if it was no setting on config file, then it would set it to true.

I'll see if I can do this on 2.5.5

Top


Xoops User Utilities | Xoops Search Engine | vil3/trabisdementia
trabis
Joined:
2006/9/1 13:10
From Portugal
Group:
Webmaster
Registered Users
Posts: 2198
(Show More) (Show Less)


#10 Posted on: 2011/11/24 19:06 Re: class/captcha
Sorry i had not read
Quote:
I'm not sure if this behavior is ideal because it overrides the config file settings.

Thanks for Everything and for your good job

Top

Roby73
Joined:
2011/6/15 16:31
From Torino
Group:
Registered Users
Posts: 229
(Show More) (Show Less)




(1) 2 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]