Announcement

Collapse
No announcement yet.

Defind a Template to a custom page

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

  • 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?

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

    Comment


    • #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


      • #4
        bump

        Comment


        • #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


          • #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

            http://www.engineerisaac.com/forums/....php?styleid=2
            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

            http://www.engineerisaac.com/forums/blueent.php

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

            Comment


            • #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


              • #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


                • #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


                  • #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...
                    X