forked from GNUsocial/gnu-social
trac750 New CSS files for FB app to allow bettter per-install theming
This commit is contained in:
parent
12f7ec980c
commit
64bda5bd6c
@ -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()),
|
||||
|
@ -107,11 +107,19 @@ 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user