Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Bloke, thank you for your comment. I appreciate both the compliment and the constructive criticism :)
So… (and note for myself too) :<br />support is missing. Bad. It shouldn’t.- Error messages are missing too. Bad too. They shouldn’t neither, it’s a little rough.
All I can promise now is to have a look in the next few days.
Thanks again to help making it better.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Great plugin, Claire. I really enjoy using it so far. Thanks for your work on this.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
@maruchan: Thank you very much.
To all, and about break tag:
A sudden idea crossed my mind: what about a css display: block; ? Like in this (quick and dirty) code:
<html>
<head>
<style type="text/css">
input, label {
display: block;
}
</style>
</head>
<body>
<form action="test.php" method="post">
<label for="entry1">Value1 :</label>
<input type="text" id="entry1" value="" />
<label for="entry2">Value2 :</label>
<input type="text" id="entry2" value="" />
<input type="submit" value="Go" />
</form>
</body>
</html>
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Hi Claire.
If you want to place yours labels above inputs, that the good choice. Just add this:
label{display:block}
Cheers,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Hi Claire,
I’ve been trying to add a login box to my site most of the weekend.
Your plugin works fine as I don’t need user registration, but I realised after getting it working and looking pretty :-) that your plugin doesn’t support password reset requests.
So I installed mem_self_register and the password reset on that plugin isn’t working properly at the moment, plus it kind of defeats the object of using your plugin. (Anyone got this working?)
Do you plan to add a password reset function to your plugin?
It is a must with most login boxes.
merci beaucoup
Geoff
I knew that CSE French would come in handy eventually – 36 years … ;-)
Last edited by geoff777 (2012-02-13 13:17:18)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
geoff777 a écrit:
Do you plan to add a password reset function to your plugin?
Yes !
And change password too.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
CeBe wrote:
Yes !
And change password too.
Wonderful, I’ll move on to another part of the site and stop trying to get mem_self_register to do this and wait for your update.
Thanks
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
Defualt user with no-access can’t log in public side?
Offline
Re: cbe_frontauth: Connect to (and disconnect from) backend from frontend
So sorry, it’s been a while…
wornout a écrit:
Defualt user with no-access can’t log in public side?
Login and logout process are handled like in backend. So: no right => no access => no login
—
Since I’m here, changing and resetting function have just been added via hooks for callback functions (see Callback section in the help).
Have a look at cbe_members.
Offline