Announcement

Collapse
No announcement yet.

How to create a GENERIC_SHELL template for vBulletin 5?

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

  • [vB5] How to create a GENERIC_SHELL template for vBulletin 5?

    Hi,

    we are going to upgrade to vBulletin 5.x but is missing the "GENERIC_SHELL" template that was available in vBulletin 4. Any idéa how we could create one for vBulletin 5?

    Thanks!

  • #2
    vBulletin 5 uses a completely different code and template structure to vBulletin 4.

    This would require custom coding, which we are unable to provide support for.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.4.2 Demo - FEATURING "ROUTE BY NODE"!
    AdminAmmo - My Cloud Demo

    Comment


    • #3
      Thanks for quick reply Mark. I will try to get answers on the vBulletin.org site. I think we cannot upgrade to version 5.x until we can use this feature due to a custom photo album that uses it.

      Comment


      • #4
        May be worth asking on Glenn Vergara 's site also: https://vbmods.rocks
        MARK.B | vBULLETIN SUPPORT

        TalkNewsUK - My vBulletin 5.4.2 Demo - FEATURING "ROUTE BY NODE"!
        AdminAmmo - My Cloud Demo

        Comment


        • #5
          You can create a new page in vB5 using Sitebuilder. You can drag and drop any modules you need such as PHP module, Ad module, etc. You can also call an existing or custom template from PHP module and Ad module.

          PHP Module:
          PHP Code:
          $template = new vB5_Template('mytemplate');
          $template->register('name','vBMods.rocks');
          echo 
          $template->render(); 

          Ad Module:
          Code:
          {vb:template mytemplate, name='vBMods.rocks'}
          Note: Due to vBCloud, the ad code is enclosed in <vb:literal></vb:literal> tags causing it to display as raw text. In self-hosted version, you can edit the ad template to remove the literal tags. The ad template is named based on widget instance id of the Ad module you added on the page. The format is ad_XXXX where XXXX is the widget instance id. You can find it by inspecting the module in the browser dev tools.

          In 'mytemplate' template:
          Code:
          Hello <strong>{vb:raw name}</strong>!
          Output:
          Hello vBMods.rocks!

          AutoLinker-vB5+vBCloud | Topic Starter Ribbon | Blur Replies for Guests | NavMenu Dropdown-vB5+vBCloud | TimedSticky | Events Module | Moderator List | Drag/Drop Upload

          Comment


          • #6
            Thanks for the reply Glenn Vergara ! Unfortunately i did not explain the whole issue but maybe you can help out more?

            We have been using the GENERIC_SHELL template from vBulletin 4 with an custom built PHP photo album. So the GENERIC_SHELL template was used to add CSS, header, navbar and footer to the custom built PHP scripts. We also included the old global.php for login handling in the photo album.

            We loaded the global.php file to grab $vbulletin->userinfo['userid'] & $vbulletin->userinfo['username'] and then constructed $navbits & $navbar and generated the custom page with the following code.

            $template = "GENERIC_SHELL";
            $templater = vB_Template::create($template);
            $templater->register_page_templates();
            $templater->register('navbar', $navbar);
            $templater->register('pagetitle', $pagetitle);
            $templater->register('HTML', $content);
            print_output($templater->render());

            It have been working really nice, but now when the new vBulletin is rebuilt it doesnt work anymore. I understand that vBulletin cannot support custom made PHP code but it would be rather nice to know how to make a custom built PHP scripts that uses the vBulletin framwork to enable CSS, header, navbar and footer.

            Any ideas?

            Comment


            • #7
              What's the value of the $content variable?

              In vB5, you can create via Sitebuilder a new page that has the same header, navbar and footer. You don't have to code for it. You can so choose what layout (full, 70-30, 30-70, 33-33-33) to use. For the actual content, all you have to do is drag and drop modules onto the page. So I was thinking whatever value you have for the $content variable, you'll add the code in a PHP Module. In a PHP Module, you can do anything. You can call a template, call an APi, access the database directly, etc.

              AutoLinker-vB5+vBCloud | Topic Starter Ribbon | Blur Replies for Guests | NavMenu Dropdown-vB5+vBCloud | TimedSticky | Events Module | Moderator List | Drag/Drop Upload

              Comment


              • #8
                The Generic Shell was used to create custom pages in vBulletin 4. To do this in vBulletin 5, go to the main page, turn on site builder, and click "Add Page."

                Put your content in a Static HTML or PHP Module.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                vBulletin 5 Documentation - Updated every Friday. Report issues here.
                vBulletin 5 API - Full / Mobile
                I am not currently available for vB Messenger Chats.

                Comment

                Working...
                X