Disable Forumbuilder Captcha if logged in with FEU

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
superstoffe
Forum Members
Forum Members
Posts: 50
Joined: Fri Jan 16, 2009 1:07 pm

Disable Forumbuilder Captcha if logged in with FEU

Post by superstoffe »

I never get my questions answered here .. but I guess its worth a shot..

So I got this form that, if you're logged in with FEU, fill up certain fields with the users account information. I also thought it would be sweet to skip the Captcha thingy when logged in .. but how? I can simply hide it when logged in, but the function is still there and just doesnt send the form.

So.. Is there a code to disable Captcha if logged?

Here's my Form code:

{if $customcontent_loggedin > 0}{else}
Logga in
Är du registrerad användare kan du logga in, och därmed ladda dina sparade uppgifter. Det gör det mycket lättare för dig som beställer regelbundet.{/if}
{cms_module module=FrontEndUsers nocaptcha=1 lang="sv_SE"}

{* DEFAULT FORM LAYOUT / pure CSS *}
{$fb_form_header}
{if $fb_form_done == 1}
{* This first section is for displaying submission errors *}
{if isset($fb_submission_error) && $fb_submission_error}
{$fb_submission_error}
{if isset($fb_show_submission_errors) && $fb_show_submission_errors}


{foreach from=$fb_submission_error_list item=thisErr}
{$thisErr}
{/foreach}


{/if}
{/if}
{else}
{* this section is for displaying the form *}
{* we start with validation errors *}
{if isset($fb_form_has_validation_errors) && $fb_form_has_validation_errors}


{foreach from=$fb_form_validation_errors item=thisErr}
{$thisErr}
{/foreach}


{/if}
{if isset($captcha_error) && $captcha_error}
{$captcha_error}
{/if}

{* and now the form itself *}
{$fb_form_start}
{$fb_hidden}

{if $total_pages gt 1}{$title_page_x_of_y}{/if}
{foreach from=$fields item=entry}
{if $entry->display == 1}
        {strip}
          {if $entry->needs_div == 1}
            required == 1 || $entry->css_class != '' || $entry->valid == 0} class="
              {if $entry->required == 1}required{/if}
              {if $entry->css_class != ''} {$entry->css_class}{/if}
                    {if $entry->valid == 0} fb_invalid{/if}
              "
            {/if}
            >
          {/if}
          {if $entry->hide_name == 0}
            multiple_parts != 1} for="{$entry->input_id}"{/if}>{$entry->name}
            {if $entry->required_symbol != ''}
                {$entry->required_symbol}
            {/if}
           
          {/if}
          {if $entry->multiple_parts == 1}
            {section name=numloop loop=$entry->input}
                {if $entry->label_parts == 1}
                {$entry->input[numloop]->input} {$entry->input[numloop]->name}
                {else}
                {$entry->input[numloop]->input}
                {/if}
                {if isset($entry->input[numloop]->op) && $entry->input[numloop]->op}{$entry->input[numloop]->op}{/if}
            {/section}
          {else}
            {if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
          {/if}

          {if $entry->needs_div == 1}
           
          {/if}
          {/strip}
      {/if}
{/foreach}
{if $customcontent_loggedin > 0}
-> Disable Captcha in some Way!?
Ange säkerhetskod
{$title_captcha}{$input_captcha}
{$graphic_captcha}

{/if}
{/if}
{$prev}{$submit}

{$fb_form_end}
{/if}
{$fb_form_footer}




Anyone with an idea? Please :)
User avatar
chuccaville
Forum Members
Forum Members
Posts: 12
Joined: Thu Sep 03, 2009 6:35 pm

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by chuccaville »

I got the same problem - Captcha makes no sense at all once a FEU is logged in. This is also true for the forum module. Any PHP developers that can dig into this problem?

Thanks
zabelle_motte
New Member
New Member
Posts: 7
Joined: Thu Mar 19, 2009 9:14 am

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by zabelle_motte »

Same question ...

Does anybody have a track ?

Zabelle
zabelle_motte
New Member
New Member
Posts: 7
Joined: Thu Mar 19, 2009 9:14 am

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by zabelle_motte »

I think this module should help :
http://dev.cmsmadesimple.org/projects/customcontent

Zabelle
zabelle_motte
New Member
New Member
Posts: 7
Joined: Thu Mar 19, 2009 9:14 am

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by zabelle_motte »

I have been doing a non succeeding attempt !

First, I installed 2 modules :  FrontEndUsers and CustomContent.

Then I edited my form template and replace this portion

Code: Select all

{if ($has_captcha == 1) }

		<div class="captcha">{$graphic_captcha}<br />{$title_captcha}<br />{$input_captcha}</div>
	{/if}
By the following :
 

Code: Select all

   {cms_module module=CustomContent}
	{if $ccuser->loggedin()}
        {else}
        {if $has_captcha == 1}

		<div class="captcha">{$graphic_captcha}<br />{$title_captcha}<br />{$input_captcha}</div>
	{/if}{/if}
This did not change anything.

Any suggestion ?
owr_bgld

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by owr_bgld »

Try the if in this way:

Code: Select all

{if $customcontent_loggedin}
It's been said, that that is an old smarty which doesn't work but at sites I could only get it work with this and not with ccuser->loggedin()
zabelle_motte
New Member
New Member
Posts: 7
Joined: Thu Mar 19, 2009 9:14 am

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by zabelle_motte »

Yesterday evening, I understood an important difference between Front End Users gestion and Backend Users gestion.
Front End users are users that can identify to acces specific content (intranet) while backend users are those that can acces the admin panel of CMSMS, to modify content ...

I wanna captcha be desactivated only for BackEnd Users.

That is the reason why I stop to investigate the solution above and create an other post :
http://forum.cmsmadesimple.org/index.ph ... 06201.html

But I am sure for those of you that want to desactivate captcha for Front End Users, the above proposition should work if you correctly configure the frontend userd and groups.

Anybody wanna try ?
The Fonk
New Member
New Member
Posts: 2
Joined: Thu May 06, 2010 9:34 am

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by The Fonk »

Hi everyone

To stop the login captcha you can change the following property when you reference the module:

nocaptcha="1"

For example to stop captcha for all FEUsers templates you could use:

{FrontEndUsers nocaptcha="1"}

This solved my particular problem - don't know if the same will work with formbuilder, but it's worth a go...
owr_bgld

Re: Disable Forumbuilder Captcha if logged in with FEU

Post by owr_bgld »

The Fonk wrote: ....nocaptcha="1"...
If you put it in all templates it stops going for everyone who looks at the site not only for them who are online in the backend.
Post Reply

Return to “Modules/Add-Ons”