]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/MobileProfile/MobileProfilePlugin.php
OStatus: handle update-profile Salmon pings
[quix0rs-gnu-social.git] / plugins / MobileProfile / MobileProfilePlugin.php
index 14d2500e8fdc4859d880b46f2e24204ed3291355..cd2531fa727a8f3b7d4d2fd41ed645a8f3d4dc7d 100644 (file)
@@ -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) {
@@ -356,8 +366,6 @@ class MobileProfilePlugin extends WAP20Plugin
 
         $contentLimit = Notice::maxContent();
 
-        $form->out->inlineScript('maxLength = ' . $contentLimit . ';');
-
         if ($contentLimit > 0) {
             $form->out->element('div', array('id' => 'notice_text-count'),
                                 $contentLimit);
@@ -416,7 +424,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;
+    }
+}