Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
txp_public_login
I need to read the public cookie content.
Do we have access to cs(‘txp_public_login’) on a multisite installation?
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: txp_public_login
Sorry folks my question isn’t clear.
Here is my attempt:
if (@txpinterface == 'public') {
register_callback('plugin_name', 'textpattern');
}
function plugin_name($event, $step) {
if ( cs('txp_login_public') ) {
// do some things on the public side.
}
}
On a single installation of TXP, this above works fine.
I don’t know if the txp_login_public
cookie is created on a multisite installation. In this case, what about that:
global $prefs;
// Allow use of cross domains 'txp_login_public' cookie (support multi-sites installation)
setcookie('txp_login_public', cs('txp_login_public'), time(), '/', '.'.$prefs['siteurl']);
Thanks by advance for your answer.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1