aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-07 17:22:40 -0700
committerfriendica <info@friendica.com>2013-07-07 17:22:40 -0700
commit6e880cfd4954c4a044358a823fac4dc9d5467a6b (patch)
treea49473747b8d253e54bfc814ba8f7d6e6044df1d /boot.php
parent8b9f2f8ef766c169e77a34c72118d14beb2b21de (diff)
downloadvolse-hubzilla-6e880cfd4954c4a044358a823fac4dc9d5467a6b.tar.gz
volse-hubzilla-6e880cfd4954c4a044358a823fac4dc9d5467a6b.tar.bz2
volse-hubzilla-6e880cfd4954c4a044358a823fac4dc9d5467a6b.zip
use current channel photo for favicon where applicable - might be browser dependent but seems to work on FF
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index bf99c142e..590410bae 100755
--- a/boot.php
+++ b/boot.php
@@ -699,6 +699,8 @@ class App {
$this->is_mobile = $mobile_detect->isMobile();
$this->is_tablet = $mobile_detect->isTablet();
+ $this->head_set_icon('/images/rhash-32.png');
+
BaseObject::set_app($this);
/**
@@ -899,6 +901,7 @@ class App {
'$local_user' => local_user(),
'$generator' => RED_PLATFORM . ' ' . RED_VERSION,
'$update_interval' => $interval,
+ '$icon' => head_get_icon(),
'$head_css' => head_get_css(),
'$head_js' => head_get_js(),
'$js_strings' => js_strings()
@@ -997,6 +1000,17 @@ class App {
return $this->rdelim[$engine];
}
+ function head_set_icon($icon) {
+ $this->data['pageicon'] = $icon;
+
+ }
+
+ function head_get_icon() {
+ $icon = $this->data['pageicon'];
+ if(! strpos($icon,'://'))
+ $icon = z_root() . $icon;
+ return $icon;
+ }
}
@@ -1569,6 +1583,8 @@ function profile_sidebar($profile, $block = 0) {
return $o;
+ head_set_icon($profile['thumb']);
+
$is_owner = (($profile['uid'] == local_user()) ? true : false);
$profile['picdate'] = urlencode($profile['picdate']);
@@ -2288,3 +2304,18 @@ function construct_page(&$a) {
function appdirpath() {
return dirname(__FILE__);
}
+
+
+function head_set_icon($icon) {
+ global $a;
+ $a->data['pageicon'] = $icon;
+ logger('head_set_icon: ' . $icon);
+}
+
+function head_get_icon() {
+ global $a;
+ $icon = $a->data['pageicon'];
+ if(! strpos($icon,'://'))
+ $icon = z_root() . $icon;
+ return $icon;
+}