Defind a Template to a custom page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Engineerisaac
    New Member
    • Jan 2009
    • 6

    Defind a Template to a custom page

    I have many communities on one big board. But i want them to all have separated styles and the custom pages and all i would need is to make all the custom pages to adopt the a specific template.

    Is there a PHP call that would define a specific template to a page?
  • dodgeboard.com
    Senior Member
    • Nov 2005
    • 941
    • 4.0.x

    #2
    &styleid=1
    &styleid=2
    &styleid=3

    Comment

    • Engineerisaac
      New Member
      • Jan 2009
      • 6

      #3
      OK but i would need that directionally Scripted into the PHP to force people to that specific style.

      Because i have

      Portal1.php
      Portal2.php
      Portal3.php

      Comment

      • Engineerisaac
        New Member
        • Jan 2009
        • 6

        #4
        bump

        Comment

        • Lynne
          Former vBulletin Support
          • Oct 2004
          • 26255

          #5
          So what defines one community from another? If you have something that separates them, such as a usergroup, then you could create a plugin that assigns styleid 1 to everyone in usergroup 10 and styleid 2 to everyone in usergroup 15, etc. But a plugin like that would only work if there is some variable set to differentiate these users/styles.

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools <- awesome site for html/css help

          Comment

          • Engineerisaac
            New Member
            • Jan 2009
            • 6

            #6
            Well it really isn't the forums that is the problem because the style overrides no matter what. but the problem is in one of my custom pages. I have to define the style with a post variable


            Witch even then dosn't work beacuse it shows with a white page because that custom template isn't defined on the Default template

            I would love it if people went to



            And no matter what previous style they were at before it shoots to style 2 no if and or buts.

            Comment

            • Lynne
              Former vBulletin Support
              • Oct 2004
              • 26255

              #7
              Then it sounds like what you need to do is add your custom template to all your styles. If you are in debug mode, you can add it to the MASTER STYLE and it will be added to all your styles automatically.

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools <- awesome site for html/css help

              Comment

              • Engineerisaac
                New Member
                • Jan 2009
                • 6

                #8
                Yes but, The templates are different for each style. its basically the homepage fore each site. So that specific theme HAS to be shown No matter what.

                Is there a way to call for a specific Them using php in the custom page maybe like:

                PHP Code:
                $styleid 2
                ?

                Comment

                • Lynne
                  Former vBulletin Support
                  • Oct 2004
                  • 26255

                  #9
                  Yes, you can call it with the styleid (as mentioned in post 2).

                  Please don't PM or VM me for support - I only help out in the threads.
                  vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                  Want help modifying your vbulletin forum? Head on over to vbulletin.org
                  If I post CSS and you don't know where it goes, throw it into the additional.css template.

                  W3Schools <- awesome site for html/css help

                  Comment

                  • Engineerisaac
                    New Member
                    • Jan 2009
                    • 6

                    #10
                    ok Well it didnt work that way. but i did figure out how to make it work for the custom pages. Beacuse my forum isnt really setup like most. it may be confuseing for some but here is how i got it to work.

                    Global.php
                    PHP Code:
                    // #############################################################################
                    // ######################## START TEMPLATES & STYLES ###########################
                    // #############################################################################

                    $userselect false;

                    // is style in the forum/thread set?
                    if ($codestyleid)
                    {
                        
                    // style specified by forum
                        
                    $styleid $codestyleid;
                        
                    $vbulletin->userinfo['styleid'] = $styleid;
                        
                    $userselect true;
                    }
                    else if (
                    $vbulletin->userinfo['styleid'] > AND ($vbulletin->options['allowchangestyles'] == OR ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])))
                    {
                        
                    // style specified in user profile
                        
                    $styleid $vbulletin->userinfo['styleid'];
                    }
                    else
                    {
                        
                    // no style specified - use default
                        //$styleid = $vbulletin->options['styleid'];
                        //$vbulletin->userinfo['styleid'] = $styleid;
                        
                    $styleid $stylex;
                    }

                    // ############################################################################# 
                    and then on the custom page

                    PHP Code:
                    $stylex 2
                    But im sure this is the totally incorrect way to do it mainstream. but it works for my instance.

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...
                    😀
                    😂
                    🥰
                    😘
                    🤢
                    😎
                    😞
                    😡
                    👍
                    👎