From 767c7d293d967a45481e31f09022c13d077eb037 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 23 Jan 2009 10:51:49 +0000 Subject: trac750 Better CSS file organization and linking fore the FB app --- lib/facebookaction.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'lib/facebookaction.php') diff --git a/lib/facebookaction.php b/lib/facebookaction.php index 92130e199..c781b86f4 100644 --- a/lib/facebookaction.php +++ b/lib/facebookaction.php @@ -95,21 +95,35 @@ class FacebookAction extends Action function showStylesheets() { + // Add a timestamp to the file so Facebook cache wont ignore our changes + $ts = filemtime(INSTALLDIR.'/theme/base/css/display.css'); $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', - 'href' => getFacebookBaseCSS())); - + 'href' => theme_path('css/display.css', 'base') . '?ts=' . $ts)); + + $theme = common_config('site', 'theme'); + + $ts = filemtime(INSTALLDIR. '/theme/' . $theme .'/css/display.css'); + + $this->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => theme_path('css/display.css', null) . '?ts=' . $ts)); + + $ts = filemtime(INSTALLDIR.'/theme/base/css/facebookapp.css'); + $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', - 'href' => getFacebookThemeCSS())); + 'href' => theme_path('css/facebookapp.css', 'base') . '?ts=' . $ts)); } function showScripts() { + // Add a timestamp to the file so Facebook cache wont ignore our changes + $ts = filemtime(INSTALLDIR.'/js/facebookapp.js'); + $this->element('script', array('type' => 'text/javascript', - 'src' => getFacebookJS()), - ' '); + 'src' => common_path('js/facebookapp.js') . '?ts=' . $ts)); } /** -- cgit v1.2.3-54-g00ecf