Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2013-02-12 15:20:17

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

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

Hello Claire,

i am struggling with a strange behavior only in Chrome :
cbe_frontauth_redirect used
when entering the credentials in the login form and submitting , form get submitted but the page still show the login form.
Then if i hit the “connect” button (nothing else in the form) the protected content appear.
Weardest : if i reload the page (using the adress bar) protected content disappear and i get the login form again. Hitting “connect” will show me the protected content.

I just can’t make anything logical about this !
If you can give any idea where i should look ?

Edit 13/02 : after some more test it is my plugin fault. This did not happened in local server.

Last edited by planeth (2013-02-13 09:29:55)

Offline

#86 2013-03-06 10:55:17

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 claire

I made a little modification to your plugin, it is about the class css, the checkbox cant be set freely it s allways “checkbox” due to checkbox funtion limitation in textpattern , i also needed a class for labels then i made changes in code to add a class, the change is not perfect, the best way was to add a labelclass into the call but i havent enough time to improve it that way.

May be add it to your todo list.

Cheers

Offline

#87 2013-03-23 15:20:47

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

This is a great plugin… thanks so much… I notice bloke asked for some functionality that I too would have expected and don’t see… failed login message

Did this ever get resolved, added? I don’t see it.

Offline

#88 2013-03-27 11:48:02

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

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

A very-quick update has been just released.

If login fails, an error message appears before the login form. Its wrapping tag (default: span) and class (default: cbe_fa_error) can be customised:

<txp:cbe_frontauth_box tag_error="p" class_error="err_msg" />
<txp:cbe_frontauth_login tag_error="p" class_error="err_msg" />

Messages are now customisable too by editing the first function (_cbe_fa_lang()). Their default values are as much as possible pulled from the default language (i.e. table txp_lang).
The <txp:cbe_frontauth_invite /> tag and various invite attributes are still present for backward compatibility, but you will probably find more convenient to directly edit the plugin.

Reminder: the plugin page is here.

Offline

#89 2013-03-27 21:15:27

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

Thanks so much Claire.

Offline

#90 2013-06-04 13:34:00

EdwardS
Member
Registered: 2013-02-23
Posts: 13

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

Hello Claire, just wanted to say thanks for creating this fantastic plugin we use it to control access to a multi user intranet system. I have managed to use your plugin to display a customised “restricted message” when a user privs are too low, and wanted to share it with anyone else thats trying to do the same thing.

This (with correct styling) will give you a login page with javascript and cookie enabled message (disabled login button if not enabled). A whois logged in, logout and edit buttons when logged in. And a message from HAL 9000 if you enter an area without sufficient privs. Hope this helps someone setup a quick access control system using this plugin. Thanks again claire, we will be donating (:

At the top of my page i have:

<!-- START HAL RESTRICTED ZONE -->
<txp:cbe_frontauth_protect level="4,5,6,7">
<object style="visibility:hidden; height:0px">
<param name="autostart" value="true">
<param name="src" value="/media/cantdo.wav">
<param name="autoplay" value="true"> 
<param name="controller" value="true">
<embed src="/media/cantdo.wav" controller="true" autoplay="true" autostart="True" type="audio/wav" />
</object>
<h1 style="color:white; margin:auto">I'm sorry Dave, I'm afraid I can't do that</h1>
    <style>
    body { 
    background-image: url('/images/20120716-Hal-9000.jpg');
    background-size: 100%;
    background-position: center;
    }
    </style>
</txp:cbe_frontauth_protect>

<!-- START LOGOUT BOX -->
<txp:cbe_frontauth_if_logged>
<div class="logout">
<txp:cbe_frontauth_box logout_type="button" >
User: <txp:cbe_frontauth_whois type="RealName" />
<txp:cbe_frontauth_edit_article label="Edit"/>
</txp:cbe_frontauth_box>
</div>

and at bottom i have:

</txp:cbe_frontauth_protect>
<txp:else />
<body>

<div class="login">
<p><txp:cbe_frontauth_login invite="Connect to Intranet"></p>
<br>
<txp:cbe_frontauth_logname label="Name: " />
<txp:cbe_frontauth_password label="Password: " />

<!-- javascript and cookie notices -->

<script>document.write("<input type='submit' value='Login'>");</script>
<noscript><input type="submit" value="Login" title="Please enable Javascript" disabled /></noscript>
<br>
<br>
<txp:cbe_frontauth_stay label="Stay Logged-in?" />
<txp:cbe_frontauth_reset label="forgotten Password?" />
<br>
</txp:cbe_frontauth_login>
<div style="float:right">
<noscript><span style="color:red">Please <a href="http://www.enable-javascript.com/">enable Javascript</a> to continue</span></noscript>
<script>document.write("Javascript ENABLED");</script>
<br>
<script type="text/javascript">
function are_cookies_enabled()
{
var cookieEnabled = (navigator.cookieEnabled) ? true : false;

if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled)
{ 
document.cookie="testcookie";
cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
}
return (cookieEnabled);
}

if (are_cookies_enabled())
{
document.write("Cookies ENABLED");
}
else
{
document.write("<span style='color:red'>Please ENABLE cookies to continue</span>");
}
</script>
</div>
<!-- end notice -->


</div>
</body>
</txp:cbe_frontauth_if_logged>

{Edited to add Textile for code/apostrophe display. – Uli}

Last edited by uli (2013-06-04 16:15:51)

Offline

#91 2013-06-05 20:37:31

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

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

Hi EdwardS,

A very big thank you for your contribution !

Offline

#92 2013-06-15 14:02:22

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

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

Great to see the community getting around this plugin, possibly the best txp has seen for community/front end login based sites ever lol :) Thanks Claire and all!!


…………………
I <3 txp
…………………

Offline

#93 2013-06-17 03:38:26

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

Hi Claire,

Your recent changes with error messages were a life saver. Do you think you could just borrow mck_login’s error mechamism, which handles multiple scenarios and language packs. Just a thought…

Offline

#94 2013-06-17 11:26:09

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

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

After having a look at mck_login, have thought it is now complete (more than cbe_frontauth) and mature, and thinking in terms of complementarity, the logical conclusion is: I strongly suggest that you switch to it to benefit from all its advantages :)

Offline

#95 2013-06-17 14:33:10

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

I would like to use cbe_frontauth. One of the benefits of cbe that I would love to use is using email as login field. That is a great feature.

Offline

#96 2013-06-17 15:41:07

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

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

Ah… well. It’s just that something else is cooking in my pot. I think it would be faster if Jukka agrees to borrow and adapt lines 757 to 763 :)

Offline

Board footer

Powered by FluxBB