Announcement

Collapse
No announcement yet.

vB5 How To: Create a custom home page

Collapse
X
Collapse
  •  

  • vB5 How To: Create a custom home page

    Many vBulletin sites have historically used some sort of portal, or even the vB4 CMS, as their default "landing" page if you visit the root URL....www.mysite.com, with no /forum etc.

    Currently in vB5 there is no CMS, and there is no portal addon such as vBAdvanced.

    So what do you do?

    Well, you could simply rewrite the root URL so it points to /forum, or wherever your forum actually is.

    That's fine, but why not utilise the great new Site Builder feature in vBulletin 5 Connect, to create a custom home page and have people landing there?

    Here's how to do this.

    Firstly, make sure you are logged in as an Admin - so you can access Site Builder.

    Then, switch Site Builder ON using the switch at the very top right of the screen.


    Now click "New Page" in the Site Builder Menu at the top.


    You may need to enter your Admin Password to go any further:


    Now, we should see the screen below.
    We need to start off by making sure that any Announcements we add to the forum, will display on our new page.
    So let's drag the Announcement module into the top block on the new page (you can see the blocks outlined in dotted lines).


    Having done this, we can now add something into the main block on the page.
    Let's keep things straightforward for now and put an Activity Stream in there.
    Drag the Activity Stream module into the main block, as below.


    You can now configure your Activity Stream in the normal way by clicking on the Pencil icon.


    Now to complete our page, let's insert a Who's Online block over on the right hand side.


    We're almost done!
    Now, let's save our page.
    Click "Save New Page" at the top.


    In the "Save Page" box that appears, fill in the following fields:
    Save the page name: Home Page
    (This will be the name of the page that will display as its title)

    Save the page URL based on the page name: home
    (This will be the URL that you will use to access the page)

    Template Option: home
    (This will be the name of the template used to render the page)

    Then click the green "OK" button.


    You should now be able to test your new page by going to www.yoursite.com/forum/home

    Now that we've created the page, we need to make the root domain redirect to this page, and to do this we needto edit the.htaccess file in the root folder for your site.

    It is important to make sure you EDIT the existing .htaccess file, rather than creating a new one, otherwise you will break some of vB5's core functionality and your site will not work!

    The following code is based on your forum being in the folder structure www.yoursite.com/forum and your new homepage is at www.yoursite.com/forum/home. If you have different settings, please amend
    this code accordingly. If you're not sure how, post in the vB5 support forum for assistance.
    NOTE: Take a copy of your existing .htaccess file FIRST so you can restore it if anything goes wrong!

    Add this code underneath whatever is already in your .htaccess file.
    You will also need to replace www.yoursite.com and yoursite with your site's root url.

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^yoursite\.com$
    RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]
    RewriteRule ^$ forum/home [L]
    Once you have saved and uploaded your edited .htaccess file, try visiting your root URL (www.yoursite.com) and you should be redirected to your new home page!

    If you are happy with your page, you might want to add a tab for it into your navbar.
    Click HERE for instructions.
    Last edited by Mark.B; Wed 26th Jul '17, 11:14am.

    • grom815
      #5
      grom815 commented
      Editing a comment
      This doesn't work...
      Where are you supposed to add the code? To the very bottom (after )?
      I don't have forum/home, so I just used ' RewriteRule ^$ home [L] '
      There is a ' RewriteEngine on ' command earlier in the file. Do we need to add it again?

    • luism
      #6
      luism commented
      Editing a comment
      Mark
      Where are the images to your article? in
      http://www.vbulletin.com/forum/artic...stom-home-page

      ​thanks!

    • Phillip Morrow
      #7
      Phillip Morrow commented
      Editing a comment
      I would like to know how to access the .htaccess files
    Posting comments is disabled.

About the Author

Collapse

Mark.B Find out more about Mark.B

Article Tags

Collapse

advanced (5) android (2) api (29) array (17) attachment options (1) beginner (17) blog (4) calendar (2) center (1) cms (2) forum (3) forums (4) Intermediate (7) iphone (3) mapi (30) methods (10) mobile (34) post (1) security (2) ssl (1) style (2) threads (4) tutorial (1) vb5howto (5) vBulletin (5)

Latest Articles

Collapse

  • The Basic Anatomy of a vBulletin Page
    by Wayne Luke
    vBulletin 5's user output is created using a system of pages that are customizable by the site administrator. This system is called Site Builder. By breaking the system down into pages, a lot of control is given to the system administrator. By using Site Builder, you can create a unique site without any knowledge of HTML or CSS.

    vBulletin's pages are created using layers built upon a grid layout. Each page starts with a layout which defines the content areas of the page. Layouts define...
    Mon 11th Sep '17, 8:55am
  • Enabling Push Notifications in vBulletin 5.3.2 and Mobile Suite 1.16
    by Wayne Luke
    vBulletin Mobile Suite 1.16 includes functionality for Push Notifications. One of the requirements to add this functionality is that you must be running vBulletin 5.3.2 Connect on your site and create a project with Google's Firebase Cloud Messaging (FCM) platform. The steps below will walk you through the process of enabling this functionality in vBulletin and in your Mobile Apps.

    Add a project to your Firebase account








    ...
    Thu 27th Jul '17, 8:56am
  • Enabling Two-Factor Authentication
    by Wayne Luke
    vBulletin 5.3.0 and higher will allow site owners to enable Two-Factor Authentication for Administrator and Moderator functionality. This is an extra layer of security provided to make sure your user data remains as safe as possible. Two-Factor Authentication works in conjunction with an app on the user's smartphone, tablet, or computer. These apps provide a security token that lasts a limited time before expiring. The security token is created using industry standard algorithms and a unique string...
    Tue 4th Apr '17, 8:38am
  • How to moderate the posts of new users only
    by Wayne Luke
    To help combat spam, many users opt to have new user’s posts moderated until they’ve made a specific number of posts. This allows the Admin/Moderator team to keep potentially malicious posts out of the public eye until a user has effectively passed a ‘probationary period’ as a member of the site.

    In order to do this, you will need to create a custom usergroup and a promotion.

    Creating a Custom Usergroup
    First, you need to setup the usergroup for your non-Moderated...
    Wed 22nd Feb '17, 9:13am
  • Rebuilding the Sphinx index
    by Wayne Luke
    From time to time, we will need to update the indexing schema for the Sphinx server. In order for this fix to take effect, you will need to update the sphinx schema for the index. Follow these steps to rebuild your Sphinx Search Schema.
    1. Stop the Sphinx service on your server.
    2. Replace your existing Sphinx configuration file (vbulletin-sphinx.php) with the one provided in the current version of vBulletin 5 Connect. You can find this file in the do_not_upload directory.
    3. Update the file as provided
    ...
    Fri 3rd Feb '17, 1:01pm
  • Using the Search JSON
    by Dominic
    Using the advanced editor you can create powerful search modules. Following you find possible filters / parameters for using within these modules:
    The search JSON parameter has the following format:

    :
    { "filter": <value>, "filter": <value>, ... }
    <value> may be any valid string, number or JSON structure and will be interpreted by the specified filter. Filters not listed below are ignored.

    Filters

    The valid filters...
    Wed 28th Jan '15, 12:51pm
Working...
X