return true;
}
- /**
- * SN plugin API, here we will add css needed for modifiyed rendered
- *
- * @param Action $xml
- */
- public function onEndShowStatusNetStyles($xml){
- $xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;} .notice .author {float:left}');
- }
-
/**
* is passed string a rtl content or not
*
* @return boolean
*/
public static function startsWithRTLCharacter($str){
+ if (strlen($str) < 1) {
+ return false;
+ }
if( is_array($cc = self::utf8ToUnicode(mb_substr($str, 0, 1, 'utf-8'))) )
$cc = $cc[0];
else
*/
function onEndShowScripts($action){
if (common_logged_in()) {
- $action->script('plugins/DirectionDetector/jquery.DirectionDetector.js');
+ $action->script($this->path('jquery.DirectionDetector.js'));
}
}
'version' => DIRECTIONDETECTORPLUGIN_VERSION,
'author' => 'Behrooz Shabani',
'homepage' => $url,
+ // TRANS: Plugin description.
'rawdescription' => _m('Shows notices with right-to-left content in correct direction.')
);
return true;