Closed (fixed)
Project:
OG Teampage
Version:
5.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
9 Jul 2007 at 15:19 UTC
Updated:
26 Jul 2007 at 08:48 UTC
I'm getting a blank base_path which is causing the path to the CSS to be //path rather than /path
"//modules/_contrib/og_teampage/og_teampage.css";</style><style type="text/css" media="all">@import
I don't think base_path is needed any more? so I've changed my version to
drupal_add_css(drupal_get_path('module', 'og_teampage').'/og_teampage.css');
Comments
Comment #1
ejort commentedThis issue is also present on my install... I haven't checked the fix though, I might get a chance later tonight.
Comment #2
MartinSfromB commenteddrupal_add_css needs no base_path. Thank you!
Added base_path() while fixing #155196. Images seem to need base_path() but drupal_add_css() doesn't. Am I right?
Comment #3
csc4 commentedSeems so
http://api.drupal.org/api/5/function/drupal_add_css says
$path (optional) The path to the CSS file relative to the base_path(), e.g., /modules/devel/devel.cssand http://api.drupal.org/api/5/function/drupal_get_path says
Returns the path to a system item (module, theme, etc.)- though in my PHP blocks I usually just add a slash at the front to keep the URL internal.I noticed the other day that the user.module uses
$picture = file_create_url($account->picture);http://api.drupal.org/api/5/function/file_create_url so I was wondering if I should be switching to that type of syntax especially with the base_url changes between 4.7 and 5 and 6 and 7 round the corner!
Comment #4
(not verified) commented