Chia sẻ Tách riêng cms và forum riêng rất hay

Thảo luận trong 'Thủ thuật khác' bắt đầu bởi quangtrung3108, 31/7/14.

  1. quangtrung3108 PageRank 1 Member

    Tham gia ngày:
    30/6/14
    Đây là một lỗi mà mình hoài mới khắc phục được. Đây là thủ thuật tách cms và forum riêng biệt không nằm trong 1 thư mục. Mà nhiều bạn vẫn thường xuy nghĩ là dùng htaccess. Cái này mình tìm được nên muốn chia sẻ, nếu ai đã biết thì đừng ném đá nhé. Mình đã làm thành công tại http://webdanong.net

    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://www.site.com ) and your forums in the forums directory? (e.g. http://www.site.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://www.site.com in this example case. Using FTP it's /home/sitename/public_html/ or something similar like:

    /home/sitename/www/

    but you get the point.

    2) Upload the entire vB4 Suite into that "forums" directory, not into the root, and install into that /forums/ directory. That would be /home/sitename/public_html/forums/

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

    3) The manual entry here explains the same thing although hopefully this will make it a little clearer for you:



    What you need to do is create five blank text files called:

    - content.php
    - editor.php
    - list.php
    - widget.php
    - 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 the red "forums" text with "forum" or whatever directory you use for each of the five files below.

    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

    Mã:
    define(VB_RELATIVE_PATH, 'forums');chdir('./' . VB_RELATIVE_PATH);
    require('content.php');
    editor.php
    Mã:
    define(VB_RELATIVE_PATH, 'forums');chdir('./' . VB_RELATIVE_PATH);
    require('editor.php');

    index.php
    Mã:
    define(VB_RELATIVE_PATH, 'forums');chdir('./' . VB_RELATIVE_PATH);
    require('content.php');

    list.php
    Mã:
    define(VB_RELATIVE_PATH, 'forums');chdir('./' . VB_RELATIVE_PATH);
    require('list.php');
    widget.php
    Mã:
    define(VB_RELATIVE_PATH, 'forums');chdir('./' . VB_RELATIVE_PATH);
    require('widget.php');
    4) In the vBulletin AdminCP, go to Settings > Options > Content Management

    This is how I've set this up - the site tab URL is the key to keep the CMS in the root. I am only listing the important fields:

    CMS URL:http://www.site.comDefault Home Page: 1-Index
    Site Tab URL: <leave this blank>

    5) In the vBulletin AdminCP, go to Settings > Options > Site Name / URL / Contact Details

    Again, I am only listing the important fields:

    Forum URL:site.com/forums HomePage URL:site.com

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

    Nguồn: vbulletin.com/vbcms/content.php/295-FAQ-How-to-install-CMS-in-Root-Forums-in-subdirectory

    P/S: một lần nữa xin cảm ơn Admin diễn đàn đã hỗ trợ nhiệt tình. Chúc diễn đàn ngày càng phát triển
     
    #1

Chia sẻ trang này