Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2011-09-11 20:32:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Pat64

Which, for the record, in English is…?

(Google Translate didn’t quite do your native tongue justice and I fear it may have suffered in the translation)

Last edited by Bloke (2011-09-11 20:33:01)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#26 2011-09-12 10:25:31

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Hi Patrick

The behaviour is on front office not on back-office, the logout is made on front-office too, try it and you will see it, it s not a big problem but when someone logout he expect to see the resulte of logout! i tried the redirect function but havent succeded to solve that.

in French

Salut patrick

Le comportement décrit est sur le site web et non l’admin de txp, la déconnexion est faite sur le site et non le backend, j’ai aussi essayé d’utiliser la redirection (au niveau du front office) mais le résultat est le même.
Ce n’est pas un drame mais c’est un peu gênant car quand on se déconnecté on espère voir affiché une page qui montre bien qu’on est déconnecté.

Cheers

Offline

#27 2011-09-12 11:30:38

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Hello !
J’utilise ce plugin sur 2 sites maintenant (c’est tout récent).
Il me semble – mais je me trompe peut-être – que j’ai eu ce problème là à cause d’erreurs dans le code généré.
Regarde si tu n’as pas un plugin mal utilisé quelque part …
Es-tu en mode exploitation / debuggage ?
Le fait est que tout est devenu OK après nettoyage de mes erreurs.

In my bad english …

This very useful plugin works bad if other plugins generate bad code.
My little experience on 2 sites : same behaviour as above. When I clean my code and remove some errors, all works fine.

Last edited by jpdupont (2011-09-12 14:15:17)

Offline

#28 2011-09-12 12:09:58

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Win an iPod for your next post in English language ;)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#29 2011-09-12 14:14:50

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Hi

Solved the problem by using cbe_frontauth_redirect, i used it before but maybe there was an error in the code, the debugging mode of textpattern dont interfere with the problem

Thanks all for the help
Merci à tous pour votre aide

Offline

#30 2011-09-12 21:54:30

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Pat64 wrote in french:

Seconde chose : as-tu bien renseigné une URL de redirection pour l’événement de déconnexion ? C’est à ce niveau que s’effectue le rafraîchissement – nécessaire – que tu mentionnes.

@Stef & @Uli:

The problem is now solved (and identified in my french answer ;) : it came with the redirect attribute into cbe_frontauth plugin.

I’m very sorry, but it’s DragonDz the first french speaker in his post!

Cheers all,

Last edited by Pat64 (2011-09-12 21:54:51)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#31 2011-09-13 08:27:43

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Pat64 a écrit:

Pat64 wrote in french:
I’m very sorry, but it’s DragonDz the first french speaker in his post!

Yes, it s me, but i always translated my post in english

@Patrick : Cafteur va!

Offline

#32 2012-01-06 17:07:38

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Some additions to the documentation to help with cookies and subdomains (which can lead to malfunctions if not handled properly).
Documentations translated into french for french-speaking people who can’t (under)stand english.

Versions 0.7.1 and 0.7.1-fr are here

… immediately followed by v0.8 ; v0.8-fr is in progress
See changelog

Last edited by CeBe (2012-01-13 17:10:10)

Offline

#33 2012-01-14 09:08:02

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Hi all.

<txp:cbe_frontauth_loginwith value="auto | username | email" />

I think this new feature need some details and examples. How to use it? Instead of <txp:cbe_frontauth_logname label="Name" wraptag="" class="text-field" />?
What about the <txp:cbe_frontauth_password /> tag into this process? Do we have to use only one cbe_input for login or the two tags are always needed?

Cheers,
Pat.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#34 2012-01-14 10:20:35

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

<txp:cbe_frontauth_loginwith /> is meant to set a global initialization. It is at the same level as <txp:cbe_frontauth_redirect />.

It tells the plugin that the identifier will be, everywhere, either the username (as usual), or the email, or any of them (i.e. automatic detection, this is the default).
So here we go :

<!-- At the very beginning !-->
<txp:cbe_frontauth_loginwith value="email" />

<!-- Now, if I try to connect with my username, it will fail and I have to use my email address. !-->

<!-- And later !-->
<txp:cbe_frontauth_login wraptag="div" class="auth">
  <txp:cbe_frontauth_logname label="Name" wraptag="" class="text-field" />
  <txp:cbe_frontauth_password label="Password" wraptag="" class="text-field" />
</txp:cbe_frontauth_login>

Basic usage will work too :

<!-- Identifier must be the email address !-->
<txp:cbe_frontauth_loginwith value="email" />
...
<!-- Display adapted form whether we are connected or not !-->
<txp:cbe_frontauth />

Offline

#35 2012-01-14 12:35:04

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

…Sure gal. Maybe to be added into the doc for newbies (like me;)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#36 2012-01-17 15:58:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend

Finally got round to using this in anger. It’s brilliant, thanks Claire. I love the flexibility of being able to use the quick combo frontauth_box, and being able to mix and match attributes / forms / containers and dedicated tags to build up my own login / logout / protection logic.

One thing I’d like to find out is how to display a message if login failed for some reason. I can display an invite message easily for visitors to the page, but if they subsequently type their username/password wrong they are just returned to the login box with no explanation why.

Is there some combination of cbe_ tags I can employ to detect this situation (not logged in AND recent unsuccessful login attempt) so I can offer the visitor some assistance? Or would it need an additional tag like, hmmmmm, off the top of my head:

<txp:cbe_frontauth_login>
   <txp:cbe_frontauth_error type="fail_login" wraptag="div" class="oops">
      Could not log in. Please check your login name and password are typed correctly.
   </txp:cbe_frontauth_error>
   <txp:cbe_frontauth_error type="empty_logname" wraptag="div" class="warn">
      Please type a login name before trying to log in.
   </txp:cbe_frontauth_error>
   <txp:cbe_frontauth_error type="empty_password" wraptag="div" class="warn">
      Please type a password to log in.
   </txp:cbe_frontauth_error>
   <p>Username<br /><txp:cbe_frontauth_logname label="" /></p>
   <p>Password<br /><txp:cbe_frontauth_password label="" /></p>
   <div id="login_btn"><txp:cbe_frontauth_submit label="Go" /></div>
</txp:cbe_frontauth_login>

(btw, I’m using the Some label<br/><txp:cbe_frontauth_... label="" /> format because the tag doesn’t support break="br", right?)

Perhaps text and form attributes would be useful for people who don’t want to use the container and prefer to specify the error string inline, or in a reusable Form (hehe, the contents of text could even be passed to gTxt() first for a neat l10n solution!)

As a possible extension, being able to supply a list of error types would cut down on the amount of typing (the last two error conditions could then be rolled into one ‘Please complete both input boxes to log in’). <txp:else> support would also be cool, so we could choose to display a custom invite message only when there are no errors detected.

Alternatively, you could operate like mem_form and ign_password_protect do things by setting a global error string that holds the last encountered error. Then a simple <txp:cbe_frontauth_error wraptag= | class=> could be used to display it. Of course, this is less friendly for international users and requires you to set the error message in the code, which might be less than desirable. Or maybe some hybrid solution (or something entirely better).

Any thoughts? Perhaps I’m just missing something obvious.

Thanks again for a fantastic plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB