How to move or delete ... points at end of title

January 2013 WordPress Theme
GK User
Tue Jun 18, 2013 11:04 pm
Dears,
I use NEWS THEM for Pashto (speaks in Afghanistan) is in RTL languages.
I have changed some option convert this them to RTL but I have faced with a problem, I can not find in the code 3 point at end of TITLE and at end of part of the text on the front page.

On the page is (برازیل د کنفدرېشن کپ…) is not correct for the RTL languages and correct for RTL is
( … برازیل د کنفدرېشن کپ ).

Can you help us where can we change thaht.

Best Regards
Mir

http://www.taand.com
User avatar
Fresh Boarder

GK User
Wed Jun 19, 2013 7:57 am
Hi,

Generally, only MeetGavenWP has RTL support.. but ok, this (...) is from News Show Pro widget. You have to edit gavern/widgets.nsp.php file, find cut_text function (around line 1105) and try to replace this condition:
Code: Select all
if(function_exists('mb_strlen')) {
             if(mb_strlen($text) > $len){
                $text = mb_substr($text, 0, $len) . $at_end;
             }
          } else {
             if(strlen($text) > $len){
                $text = substr($text, 0, $len) . $at_end;
             }
          }
with this one
Code: Select all
if(function_exists('mb_strlen')) {
             if(mb_strlen($text) > $len){
                $text = $at_end . mb_substr($text, 0, $len);
             }
          } else {
             if(strlen($text) > $len){
                $text = $at_end . substr($text, 0, $len);
             }
          }

or you can completely delete $at_end variables.
User avatar
Moderator

GK User
Wed Jun 19, 2013 10:35 pm
Thank you very much dear Piotr it is perfect but it works only in (Tab I) .
It does not work in (Sidebar, Inset and Mainbody)

code from (widgets.nsp.php)

Code: Select all
 **/
   
    function cut_text($type, $text, $at_end = '…') {
       $text = strip_tags($text);
       $len_type = $this->wdgt_config[$type . '_len_type'];
       $len = $this->wdgt_config[$type . '_len'];
       $cutter = array();
       
       if($len_type == 'words' && $len > 0){
          $temp = explode(' ',$text);
          
          if(count($temp) > $len){
             for($i=0; $i<$len; $i++) $cutted[$i] = $temp[$i];
             $cutted = implode(' ', $cutted);
             $text = $cutted.$at_end;
          }
       } elseif($len_type == 'words' && $len == 0) {
          return '';
       } else {

// 3 dots to the left site of title  *****

          if(function_exists('mb_strlen')) {
             if(mb_strlen($text) > $len){
                $text = $at_end . mb_substr($text, 0, $len);
             }
          } else {
             if(strlen($text) > $len){
                $text = $at_end . substr($text, 0, $len);
             }
          }
       }


Thank you
Mir
http://www.taand.com
User avatar
Fresh Boarder

GK User
Thu Jun 20, 2013 9:29 am
It should work wherever you have GK NSP Widget, try to resave widget GK NSP settings on Sidebar, Inset and Mainbody positions.
User avatar
Moderator


cron