Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

New site - classifieds style

2»

Comments

  • edited August 2007
    Found the answer myself - instead of closing the else statement with the closing "tbody" tag, it needed a few lines, plus a closing else tag:

    $CommentList .= ' </tbody> </table> </div>'; }
    Does not quite do what I want it to do yet, for example, how to change this line to allow for more than one role to have access:

    if ($Context->Session->User->RoleID == 4)
  • You can check if the role is listed in a array of roles you define right inside the IF:if ( in_array($Context->Session->User->RoleID, array(4, 5, 6)) )
  • Thanks WallPhone. Still not quite working for me - if I have one of the following:

    if ( in_array($Context->Session->User->RoleID, array(4, 5, 6)) )
    or:
    if ($Context->Session->User->RoleID == 4)
    or:
    if ($User->RoleID == 4)

    Then if I login as the Admin (role id of 4), whatever is in the "if" statement does NOT execute - only the "else" portion executes.

    With this:

    if ($Context->Session->User->RoleID != 4)

    And I am logged in as Admin, the code after the IF does execute.

    It should be the other way around, no??
This discussion has been closed.