Announcement

Collapse
No announcement yet.

Defind a Template to a custom page

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

  • Engineerisaac
    replied
    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.

    Leave a comment:


  • Lynne
    replied
    Yes, you can call it with the styleid (as mentioned in post 2).

    Leave a comment:


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

    Leave a comment:


  • Lynne
    replied
    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.

    Leave a comment:


  • Engineerisaac
    replied
    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.

    Leave a comment:


  • Lynne
    replied
    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.

    Leave a comment:


  • Engineerisaac
    replied
    bump

    Leave a comment:


  • Engineerisaac
    replied
    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

    Leave a comment:


  • dodgeboard.com
    replied
    &styleid=1
    &styleid=2
    &styleid=3

    Leave a comment:


  • Engineerisaac
    started a topic Defind a Template to a custom page

    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?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X