Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2010, 05:52 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 04-18-2010, 07:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How did you add the stylesheet to the templates? What does your plugin look like that does this?
Reply With Quote
  #3  
Old 04-18-2010, 08:41 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-18-2010, 09:02 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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" />
Reply With Quote
  #5  
Old 04-18-2010, 09:06 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vB Style View Post
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.
Reply With Quote
  #6  
Old 04-18-2010, 09:17 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 04-18-2010, 09:23 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:48 PM.


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.03808 seconds
  • Memory Usage 2,228KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete