-
AuthorPosts
-
321fly Friend
321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 3, 2012 at 3:49 am #179614Hi I faced wrong symbols displaying from the beginning. I have that symbol — � in several modules as I guess. Because changing Ja Slidecontnent.ini to UTF-8 could help with ������ change to cyrilllic “Подробнее” which is “Read more” in Russian.
Here is the code, probably its.ini file I have to change to UTF-8. How can I retrieve the .ini?
Maybe you can give another idea how to display cyrillic script correctly. That happens ONLY to titles and subtitles when displayed SHORTENED on main page and ONLY in some modules like JA-slidecontent. Usually after you go to the article it is ok. As I guess I wiil have to change title and subtitle display options for JA-slidecontent. Correct me if I miss something.Regards,
Here is an example of code displayed:<a class="ja-title" href="/index.php/heartland/item/238-name-of-the-article-in-cyrillic">text-in-cyrillic-Да-это-текст-and-wrong-symbol�...</a>
<a class="ja-title" href="/index.php/epigrammatrix">text-in-cyrillic-Да-это-текст-and-wrong-symbol�...</a>
321fly Friend321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 3, 2012 at 5:36 am #463032Also there’s no module Ja-title, it’s a class:laugh:. If so could you also tell which module is responsible for showing heading and subtitles?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 4, 2012 at 8:06 am #463148Please send back to me exactly what module name was missing? I will give solutions to you about cut string on title.
321fly Friend321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 5, 2012 at 3:09 pm #463220Hi again, still have same problem with � symbols in shortened titles. As you can see in attachment
It happens to ACCORDION and does not appear in UPCOMING RELEASES. Also it comes with WHY PICK US.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 6, 2012 at 3:00 am #463269WHY PICK US is JA Side News module
Open modules/mod_jasidenews/helper.php
Find trimString functionfunction trimString($title, $max = 60)
{if (strlen($title) > $max) {
return substr($title, 0, $max) . '...';
}
return $title;
}change to
function trimString($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 ='';
}
}321fly Friend321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 6, 2012 at 8:39 am #463326Thnx Ninja Lead, I changed lines for trimString function in file modules/mod_jasidenews/helper.php
Problem almost solved:
that was before<
that is after, it helped and there are no more � except one on the right. See attachment.
accordion is ok now.In case there is code from helper.php from side
function trimString($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 ='';
}
}
And BTW — I tried to save helper.php in UTF-8 hoping it would help. In fact will it work?(!)
P.S.> JAT3 Cache has been cleaned- 321fly Friend
321fly
- Join date:
- July 2012
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 24
- Thanks:
- 19
- Thanked:
- 3 times in 1 posts
August 6, 2012 at 9:23 am #463338<em>@321fly 333232 wrote:</em><blockquote>
that is after, it helped and there are no more � except one on the right. See attachment. </blockquote>
The item which still had the odd symbol in JA Side News, had had a dash in its title.
I renamed it using underscore (_) instead of the dash and same result. Then I removed the dash at all keeping only letters in title.
Reconfigured Ja Side News for “Why Pick Us” setting title max length: 40, description: 70
And it works even with dashes etc! Thanks for decision Ninja Lead!Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 6, 2012 at 11:04 am #463352Ok, great job
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 8 replies, has 2 voices, and was last updated by Ninja Lead 12 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum