vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   adding stylesheets globaly to admincp (https://vborg.vbsupport.ru/showthread.php?t=311057)

Dr.CustUmz 05-05-2014 10:59 AM

adding stylesheets globaly to admincp
 
this is in regards to my addon font awesome

I'm trying to add the stylesheet to the admincp so i can use that font inside (like in my options)

I have tried adding:
Code:

@import url('../../font-awesome/css/font-awesome.min.css');
to the beginning of my control panels css file (controlpanel.css)

and I have tried adding:
Code:

<link rel=\"stylesheet\" type=\"text/css\" href=\"../font-awesome/css/font-awesome.min.css\" />
inside of includes/adminfunctions.php along with a few other files, including admincp/options.php

although i cant seem to get the icons to show up if i use them in my product xml for example
Code:

<phrase name="setting_drc_rb_gst_msg_title" date="" username="DrCustUmz" version="1"><![CDATA[<i class="fa-li fa fa-check-square"></i> Welcome Message]]></phrase>
not exactly how i want to use it but something like that.

i want to be able to use the icons in my product files, then say the product has options, in the settings i could use the icons anywhere.

or anywhere else in the admincp for that matter

Zachery 05-05-2014 05:05 PM

You have to import both the CSS and the webfonts, which means you can't really get this to other users.

Dr.CustUmz 05-05-2014 06:10 PM

Quote:

Originally Posted by Zachery (Post 2496310)
You have to import both the CSS and the webfonts, which means you can't really get this to other users.

this is just something im doing to mess around with my admincp, and the fact that i cant figure it out only makes me want it that much more lol.

im thinking if i add the code to the php file that includes the tables on the left side of the admincp it would work... but i dug in them files looking for <table for a while and couldn't find what i was looking for.

and when i do add it to adminfunctions.php file and view the source, it does load in the source... just icons wont show up in my options =/

Zachery 05-05-2014 06:15 PM

You'd want to add the code fromt font-awesome.min.css into the global.css file for the AdminCP style.

Update the code in the CSS to point to either local or remote font files.

Dr.CustUmz 05-05-2014 07:18 PM

Quote:

Originally Posted by Zachery (Post 2496318)
You'd want to add the code fromt font-awesome.min.css into the global.css file for the AdminCP style.

Update the code in the CSS to point to either local or remote font files.

you mean the "controlpanel.css" file inside cpstyle/mystyle/

that was the first thing i did:
@import url('../../font-awesome/css/font-awesome.min.css');

to the very beginning, it loads if i view the source but im unable to add the font (icons) in my options =/

Zachery 05-05-2014 07:19 PM

Why not use a full URL, instead of a local one?

Dr.CustUmz 05-05-2014 08:13 PM

ill give it a shot and let ya know =)

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

Update* nope no luck with
Code:

@import url('http://fortawesome.github.io//font-awesome/css/font-awesome.min.css');
nor
@import url('http://dirtrif.com/font-awesome/css/font-awesome.min.css');

inside of controlpanel.css

really seems like this should be working -_- wtf vB lol

Dr.CustUmz 05-06-2014 04:59 AM

1 Attachment(s)
UPDATE* got it working =)
added stylesheet link to the copyright phrase at the bottom of every page in the admincp =)


now time to start having some fun with it =)

notice the checkmark icons CP Home, next to the copyright, and in my options woot woot =)


All times are GMT. The time now is 01:18 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.01033 seconds
  • Memory Usage 1,731KB
  • 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_code_printable
  • (2)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