Announcement

Collapse
No announcement yet.

CSS Generation

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

  • CSS Generation

    Please can someone tell me which php file is responsible for generating the css stylesheet in the head tag of each vbulletin page when you 'view source' in IE?
    Code:
    <!-- CSS Stylesheet -->
    <style type="text/css">
    <!--
    /* vBulletin 3 CSS For Style 'Default Style' (styleid: 1) */
    Such as above.

    Many thanks,

    Rob.

  • #2
    The style sheet is built from the information on this page:

    Admin CP -> Styles & Templates -> Style Manager -> Main CSS (in the menu)

    Comment


    • #3
      Thanks Jake,

      I am familiar with 'Main CSS', but I would like to know what file actually compiles the style information from 'Main CSS' into $style[css]. I basically want to add something to the comment:
      Code:
      /* vBulletin 3 CSS For Style 'Default Style' (styleid: 1) */
      Can you tell me where the variable is that outputs this line and all the css information?

      Many thanks,

      Rob.

      Comment


      • #4
        It looks like includes/adminfunctions_template.php:

        Code:
        		if (sizeof($thisitem) > 0)
        		{
        			$cssarray[] = "$itemname\r\n{\r\n" . implode('', $thisitem) . "}\r\n" . $links['normal'] . $links['visited'] . $links['hover'];
        
        			if ($itemname == 'select')
        			{
        				$optioncss = array();
        				if ($optionsize = trim($css["$itemname"]['font']['size']))
        				{
        					$optioncss[] = "\tfont-size: $optionsize;\r\n";
        				}
        				if ($optionfamily = trim($css["$itemname"]['font']['family']))
        				{
        					$optioncss[] = "\tfont-family: $optionfamily;\r\n";
        				}
        				$cssarray[] = "option, optgroup\r\n{\r\n" . implode('', $optioncss) . "}\r\n";
        			}
        		}
        	}
        
        	[color=red]return trim("/* vBulletin 3 CSS For Style '$styletitle' (styleid: $styleid) */\r\n" . implode('', $cssarray) . $extra . "\r\n" . $extra2);[/color]
        }
        
        // ###################### Start rewrite_css_file_url #######################
        function rewrite_css_file_url($url, $delimiter = '')
        {
        	static $iswritable = null;
        	if ($iswritable === null)
        	{
        		$iswritable = is_writable('./clientscript/vbulletin_css/');
        	}

        Comment


        • #5
          Thanks Jake - just what I was looking for!

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X