From 64bda5bd6ca58289c3a525a20c2dc27501fb1cf8 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 19 Jan 2009 01:34:25 +0000 Subject: trac750 New CSS files for FB app to allow bettter per-install theming --- lib/facebookaction.php | 6 +++++- lib/facebookutil.php | 14 +++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/facebookaction.php b/lib/facebookaction.php index 0a364851f..fd171c457 100644 --- a/lib/facebookaction.php +++ b/lib/facebookaction.php @@ -37,7 +37,11 @@ class FacebookAction extends Action common_element('link', array('rel' => 'stylesheet', 'type' => 'text/css', - 'href' => getFacebookCSS())); + 'href' => getFacebookBaseCSS())); + + common_element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => getFacebookThemeCSS())); common_element('script', array('type' => 'text/javascript', 'src' => getFacebookJS()), diff --git a/lib/facebookutil.php b/lib/facebookutil.php index 74e594592..0bde68c0f 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -107,14 +107,22 @@ function update_profile_box($facebook, $fbuid, $user, $notice) $facebook->api_client->profile_setFBML(null, $fbuid, $fbml, null, null, $fbml_main); } -function getFacebookCSS() +function getFacebookBaseCSS() { # Add a timestamp to the CSS file so Facebook cache wont ignore our changes - $ts = filemtime(theme_file('facebookapp.css')); - $cssurl = theme_path('facebookapp.css') . "?ts=$ts"; + $ts = filemtime(theme_file('facebookapp_base.css')); + $cssurl = theme_path('facebookapp_base.css') . "?ts=$ts"; return $cssurl; } +function getFacebookThemeCSS() +{ + # Add a timestamp to the CSS file so Facebook cache wont ignore our changes + $ts = filemtime(theme_file('facebookapp_theme.css')); + $cssurl = theme_path('facebookapp_theme.css') . "?ts=$ts"; + return $cssurl; +} + function getFacebookJS() { # Add a timestamp to the FBJS file so Facebook cache wont ignore our changes -- cgit v1.2.3-54-g00ecf