vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding CSS automatically (https://vborg.vbsupport.ru/showthread.php?t=201565)

Coders Shack 01-12-2009 10:07 PM

Adding CSS automatically
 
Is there a way to add CSS so its included into the external style sheet (if the board has opted in).

Whats the proper way to add the the boards style sheet when developing a product. (and avoiding manual edits)

Bellardia 01-12-2009 10:19 PM

Plugin
global_start
PHP Code:

$style[css] .= 'Your Style!'

Add the relative link to your style sheet and have them upload it ;)

I supposed I should specify
It will insert it after the global css style, but outside of the <style> tags, so you can specify inline styles by adding more <style> tags followed by your css, or link it to the external css.

I'm not sure of a way to get it into the actual css if they're using an external page ):

Lynne 01-12-2009 10:20 PM

I was just working on something like this today. I used a template hook. I was working on something for my members page, so I used the hook location "member start" to add some css like this:
PHP Code:

$template_hook[memberinfo_css].= 
#fakecss fieldset.fakecss_group { 
    margin-top:6px; 

fieldset.fakecss_group table { 
    margin:6px; 
}'


It goes into the page, not the external.css file though.

Coders Shack 01-13-2009 01:46 AM

Quote:

Originally Posted by Bellardia (Post 1710286)
Plugin
global_start
PHP Code:

$style[css] .= 'Your Style!'

Add the relative link to your style sheet and have them upload it ;)

I supposed I should specify
It will insert it after the global css style, but outside of the <style> tags, so you can specify inline styles by adding more <style> tags followed by your css, or link it to the external css.

I'm not sure of a way to get it into the actual css if they're using an external page ):

thanks :)

--------------- Added [DATE]1231818421[/DATE] at [TIME]1231818421[/TIME] ---------------

Quote:

Originally Posted by Lynne (Post 1710289)
I was just working on something like this today. I used a template hook. I was working on something for my members page, so I used the hook location "member start" to add some css like this:
PHP Code:

$template_hook[memberinfo_css].= 
#fakecss fieldset.fakecss_group { 
    margin-top:6px; 

fieldset.fakecss_group table { 
    margin:6px; 
}'


It goes into the page, not the external.css file though.

interesting


All times are GMT. The time now is 01:33 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.01746 seconds
  • Memory Usage 1,723KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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