]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Init showLogo
authorSarven Capadisli <csarven@status.net>
Sun, 4 Oct 2009 21:37:05 +0000 (21:37 +0000)
committerSarven Capadisli <csarven@status.net>
Sun, 4 Oct 2009 21:37:05 +0000 (21:37 +0000)
plugins/MobileProfile/MobileProfilePlugin.php

index 90ec8129dac1a7112983550826ae85fcea6fb488..4e9bfd6c80a00166e767f18ee1900e0684ca4d95 100644 (file)
@@ -214,7 +214,7 @@ class MobileProfilePlugin extends WAP20Plugin
         }
 
         $action->elementStart('div', array('id' => 'header'));
-        $action->showLogo();
+        $this->_showLogo($action);
         $action->showPrimaryNav();
         $action->showSiteNotice();
         if (common_logged_in()) {
@@ -226,6 +226,26 @@ class MobileProfilePlugin extends WAP20Plugin
     }
 
 
+    function _showLogo($action)
+    {
+        $action->elementStart('address', 'vcard');
+        $action->elementStart('a', array('class' => 'url home bookmark',
+                                       'href' => common_local_url('public')));
+        if (common_config('site', 'mobilelogo') || 
+            file_exists(theme_file('logo.png')) || 
+            file_exists(theme_file('mobilelogo.gif'))) {
+
+            $action->element('img', array('class' => 'photo',
+                'src' => (common_config('site', 'mobilelogo')) ? common_config('site', 'mobilelogo') : 
+                            ((file_exists(theme_file('mobilelogo.gif'))) ? (theme_path('mobilelogo.gif')): theme_path('logo.png')),
+                'alt' => common_config('site', 'name')));
+        }
+        $action->element('span', array('class' => 'fn org'), common_config('site', 'name'));
+        $action->elementEnd('a');
+        $action->elementEnd('address');
+    }
+
+
     function onStartShowAside($action)
     {
         if ($this->serveMobile) {