Hello,
I would like to show the" login" for the memberpages on the top menu point for the memberpage. But if logged in, I would like to show this and the logout information in a separate area of the page which is always visible as long as the member is logged in. But if logged out this "area" should disappear.
I think there must be a possibility to do that, any ideas? Which are the variables which control the login and logout information which is shown?
Regards
Fesselix
memeberpage
Moderator: Tata
Re: memeberpage
Hi fesselix,
I have done this once by putting thisinto the template. Hope it works.
Martin
I have done this once by putting this
Code: Select all
<?php
if(isset($_SESSION['Name'],$_SESSION['sessionnr'])) {
echo '<form action="'.$sn.'?'.$su.'" method="post">'
.tag('input type="hidden" name="function" value="memberslogout"')
.tag('input type="submit" class="member_button" value="Abmelden"')
.'</form>';
}
?>
Martin
Re: memeberpage
Hallo,
I have memberpages 2.1 in progress since a long time, but I have so much work with CMSimple_XH, I cant make it ready for publishing next time.
There will be a new function:
You can insert this function anywhere in the Template and style it with div.mpp_loggedin_warning in the css-file of memberpages. Here you can see it:
http://www.cmsimple-xh.de/xhtest/ Go to "memberpages" and login with: user1 / pass1
It's a test-installation, don't wonder Some pages have other templates, there you can't see the warning, of course.
That's the code:
Insert it in the index.php of memberpages behind the end of "function memberslogin()", I think it's ca. line 178. Then add the class div.mpp_loggedin_warning to the css file of memberpages.
Update: you can change in the language-files:
I have memberpages 2.1 in progress since a long time, but I have so much work with CMSimple_XH, I cant make it ready for publishing next time.
There will be a new function:
Code: Select all
<?php echo memberswarning();?>
http://www.cmsimple-xh.de/xhtest/ Go to "memberpages" and login with: user1 / pass1
It's a test-installation, don't wonder Some pages have other templates, there you can't see the warning, of course.
That's the code:
Code: Select all
function memberswarning(){global $sn,$su,$plugin_cf,$plugin_tx,$tx;$plugin=basename(dirname(__FILE__),"/");
if(isset($_SESSION['Name'],$_SESSION['sessionnr'])|| se('sessionnr') == session_id()) {
$o = '<div class="mpp_loggedin_warning">' . $plugin_tx[$plugin]['loggedin'].'<form action="'.$sn.'?'.$su.'" method="post">'.tag('input type="hidden" name="function" value="memberslogout"').tag('input type="submit" class="mpp_member_button" value="'.$plugin_tx[$plugin]['logout'].'"').'</form>' . '</div>';}return $o;
Update: you can change in the language-files:
Code: Select all
$plugin_tx['memberpages']['loggedin']="the text";