VB 4.1.7 Custom style ignored

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khalid
    Member
    • May 2001
    • 92

    [Forum] VB 4.1.7 Custom style ignored

    I have upgraded my forum from VB3.8.4 to VB4.1.7. I created a main style which I put as a default in vb setting. I created another child style of the default style and then I set the child style as custom style for one of the forums.
    The problem is that this forum with custom style do not reflect the custom style, instead, it just take the default style.
    Is there anything I am missing?

    I switched the option of users to chose a style on and off and nothing has changed.

    Any help please.
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    You need to have the option for users to be able to select styles ON. And, you need to put a checkmark next to both the default style and child style in the Style Manager. Now see if you can see the child style.

    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

    • khalid
      Member
      • May 2001
      • 92

      #3
      Thanks Lynne.
      I did exactly what you suggested but nothing has changed. Still I can not sett the custom style in that particular forum that I have set.

      Even if it works, I don't think this is right. I should be able to assign a default style to my forums and specific styles to some of the forums without giving the member the ability to change. This what I am currently doing in Vb 3.8.4.

      Any idea how to fix this issue.

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        You haven't posted a site url, but I just went to your publishing suite site and I do not see the style chooser on the bottom of the page which would allow users to change styles.

        You may be running into this bug (if you aren't allowing users to change styles) http://tracker.vbulletin.com/browse/VBIV-9273

        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

        • khalid
          Member
          • May 2001
          • 92

          #5
          Lynne, Please check your private message.

          I guess I have the issue in the bug you mentioned, but still the issue is not resolved after enabling the user to chose the style.

          Comment

          • khalid
            Member
            • May 2001
            • 92

            #6
            Do not worry about it, after looking at the code I found out the issue. The problem is in the file class_bootstrap.php
            Around line 1583, this is the code:

            Code:
                    if ($vbulletin->userinfo['styleid'] != $vbulletin->options['mobilestyleid_advanced']
                        AND $vbulletin->userinfo['styleid'] != $vbulletin->options['mobilestyleid_basic'])
                    {
                        $this->force_styleid = $codestyleid;
                    }
            If the user has not chosen a style (which is the case for most visitors) then his $vbulletin->userinfo['styleid'] will be 0.
            And for a newly upgraded forum from 3.8.4 to 4.1.7, there is no mobile style yet and as such the value of $vbulletin->options['mobilestyleid_advanced'] and basic will be 0.

            Since they both equal, the newly set style by the forum setting will not take effect. I changed the code to the following and worked fine:

            Code:
                    if (($vbulletin->userinfo['styleid'] != $vbulletin->options['mobilestyleid_advanced'] 
                        OR $vbulletin->options['mobilestyleid_advanced'] == 0) 
                        AND ($vbulletin->userinfo['styleid'] != $vbulletin->options['mobilestyleid_basic'] 
                        OR $vbulletin->options['mobilestyleid_basic'] ==0 ))
                    {
                        $this->force_styleid = $codestyleid;
                    }

            Comment

            Related Topics

            Collapse

            • SiFor
              Custom Style for Channel
              by SiFor
              I have multiple styles on a site that has child styles of one parent style, my child styles just have small changes from the parent like the logo and some colours, the issue I have is when a new topic...
              Sun 29 Sep '13, 7:32pm
            • StephenKay
              Duplicating a style?
              by StephenKay
              So I've been working on a new installation of vB 5.3.3, and I started with the Default Style. I've modified a bunch of things with css_additional.css. I started looking at style vars, and that made me...
              Mon 20 Nov '17, 2:45pm
            Working...