Announcement

Collapse
No announcement yet.

Database trouble!! PLEASE HELP!!

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

  • Database trouble!! PLEASE HELP!!

    I wrote a script in the postbit_legacy template to show ban buttons above users avatars in posts. This worked fine except the ban group was id:8 and another group i have is id:9. This meant that every user who's primary group was id:9, didn't have a ban button. I went to PHPMyAdmin, and simply made the banned group id:9 and the other group id:8.

    Now my script could simply look for groups with an id below 9 and put a ban button, and any users in the group id:9 had an unban button. Ok, should have worked. Just a few things like changing the id to use the banned avatar on (more template work).

    I fixed all that, but then i started getting random users saying they were banned. I looked at the user table. Of course. Half of them had their primary group to 9. Simply changed all 9s to 8s and vice versa. Now something weird has happened.

    I have 16 members, but member list shows 7.
    Also a lot of members are banned, or have lost their avatar. Any suggestions? I could use some help lol..

  • #2
    You should NOT change the usergroup ids!!! The Registered Usergroup, id 8, is a hard coded usergroup in the code. All new users go to that usergroup - id 8. Since you switched the ids, all your new users are going to the Banned usergroup.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      Well before you even replied, i turned everything back to how it was, everything works fine. But i should tell you, user id 8 is not the default group, it is the banned group. users go into the registered users when they join.

      Comment


      • #4
        Originally posted by Ninjadude101 View Post
        Well before you even replied, i turned everything back to how it was, everything works fine. But i should tell you, user id 8 is not the default group, it is the banned group. users go into the registered users when they join.
        I didn't go look up the ids, I just made the assumption that that's what you did. Sorry. But, the Banned group may also be hardcoded, and possibly the admin/moderators groups also (in fact, maybe all the original groups). It's just never a good idea to go into the database and change things unless you are absolutely certain that it won't mess anything else up.

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools <- awesome site for html/css help

        Comment


        • #5
          Well it definitely won't happen again

          Comment

          Loading...
          Working...
          X