Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 09-29-2005, 09:01 PM
Spleasure's Avatar
Spleasure Spleasure is offline
 
Join Date: Jun 2002
Location: Enschede, the Netherlands
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-21-2006, 05:46 PM
XTF XTF is offline
 
Join Date: Sep 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to know this too.
Anyone?

I'm also wondering why the main CSS is inline and not in an external file.
Reply With Quote
  #3  
Old 02-22-2006, 04:40 AM
Spleasure's Avatar
Spleasure Spleasure is offline
 
Join Date: Jun 2002
Location: Enschede, the Netherlands
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 02-22-2006, 06:06 AM
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: Apr 2005
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 02-22-2006, 06:11 AM
XTF XTF is offline
 
Join Date: Sep 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 03-14-2006, 08:18 AM
sinaluna sinaluna is offline
 
Join Date: Feb 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump.

Figured out a good way to do this and used it in my new modification https://vborg.vbsupport.ru/showthread.php?t=110401
Reply With Quote
  #7  
Old 02-04-2007, 08:01 AM
Spleasure's Avatar
Spleasure Spleasure is offline
 
Join Date: Jun 2002
Location: Enschede, the Netherlands
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sinaluna View Post
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?
Reply With Quote
  #8  
Old 02-04-2007, 12:05 PM
RedTyger's Avatar
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Location: UK
Posts: 1,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:13 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04020 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_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