Announcement

Collapse
No announcement yet.

FAQ: How to install CMS in Root, Forums in subdirectory (up to 4.1.0 only)

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

  • [Forum] FAQ: How to install CMS in Root, Forums in subdirectory (up to 4.1.0 only)

    *** THIS GUIDE IS ONLY VALID FOR UP TO VERSION 4.1.0 - PLEASE SEE THIS LINK FOR INSTRUCTIONS FROM 4.1.1 ONWARDS ***


    Have you been pulling out your hair trying to figure out how in the world to simply install the vBulletin Suite's CMS or "portal" page as your front page in the root directory (e.g. http://fixxer.com ) and your forums in the forums directory? (e.g. http://fixxer.com/forums/ )

    Well, here's the how to guide, courtesy of me after trying to figure what all the confusing instructions in 48 different places meant. I've just done this clean install on a fresh site and it appears that it works...

    1) Create a "forums" directory off the root (or call it "forum" if you prefer, whatever)
    If you're a novice, the root is the top level of your web site or http://fixxer.com in my case. Using FTP it's /home/fixxeraccount/public_html/ or something similar like:
    /home/fixxeraccount/www/

    but you get the point.

    2) Upload the entire vB 4 suite into that "forums" directory, not into the root, and install into that /forums/ directory. That would be /home/fixxeraccount/public_html/forums/

    NOTE: Install the sample content. You can delete it later but at least you can tell if your install works properly.

    3) Don't read the manual here since it will just confuse you, although what I'm explaining is the same thing written here: http://www.vbulletin.com/docs/html/o...tentmanagement

    What you need to do is create five blank text files called content.php, editor.php, list.php, widget.php and index.php. If your forum directory is called "forums", you can copy the exact text corresponding to each file into that file, e.g. the four lines below content.php will be copied into the content.php file. Then you will upload all those five files into your root directory: /home/fixxeraccount/public_html/

    Note: If you've installed your vb forum into a directory other than one called "forums", just replace "forums" with "forum" or whatever directory you use for each of the five files below.

    Note: If you need to understand what is going on, all these files are telling the browser that the files it needs to run the CMS portion in the back end are really contained in your forums directory so use them... but still output the result in this directory, the root or front page of your web site.

    content.php

    PHP Code:
    <?php
    define
    (VB_RELATIVE_PATH'forums');
    chdir('./' VB_RELATIVE_PATH);
    require(
    'content.php');
    editor.php

    PHP Code:
    <?php
    define
    (VB_RELATIVE_PATH'forums');
    chdir('./' VB_RELATIVE_PATH);
    require(
    'editor.php');
    index.php

    PHP Code:
    <?php
    define
    (VB_RELATIVE_PATH'forums');
    chdir('./' VB_RELATIVE_PATH);
    require(
    'content.php');
    list.php

    PHP Code:
    <?php
    define
    (VB_RELATIVE_PATH'forums');
    chdir('./' VB_RELATIVE_PATH);
    require(
    'list.php');
    widget.php

    PHP Code:
    <?php
    define
    (VB_RELATIVE_PATH'forums');
    chdir('./' VB_RELATIVE_PATH);
    require(
    'widget.php');
    4) In the vbulletin admin cp, go to settings-options-content management
    This is what I have and the site tab URL is the key to keep the CMS in the root. I am only listing the important fields.

    CMS URL: http://fixxer.com
    Default Home Page: 1-Index
    Site Tab URL: <leave this blank>

    5) In the vbulletin admin cp, go to settings-options-site name URL
    I am only listing the important fields.

    Forum URL: http://fixxer.com/forums
    HomePage URL: http://fixxer.com

    6) Get a beer or something harder if you've tried doing this yourself another way first. It's done.

    I don't care about critique or whether part of this is wrong. It's my attempt to help my fellow man here and do what should have been done a long time ago.
    Last edited by Trevor Hannant; Thu 27th Oct '11, 2:08am.
    My law forum, lawyers and legal help site

  • #2
    May I suggest that this post gets stickied please. It is a great tutorial and the official guide on how to do this is painfully bad, it's no wonder people are getting confused. I also see a post on this very subject every time I log on.

    Thanks for taking the time out to do this, I know a lot of people will appreciate it.
    My site: www.sanctuary4gamers.com My Twitter and if you like video games, my podcast (itunes)

    Comment


    • #3
      i have sub domain my forums

      path

      PHP Code:
      /home/userme/forums 
      my root site

      PHP Code:
      /home/userme/www 


      problem

      Comment


      • #4
        Originally posted by i.s.s.w View Post
        i have sub domain my forums

        path

        PHP Code:
        /home/userme/forums 
        my root site

        PHP Code:
        /home/userme/www 


        problem
        I use a subdomain and have been doing it this way since day one.
        ...steven
        www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
        bmwcca.org/forum | m135i.net
        "I tried to clean this up but this thread is beyond redemption." - Steve Machol

        Comment


        • #5
          One other thing you could add is for people to check the cookie settings too - so if you have been running it under forums for a while with a joomla front end there may have been a need to change the cookie path. You would need to ensure its set to just / .
          My site: www.sanctuary4gamers.com My Twitter and if you like video games, my podcast (itunes)

          Comment


          • #6
            nice breakdown, I 2nd the sticky suggestion
            I'm going to subscribe to it either way, I have someone every other week ask me how to do this.

            thanks for putting it together
            -- Web Developer for hire
            ---Online Marketing Tools and Articles

            Comment


            • #7
              This isn't working for me. It says there is an error in index.php on line 2??

              Comment


              • #8
                Originally posted by WeMovie.co.uk View Post
                This isn't working for me. It says there is an error in index.php on line 2??
                This method works perfectly. What is the error? Without it, we can't know what you did wrong. Looking at your site, you have no files there.

                Here is my guess - you didn't follow the "forums" versus "forum" part. In each of those five files you put in the index/root of your site, change the word "forums" to "forum" - for example:

                Code:
                <?php
                define(VB_RELATIVE_PATH, 'forum');
                chdir('./' . VB_RELATIVE_PATH);
                require('content.php');
                See - it says FORUM not FORUMS in this text you put in index.php.
                My law forum, lawyers and legal help site

                Comment


                • #9
                  Ive followed the instructions as they appear in the first post.

                  Here is the error message I receive:


                  Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /MYFORUM/public_html/index.php on line 2

                  Parse error: syntax error, unexpected T_STRING in /MYFORUM/public_html/index.php on line 2

                  Comment


                  • #10
                    1. Can you post the contents of your index.php file?

                    2. What is the path of your forum in you configuration file for vBulletin? I am assuming your forum operates? The error might be the result of incorrect setup in your configuration.php file.
                    My law forum, lawyers and legal help site

                    Comment


                    • #11
                      The index.php file contains the contents of what you included in the first post??
                      Code:
                      <?php
                      define(VB_RELATIVE_PATH, 'forum');
                      chdir('./' . VB_RELATIVE_PATH);
                      require('content.php');
                      The index.php file that is found in my forum's root is:
                      Code:
                      <?php /*======================================================================*\ || #################################################################### || || # vBulletin 4.0.4 Patch Level 1 - Licence Number 1234567890 || # ---------------------------------------------------------------- # || || # Copyright 2000-2010 vBulletin Solutions Inc. All Rights Reserved. || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || #################################################################### || \*======================================================================*/  /**  * If you want to move this file to the root of your website, change this  * line to your vBulletin directory and uncomment it (delete the //).  *  * For example, if vBulletin is installed in '/forum' the line should  * state:  *  *    define('VB_RELATIVE_PATH', 'forum');  *  * Note: You may need to change the cookie path of your vBulletin  * installation to enable your users to log in at the root of your website.  * If you move this file to the root of your website then you should ensure  * the cookie path is set to '/'.  *  * See 'Admin Control Panel  *    ->Cookies and HTTP Header Options  *      ->Path to Save Cookies  */  //define('VB_RELATIVE_PATH', 'forums');   // Do not edit. if (defined('VB_RELATIVE_PATH')) {     chdir('./' . VB_RELATIVE_PATH); }   /**  * You can choose the default script here.  Uncomment the appropriate line  * to set the default script.  Note: Only uncomment one of these, you must  * add // to comment out the script(s) that you DO NOT want to use as your  * default script.  *  * You can choose the default script even if you do not plan to move this  * file to the root of your website.  */  /**  * Use the CMS as the default script:  */  require('content.php');   /**  * Use the forum as the default script:  */  // require('forum.php');   /*======================================================================*\ || #################################################################### || # Downloaded: 14:36, Wed Jul 14th 2010 || # CVS: $RCSfile$ - $Revision: 31201 $ || #################################################################### \*======================================================================*/
                      As far as I know my config.php file is fine. My host did it. The forum is working fine.
                      Last edited by WeMovie.co.uk; Thu 15th Jul '10, 3:26am.

                      Comment


                      • #12
                        Go back and read the instructions, specifically pay attention to part three "Then you will upload all those five files into your root directory"

                        at the moment you don't have any of the files in the root directory. Note it doesn't say forum root directory just directory so if you have:

                        /site/public_html/ and /site/public_html/forum

                        then the files need to go into the first not the second location

                        Comment


                        • #13
                          That's what I did.
                          I've removed them now though because it wasn't working.
                          My forum is located at public_html/forum/
                          I uploaded the 5 php files into public_html/

                          I'm not supposed to delete those files from the forum root before I upload to the root am I? Because I didn't do that.

                          Comment


                          • #14
                            Well they aren't there now.

                            http://www.wemovie.co.uk/

                            Comment


                            • #15
                              As I said in the post above, I removed those php files from my root directory because it wasn't working.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X