Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • sirbal Friend
    #187094

    When the module truncates descriptions it shows ??? or square signs before the …

    Files related with this module (ja_fubix/html/mod_jasidenews/ and modules/mod_jasidenews) – seems that they all are in UTF-8 encoding.
    Still when checking at W3 validator it says there is non-UTF signs…
    Seems that some file in this module is non-UTF, but I cannot locate it.


    1. sidenews-question-sign
    HeR0 Friend
    #491308

    Hi Sirbal,

    I’m afraid that in this case, you need to pm me ftp and admin account for further check. We will try and help you out.

    Regards

    sirbal Friend
    #491366

    Thank you very much for your answer.
    Sent admin details to you in PM.

    Ninja Lead Moderator
    #491511

    I only access folder JA Fubix Template and changed data in it (from your pm) but doesn’t work. I’m not sure ftp account of your pm is correct?

    You can pm again with admin access and ftp account, I will help you fix this problem directly on your site or you can try to fix this problem as follows

    + Download and extract my attached file

    + Copy it into templates/ja_fubix/html/mod_jasidenews/ path

    + Remember to backup old file before updating

    Let me know the result


    1. default.zip
    sirbal Friend
    #491683

    Thanks for the answer.
    Tried to do according your instructions but with no success.
    Expanded FTP to the whole domain.
    Checked the rights, your user is able to create and delete files.

    Ninja Lead Moderator
    #491779

    I have fixed the problem of your site this way

    + Open modules/mod_jasidenews/helper.php file

    add new function


    function cutString($title, $max=60){
    if($title!=''){
    if(is_array($title)) list($string, $match_to) = $title;
    else { $string = $title; $match_to = $title{0}; }

    $match_start = stristr($string, $match_to);
    $match_compute = strlen($string) - strlen($match_start);

    if (strlen($string) > $max)
    {
    if ($match_compute < ($max - strlen($match_to)))
    {
    $pre_string = substr($string, 0, $max);
    $pos_end = strrpos($pre_string, " ");
    if($pos_end === false) $string = $pre_string."...";
    else $string = substr($pre_string, 0, $pos_end)."...";
    }
    else if ($match_compute > (strlen($string) - ($max - strlen($match_to))))
    {
    $pre_string = substr($string, (strlen($string) - ($max - strlen($match_to))));
    $pos_start = strpos($pre_string, " ");
    $string = "...".substr($pre_string, $pos_start);
    if($pos_start === false) $string = "...".$pre_string;
    else $string = "...".substr($pre_string, $pos_start);
    }
    else
    {
    $pre_string = substr($string, ($match_compute - round(($max / 3))), $max);
    $pos_start = strpos($pre_string, " "); $pos_end = strrpos($pre_string, " ");
    $string = "...".substr($pre_string, $pos_start, $pos_end)."...";
    if($pos_start === false && $pos_end === false) $string = "...".$pre_string."...";
    else $string = "...".substr($pre_string, $pos_start, $pos_end)."...";
    }

    $match_start = stristr($string, $match_to);
    $match_compute = strlen($string) - strlen($match_start);
    }

    return $string;
    }else{
    return $string ='';
    }
    }

    + Open Open modules/mod_jasidenews/sidenews_content.php and sidenews_image.php file

    from
    <blockquote>$helper->trimString</blockquote>
    change to
    <blockquote>$helper->cutString</blockquote>

    Please check the problem of your site again, let me know if it helps

    sirbal Friend
    #491798

    Thank you, seems that it is working now 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 3 voices, and was last updated by  sirbal 11 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum