Announcement

Collapse
No announcement yet.

how do I let users know they've been kicked off

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • toejam789
    replied
    final code:

    Code:
    <script language="JavaScript"> 
    <!-- 
    function kicked() { 
      var kickedoff = $bbuserinfo[usergroupid]; 
      if (kickedoff == 15) { 
        document.write("<center><font color=red><b>We're sorry, but YOU HAVE BEEN KICKED OFF</b></font></center>");
       }
      else {
        document.write("<p>You do not have permission to access this page. This could be due to one of several reasons:<p><ol><li>You do not have permission to access the page that you were trying to. Are you trying to edit someone else's post or trying to access administrative features? Check that you are allowed to perform this action in the Forum Rules.</li><li>If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.</li></ol>");
      }
    } 
    kicked();
    //--> 
    </script>

    Leave a comment:


  • toejam789
    replied
    thanks!

    you guys rock. it worked perfectly (I even added an else! oh boy!)



    -galen

    Leave a comment:


  • Scott MacVicar
    replied
    you need to call the function, you have it defined just not loading or trying to be executed.

    you should be able to make it

    Code:
    <script language="JavaScript"> 
    <!-- 
    function kicked() { 
      var kickedoff = $bbuserinfo[usergroupid]; 
      if (kickedoff == 15) { 
        document.write("YOU HAVE BEEN KICKED OFF");
      } 
    } 
    kicked();
    //--> 
    </script>
    though consider changing document.write to alert so they get a prompt.

    Leave a comment:


  • toejam789
    replied
    Originally posted by PPN
    Try that and how or where are you trying to call the function?
    I'm putting it into the error_nopermission_loggedin template.... and calling it? I want to call it right there - where/how do I need to call it?

    thank you for your help, I really appreciate it.

    -galen

    Leave a comment:


  • Scott MacVicar
    replied
    Code:
    script language="JavaScript"> 
    <!-- 
    function kicked() { 
      var kickedoff = $bbuserinfo[usergroupid]; 
      if (kickedoff == 15) { 
        document.write("YOU HAVE BEEN KICKED OFF");
      } 
    } 
    //--> 
    </script>
    Try that and how or where are you trying to call the function?

    Leave a comment:


  • toejam789
    replied
    <script language="JavaScript">
    <!--
    function kicked() {
    var kickedoff = $usergroupid;
    if (kickedoff == 15) {
    document.write("YOU HAVE BEEN KICKED OFF");}
    }
    //-->
    </script>
    Two openings... two closings... I think that part's right (or is it?). Either way, I tried removing it, and it still doesn't even show up.

    Thanks,
    Galen

    Leave a comment:


  • bigmattyh
    replied
    He means this:
    <script language="JavaScript">
    <!--
    function kicked() {
    var kickedoff = $usergroupid;
    if (kickedoff == 15) {
    document.write("YOU HAVE BEEN KICKED OFF");}
    }
    //-->
    </script>

    Leave a comment:


  • toejam789
    replied
    huh?

    I'm sorry, I don't understand what you mean.

    Leave a comment:


  • Scott MacVicar
    replied
    you have an extra parenthesis after the document.write

    Leave a comment:


  • toejam789
    started a topic how do I let users know they've been kicked off

    how do I let users know they've been kicked off

    Hi, I'm trying to insert some javascript into the "error_nopermission_loggedin" template that would display the message "YOU HAVE BEEN KICKED OFF" if the user has been kicked off and is trying to log in. I don't know a thing about javascript.

    Would you debug this script for me?

    <script language="JavaScript">
    <!--
    function kicked() {
    var kickedoff = $usergroupid;
    if (kickedoff == 15) {
    document.write("YOU HAVE BEEN KICKED OFF");}
    }
    //-->
    </script>
Loading...
Working...
X