Announcement

Collapse
No announcement yet.

table prefix

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

  • table prefix

    im trying to add a few mods to my site and it asks for the table prefix of vbulletin....so what is it?
    HaloArena.com - Halo 3 Forums, Tournaments, Videos

  • #2
    Originally posted by XxBuLLeTz View Post
    im trying to add a few mods to my site and it asks for the table prefix of vbulletin....so what is it?
    Did you set one?

    Check your config.php file for:


    // ****** TABLE PREFIX ******
    // Prefix that your vBulletin tables have in the database.
    $config['Database']['tableprefix'] = 'vb_';

    Your one will tell you your prefix.

    Comment


    • #3
      Originally posted by XxBuLLeTz View Post
      im trying to add a few mods to my site and it asks for the table prefix of vbulletin....so what is it?
      Pretty sloppy coding. The mods should just look in Config.php and get it for themselves.
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment


      • #4
        Originally posted by Wayne Luke View Post
        Pretty sloppy coding. The mods should just look in Config.php and get it for themselves.
        haha...i meant modifications...sorry for the misunderstanding...where is the config file located...i tried looking in the root and it wasnt there.
        HaloArena.com - Halo 3 Forums, Tournaments, Videos

        Comment


        • #5
          Originally posted by JakeS View Post
          Did you set one?

          Check your config.php file for:


          // ****** TABLE PREFIX ******
          // Prefix that your vBulletin tables have in the database.
          $config['Database']['tableprefix'] = 'vb_';

          Your one will tell you your prefix.
          im pretty sure mine is blank, so if i added 1, would anything happen to the forums?
          HaloArena.com - Halo 3 Forums, Tournaments, Videos

          Comment


          • #6
            They would stop working until you added table prefixes to all your tables. There is a file in your install folder called "tableprefix.php" that can do this.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment


            • #7
              Originally posted by Wayne Luke View Post
              They would stop working until you added table prefixes to all your tables. There is a file in your install folder called "tableprefix.php" that can do this.
              i found that file, but where would i change the coding to the prefix i want...for example, vb_
              HaloArena.com - Halo 3 Forums, Tournaments, Videos

              Comment


              • #8
                Change the prefix in the configuration file (Includes/config.php) and then run that tableprefix.php

                Comment


                • #9
                  I have a question for anyone in the know:

                  I currently have a board up and running WITH prefixes but would like to remove them so I can install a modification.

                  Would it be as easy as removing the prefix from the config.php file and manually renaming the tables?

                  Comment


                  • #10
                    About tableprefix.php
                    It is possibly required to have the whole install/ folder online, minus install.php
                    Once uploaded, run install/tableprefix.php

                    Note
                    Although not default in config.php, it is recommended to use a table prefix. This way when other software uses the same table they won't overwrite the vBulletin tables, and during install vBulletin won't overwrite the non-vB ones.

                    Running the script
                    When install.php is still in the folder it will be requested to remove it.
                    If it is not there, you will be asked to login as an admin, for security reasons.

                    Once logged in you will be presented with a screen to tell you the current prefix value from config.php and the importance note that you should not change config.php prior to running this script.

                    The next screen will list all the tables, you can deselect tables, this is in case there are other non-vb tables or if you only need to change one or more.

                    Enter the new value for the table prefix at the top, and browse down where you can select the submit button. Upon submit you will get a screen where you get an overview of your changes. If everything is ok press the Run SQL Query button to confirm and it will start converting the tables from old to new prefix.

                    When it is done without errors, it will list at the footer the next very important step.

                    Old value : x
                    New value : y

                    Here it says to edit the config.php file and change the old prefix to the new prefix. And then you're good to go.

                    Comment


                    • #11
                      So this morning I ran /install/tableprefix.php to rename my tables...

                      Initially they had a prefix of 'sun' and i renamed the prefix to ' ', or I left the second field blank to remove the prefix. I downloaded the config.php and changed the line

                      $config['Database']['tableprefix'] = 'sun';

                      to read

                      $config['Database']['tableprefix'] = '';

                      Well now when I go to view my forum I get nothing, just a blank page . There's nothing in my browser window and when I view the source it's blank too.


                      So I ran /install/tableprefix.php again. The old table prefix is listed as a bar so I'm assumming it knows there's not one. I asked it to rename my tables back to include a prefix of 'sun' and then changed the config.php back to accomodate the prefix.

                      $config['Database']['tableprefix'] = 'sun';

                      Uploaded it and still all I get is a blank page for my vb index as well as my admin control panel.

                      What happened?

                      Comment


                      • #12
                        Did you check the prefix on the database?
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment


                        • #13
                          Code:
                              //    ****** DATABASE NAME ******
                              //    This is the name of the database where your vBulletin will be located.
                              //    This must be created by your webhost.
                          $config['Database']['dbname'] = 'sunshine_sun';
                          
                              //    ****** TABLE PREFIX ******
                              //    Prefix that your vBulletin tables have in the database.
                          $config['Database']['tableprefix'] = 'sun';
                          After running the script I changed

                          $config['Database']['tableprefix'] = 'sun';
                          to
                          $config['Database']['tableprefix'] = '';





                          Should I have also changed

                          $config['Database']['dbname'] = 'sunshine_sun';
                          to
                          $config['Database']['dbname'] = 'sunshine';


                          ?


                          here's how it looks from phpmyadmin

                          Last edited by Bass Cadet; Sun 15 Jul '07, 6:35pm.

                          Comment


                          • #14
                            It's still set to 'sun' in the database.

                            Please see this for all the known causes of blank or 'white' pages:
                            http://www.vbulletin.com/docs/html/blank_pages
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment


                            • #15
                              I got scared and switched the table prefix back after the script didn't work.

                              Apparently the problem was in my config.php file, as the very first character was an ascii block similar to "█"

                              I'm not sure why but when I loaded it into CuteHTML it caught it. I was using notepad before so that could have been it.

                              Anyhow, thanks for the help. I'm not using prefixes anymore and all is well.

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X