Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2014, 10:59 AM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 05-05-2014, 05:05 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to import both the CSS and the webfonts, which means you can't really get this to other users.
Reply With Quote
  #3  
Old 05-05-2014, 06:10 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
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 =/
Reply With Quote
  #4  
Old 05-05-2014, 06:15 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 05-05-2014, 07:18 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
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 =/
Reply With Quote
  #6  
Old 05-05-2014, 07:19 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not use a full URL, instead of a local one?
Reply With Quote
  #7  
Old 05-05-2014, 08:13 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 05-06-2014, 04:59 AM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 =)
Attached Images
File Type: jpg Capture.jpg (93.9 KB, 0 views)
Reply With Quote
Reply


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 04:37 PM.


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.04452 seconds
  • Memory Usage 2,254KB
  • Queries Executed 14 (?)
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_code
  • (2)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
  • (1)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete