vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Best way of adding custom CSS as part of a plugin (https://vborg.vbsupport.ru/showthread.php?t=97171)

Spleasure 09-29-2005 09:01 PM

Best way of adding custom CSS as part of a plugin
 
I am working on a plugin, and I like the new product/plugin system very much. I just need to add a couple of custom style definitions to the main CSS file, but I wonder how that can be done in the best way. I could just add it to EXTRA or EXTRA2, but then uninstall becomes difficult. Another option is to put it in a template, and load it with misc.php?do=page&template=nameoftemplate, which I also use for my javascript file. Is there an option which I have overlooked?

[edit]
The last option does not work, because FireFox doesn't like CSS files with Content-type: text/html.

XTF 02-21-2006 05:46 PM

I would like to know this too.
Anyone?

I'm also wondering why the main CSS is inline and not in an external file.

Spleasure 02-22-2006 04:40 AM

Quote:

Originally Posted by XTF
I would like to know this too.
Anyone?

I'm also wondering why the main CSS is inline and not in an external file.

That's an option. Make clientscript/vbulletin_css/ writable , enable the setting in the options menu and vBulletin will write the CSS to that directory.

Luggruff 02-22-2006 06:06 AM

is this a plugin that will enable adding new css selector fields in the style manager? Like this?

Quote:

Originally Posted by Spleasure
That's an option. Make clientscript/vbulletin_css/ writable , enable the setting in the options menu and vBulletin will write the CSS to that directory.

how to make it writeable?

XTF 02-22-2006 06:11 AM

Quote:

Originally Posted by Luggruff
is this a plugin that will enable adding new css selector fields in the style manager? Like this?



how to make it writeable?

No, my plugin won't add new fields to the Admin CP CSS editor.

chmod 777 should make it writable.

sinaluna 03-14-2006 08:18 AM

bump.

Figured out a good way to do this and used it in my new modification https://vborg.vbsupport.ru/showthread.php?t=110401

Spleasure 02-04-2007 08:01 AM

Quote:

Originally Posted by sinaluna (Post 924703)
bump.

Figured out a good way to do this and used it in my new modification https://vborg.vbsupport.ru/showthread.php?t=110401

I might be mistaking, but does your method cause that your CSS is added to the CSS file which is cached in clientscript/vbulletin_css?

RedTyger 02-04-2007 12:05 PM

I'd just use inline CSS personally, or add it to the headinclude template. Not allowing proper CSS addition via plugins is a pretty chronic oversight in my eyes on Jelsoft's part.


All times are GMT. The time now is 07:06 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.00984 seconds
  • Memory Usage 1,724KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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