Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#46 2021-01-02 17:32:00
- kirito
- Member
- From: Italy
- Registered: 2017-01-10
- Posts: 34
Re: mck_login
If it’s of any use for somebody, I applied a couple of very small fixes to make the plugin compatible with 4.8 and repacked the .php with metadata and docs in textile format.
It’s not fully working (the reset forgotten password procedure is broken, as far as I can see), but you can register a new user with the desired privs level and change the password while logged in.
Combined with the functionality of cbe_frontauth (+cbe_members) and rah_privileges I managed to create a private blog where friends can self register to see the blog articles and manage their password.
Pros:
- It works ;)
Cons (to be fixed):
- email subject and body are hardcoded for both mck_login and cbe_frontauth => need more flexibility
- new random created password is sent in plain text to the user => need to implement a confirmation request > set your new secret password procedure
Repos on github:
- mck_login
- cbe_frontauth
include_once( txplib_admin.php );for compatibility with 4.8; the repo includes cbe_members repacked in .php
Offline
#47 2021-01-03 08:23:04
- Cryptoniq
- New Member
- Registered: 2021-01-03
- Posts: 1
Re: mck_login
Thanks Kirito,
unfortunately i get the following error-message when i activate this plugin mck_login_v0.1.1
Parse error: syntax error, unexpected ‘<’, expecting end of file in /home/u295562650/domains/klartext.jetzt/public_html/textpattern/plugins/mck_login_v0.1.1/mck_login_v0.1.1.php on line 2
What do i do wrong?
I pasted the downloaded .php-file, but it looked like html only…. I tried also to copy the raw-php-code to the plugin field, bus same error…
I don’t get it.
Can someone help, please?
Offline
Re: mck_login
Cryptoniq wrote #327982:
Parse error: syntax error, unexpected ‘<’, expecting end of file in
Hi and welcome to the forum. You’ll get this if you paste in any of the <?php or ?> field marks into the plugin code boxes. Assuming you are running a recent (Txp 4.7 or higher) version you should either:
- Download the compiled .txt version of the plugin from the above repo and paste its contents into the Install plugin box.
- Download the .php version of the plugin and use the Upload plugin field’s browse… button to locate the file to install it.
- Locate the existing plugin in your Textpattern installation, click to edit it, and then copy and paste just the new code from the repo and paste it into the Code box. In other words, the chunk between (and not including) the BEGIN and END PLUGIN CODE markers.
Either of those routes will get the plugin installed. Hope that helps.
EDIT: We’re unifying the plugin experience in Textpattern 4.9 but we’re not quite there yet.
Last edited by Bloke (2021-01-03 08:50:35)
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: mck_login
Picking up the baton from kirito, I’ve made some further minor updates and refactored / repackaged the plugin here: github.com/jools-r/mck_login/releases/ so it’s generally easier to install. Textpacks are now included, so there are no extra steps necessary.
Like kirito wrote above, I don’t know if all functionality works, but the general public-side login and logout methods for creating password-protected areas work in my testing on Textpattern 4.9 and PHP 8.4.
I’ll gladly incorporate further fixes / repairs should others have addressed these previously. Thanks as ever to previous authors and maintainers: Marco, Jukka, gas-kirito and Ironmangary.
TXP Builders – finely-crafted code, design and txp
Offline
Re: mck_login
I’ve made some more fixes to mck_login that, I hope, now help to restore previously broken functionality. While it’s not been battle-tested in earnest, in my own setup the following functions now work:
- self-registration
- password change
- password reset
- Proper language strings in the emails generated by mck_login
If it’s of any interest, the broken functionality in Jukka’s otherwise excellent plugin can be traced to changes to Textpattern’s core password generation and hashing routines (ironically introduced by Jukka himself back in 2013), the dropping of the ipban_discuss table from the core, the renaming of the ip_blacklisted function to ip_blocklisted, and the regrouping of language strings. New user registration and password changing now also use txp’s built-in functions.
My hope is that this can once again become a reliable plugin for making password-protected / member-accessible areas. With time, I hope to expand on the help instructions.
As ever, any feedback much appreciated.
TXP Builders – finely-crafted code, design and txp
Offline