vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   CSS select style (https://vborg.vbsupport.ru/showthread.php?t=309497)

KatieG 03-13-2014 09:46 PM

CSS select style
 
Can you select a style via an external css?

tbworld 03-14-2014 02:16 AM

I am not sure exactly what you are trying to do, maybe this will help you clarify your question. :)

A vbulletin style consists of HTML for structure and CSS for visual presentation. You will find them in the ACP (admincp) templates section. Each displayed page on vBulletin might use several templates and several CSS files. The vb style manager allows you to have a different set of HTML templates and CSS files (stored as templates) for each style you create. It uses a hierarchical system so that it knows to use the parent style if you have not altered a particular HTML template or CSS template within your custom style.

That being said, there is no reason you cannot alter areas of your board by overlaying CSS from an external file, this is a common practice. One board that I worked on we replaced all internal CSS (templates) with a single external CSS file, so we could use LESS (a css compiler). It was an interesting project, but the way vbulletin handles their CSS turned out to be a more efficient method.

KatieG 03-14-2014 11:07 AM

Ok thanks for the reply, but how would I call style id: 7 for example, in css file

tbworld 03-14-2014 11:48 AM

Quote:

Originally Posted by KatieG (Post 2487166)
Ok thanks for the reply, but how would I call style id: 7 for example, in css file

Are you asking how to switch to style:7, by not using the select box in the footer? Remember a style is more then CSS, that is what I was trying to explain to you.

KatieG 03-14-2014 12:20 PM

Quote:

Originally Posted by tbworld (Post 2487177)
Are you asking how to switch to style:7, by not using the select box in the footer? Remember a style is more then CSS, that is what I was trying to explain to you.

Yes exactly what I want to do I have the styles done I just want to select them via css script

tbworld 03-14-2014 01:38 PM

To change to a different style when calling a new vbulletin page use a URL query, just append "?styleid=7" where '7' is the ID of your style. Or add a similar link to a menu. There is no method to change the style ID from CSS alone, unless you are just changing the presentation (CSS), not the HTML.

Example:
Code:

/forum.php?styleid=7


All times are GMT. The time now is 10:24 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.00895 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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