X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FMobileProfile%2FMobileProfilePlugin.php;h=f788639aed7383d7b7fe1ca2ec9042c2cc257f07;hb=84663dccff4d3ca4e321cef99e9d4d556ba29ec4;hp=8b5e5f31da6b1a08077c4cfcd160c4bc0a7854ad;hpb=675e32ac9ac1bdcfbb6e293eb363d2b592140ae7;p=quix0rs-gnu-social.git diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 8b5e5f31da..f788639aed 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -240,6 +240,8 @@ class MobileProfilePlugin extends WAP20Plugin return true; } + $action->cssLink('css/display.css'); + if (file_exists(Theme::file('css/mp-screen.css'))) { $action->cssLink('css/mp-screen.css', null, 'screen'); } else { @@ -256,6 +258,14 @@ class MobileProfilePlugin extends WAP20Plugin } + function onStartShowUAStyles($action) { + if (!$this->serveMobile) { + return true; + } + + return false; + } + function onStartShowHeader($action) { if (!$this->serveMobile) { @@ -302,8 +312,6 @@ class MobileProfilePlugin extends WAP20Plugin $connect = 'imsettings'; } else if (common_config('sms', 'enabled')) { $connect = 'smssettings'; - } else if (common_config('twitter', 'enabled')) { - $connect = 'twittersettings'; } $action->elementStart('ul', array('id' => 'site_nav_global_primary')); @@ -316,6 +324,10 @@ class MobileProfilePlugin extends WAP20Plugin $action->menuItem(common_local_url($connect), _('Connect')); } + if ($user->hasRight(Right::CONFIGURESITE)) { + $action->menuItem(common_local_url('siteadminpanel'), + _('Admin'), _('Change site configuration'), false, 'nav_admin'); + } if (common_config('invite', 'enabled')) { $action->menuItem(common_local_url('invite'), _('Invite')); @@ -352,9 +364,6 @@ class MobileProfilePlugin extends WAP20Plugin $contentLimit = Notice::maxContent(); - $form->out->element('script', array('type' => 'text/javascript'), - 'maxLength = ' . $contentLimit . ';'); - if ($contentLimit > 0) { $form->out->element('div', array('id' => 'notice_text-count'), $contentLimit); @@ -413,7 +422,15 @@ class MobileProfilePlugin extends WAP20Plugin return $proto.'://'.$serverpart.'/'.$pathpart.$relative; } -} - -?> + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'MobileProfile', + 'version' => STATUSNET_VERSION, + 'author' => 'Sarven Capadisli', + 'homepage' => 'http://status.net/wiki/Plugin:MobileProfile', + 'rawdescription' => + _m('XHTML MobileProfile output for supporting user agents.')); + return true; + } +}