Hi,
I’ve tried various things to get this working, but have hit a brick wall.
I have a news section of my site, with logged in users being able to leave comments. I can see the form when logged in as a web user, but when logged in as admin the form doesn’t show? Obviously Admin are not "web users", and this is where my confusion lies.
I have a snippet call in my "blog" template:
And the AreYouLoggedIn snippet:
<?php
/* Menu_WebloginPE
[!Menu_WebloginPE!]
*/
$output ='';
// check if the user is logged in
if(isset($_SESSION['webShortname'])){
$output .='{{commentsForm}}';
}else{
// if not logged in, show the login form
$output .='<h3>You must be <a href="#">logged in</a> to leave a comment</h3>';
}
return $output;
?>
You’ll see the commentsForm chunk call above. This works perfectly for "Web users" logging in, and it shows the form as expected. Whereas, if I’m logged in to the manager as Admin (in another tab) all I see is "You must be logged in to leave a comment".
Here is my commentsForm chunk:
[[Jot? &cssRowMe=`author` &output=`0` &placeholders=`1` &subscribe=`1` &sortby=`createdon:d` ¬ifyAuthor=`1` ¬ify=`1` &moderated=`1` &captcha=`2` &postdelay=`120` &trusted=`LoggedInUsers` &canpost=`LoggedInUsers` ]]
Any help would be much appreciated!
Thanks in advance.