Where's the signout link located?
Where's the signout link located in the files and is there anyway I can move it into the menu system along with dicussions/categories/search/account ?
0
This discussion has been closed.
Comments
.Session {}
Try this instead:
if (in_array($Context->SelfUrl, array("all", "forum", "pages", "here"))) { if ($this->Context->Session->UserID > 0) { $Menu->AddTab($Context->GetDefinition("SignOut"), "whatever", "leave.php", "SignOutClass", "", 5); } else { $Menu->AddTab($Context->GetDefinition("SignIn"), "whatever", "signin.php", "SignOutClass", "", 5); } $Head->AddString("<style type=\"text/css\">.Session { display: none; }</style>"); }
if (in_array($Context->SelfUrl, array("all", "forum", "pages", "here"))) { if ($this->Context->Session->UserID > 0) {
Now no error is presented, but the menu doesn't show up because of it...
k, so yeah Undefined variable: this resulting from
if ($this->Context->Session->UserID > 0) {
if (in_array($this->Context->SelfUrl, array("all", "forum", "pages", "here"))) {
Needs to be changed to the actual page names that you want the signout/in button on (implied by "all forum pages here), like this:
if (in_array($this->Context->SelfUrl, array("index.php", "comments.php"))) {
that would add it to the discussion list and the comments page - and nothing else.
Why don't you start a new discussion outlining your problem?