]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/theme.php
better styling for favor/disfavor buttons
[quix0rs-gnu-social.git] / lib / theme.php
index d1e82596edc28fa6079c35109e7c5ca5a116345f..80982aa82b0d59f7742fd2d128dceccbbb60881b 100644 (file)
 if (!defined('LACONICA')) { exit(1); }
 
 function theme_file($relative) {
-       global $config;
-       return INSTALLDIR.'/theme/'.$config['site']['theme'].'/'.$relative;
+       $theme = common_config('site', 'theme');
+       return INSTALLDIR.'/theme/'.$theme.'/'.$relative;
 }
 
 function theme_path($relative) {
-       global $config;
-       return common_path('theme/'.$config['site']['theme'].'/'.$relative);
+       $theme = common_config('site', 'theme');
+       $server = common_config('theme', 'server');
+       if ($server) {
+               return 'http://'.$server.'/'.$theme.'/'.$relative;
+       } else {
+               return common_path('theme/'.$theme.'/'.$relative);
+       }
 }
\ No newline at end of file