vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Problems with custom CSS files... (https://vborg.vbsupport.ru/showthread.php?t=240747)

Jaxel 04-18-2010 05:52 PM

Problems with custom CSS files...
 
Okay, so I made a new template called "media.css" and it was correctly placed into the CSS Templates folder.

I then added this stylesheet to the rest of my templates in my mod with the following code:
Code:

<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}media.css" />

With the default settings, this works GREAT. However, if I enable the "Store CSS Stylesheets as Files?" it stops working. The rest of my forum works great, but even though the media.css file is correctly being made in my clientscript/vbulletin_css folder, none of the style settings in the file are being implemented.

Lynne 04-18-2010 07:50 PM

How did you add the stylesheet to the templates? What does your plugin look like that does this?

Jaxel 04-18-2010 08:41 PM

Plugin? I didn't use a plugin... I just made the css template and added it to my page shell... the line of code is in red.

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
        {vb:raw headinclude}
        <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
        <link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}media.css,showthread.css" />
        {vb:raw headinclude_bottom}
        <link rel="alternate" type="application/rss+xml" title="{vb:var vboptions.bbtitle} {vb:phrase rss_feed} - {vb:phrase media_library}" href="media.php?do=rss" />
</head>
<body>
        {vb:raw header}
        {vb:raw navbar}

        <div id="pagetitle">
                <h1>{vb:raw pagetitle}</h1>
                <p class="description">{vb:raw description}</p>
        </div>
        <br />
        {vb:raw mediaHTML}

        {vb:phrase media_copyright}

        {vb:raw footer}
</body>
</html>


Like I said, this works fine, as long as stylesheets aren't saved as files.

ForumsMods 04-18-2010 09:02 PM

You must use cssrollup_xxx.xml to be able to use multiple not default css as files. With:
Code:

<rollup name="xxx-rollup.css">
        <template>media.css</template>
        <template>showthread.css</template>
</rollup>

--------------- Added 18 Apr 2010 at 19:03 ---------------

Or, easier, separate css:
HTML Code:

<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}media.css" />
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}showthread.css" />


Jaxel 04-18-2010 09:06 PM

Quote:

Originally Posted by vB Style (Post 2023422)
You must use cssrollup_xxx.xml to be able to use multiple not default css as files.

Uhh... why? Like I said this works fine, as long as I'm not doing CSS as files. Both css get called up fine. The moment I switch to CSS as files, they stop working.

I also see other places in the official vbulletin stuff using the same type of code.

Lynne 04-18-2010 09:17 PM

Take a look at the headinclude template and you'll find the condition you need to use for your css checking to see if it is stored in the filesystem or not.

ForumsMods 04-18-2010 09:23 PM

Quote:

Originally Posted by Jaxel (Post 2023426)
Uhh... why? Like I said this works fine, as long as I'm not doing CSS as files. Both css get called up fine. The moment I switch to CSS as files, they stop working.

I also see other places in the official vbulletin stuff using the same type of code.

You can see that all official vbulletin multiple css are listed in ./includes/xml/cssrollup_vbulletin.xml


All times are GMT. The time now is 08:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01042 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete