]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/MobileProfile/MobileProfilePlugin.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / plugins / MobileProfile / MobileProfilePlugin.php
index 0b1e4de28651a51c98443bd901dd40e09c24428c..5c913836dccd7db6f6375e88bf24626ee596c8d2 100644 (file)
@@ -243,19 +243,13 @@ class MobileProfilePlugin extends WAP20Plugin
         if (file_exists(Theme::file('css/mp-screen.css'))) {
             $action->cssLink('css/mp-screen.css', null, 'screen');
         } else {
-            $action->element('link', array('rel' => 'stylesheet',
-                                         'type' => 'text/css',
-                                         'href' => common_path('plugins/MobileProfile/mp-screen.css') . '?version=' . STATUSNET_VERSION,
-                                         'media' => 'screen'));
+            $action->cssLink('plugins/MobileProfile/mp-screen.css',null,'screen');
         }
 
         if (file_exists(Theme::file('css/mp-handheld.css'))) {
             $action->cssLink('css/mp-handheld.css', null, 'handheld');
         } else {
-            $action->element('link', array('rel' => 'stylesheet',
-                                         'type' => 'text/css',
-                                         'href' => common_path('plugins/MobileProfile/mp-handheld.css') . '?version=' . STATUSNET_VERSION,
-                                         'media' => 'handheld'));
+            $action->cssLink('plugins/MobileProfile/mp-handheld.css',null,'handheld');
         }
 
         return false;
@@ -322,6 +316,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'));
@@ -358,9 +356,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);
@@ -419,7 +414,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;
+    }
+}