-
AuthorPosts
-
Saguaros Moderator
Saguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
October 20, 2009 at 2:42 am #321032Hello deblock!
The reason is from Length of title, it is so long, have 2 the solutions to fix this issue:
1) you set max length of title equal 200 into “Title Max Length” parameter,
2) or fix width of the module in css file:
you open file: /modules/mod_janewsticker/assets/style.css and find a code section:[PHP]
.ja-headlines {
overflow: hidden;
width:auto;
position: relative !important;
height:16px;
}
[/PHP]
You change to :[PHP]
.ja-headlines {
overflow: hidden;
width:270px;
position: relative !important;
height:16px;
}good luck
[/PHP]3 users say Thank You to Saguaros for this useful post
deblock Frienddeblock
- Join date:
- June 2008
- Posts:
- 88
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 29
- Thanked:
- 1 times in 1 posts
October 20, 2009 at 4:22 pm #321089Unfortunately, neither of those were able to cut off long headlines. I just took out a couple of the “mega-items” and it all fits now. Thanks!
October 25, 2009 at 9:37 pm #321512How to repost articles to the Twitter?
October 26, 2009 at 6:33 pm #321631<em>@zorroh 145561 wrote:</em><blockquote>i have teline iii v1.2 template and modules and plugins installed like documentation says, but i dont have
– module height
– modul width
– on click open in
– load css file
parameters as i see here in picturesi have firefox 3.0.14</blockquote>
Is there any answer for this?:confused: I’m more interested on the “on click open in”, I’d like viewers to open the links in a new window…
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
October 27, 2009 at 4:21 am #321695Hello soaresa!
I will give you specific instructions to turn on “on click open in” params you would like,
– you open file: /modules/mod_jasticker/mod_jasticker.xml and add this block inside this.
[PHP]
<param name=”target” type=”list” default=”” label=”ON CLICK, OPEN IN” description=”ON CLICK, OPEN IN DESC”>
<option value=”_blank”>New Window with Browser Navigator</option>
<option value=””>Parent Window with Browser Naviagor</option>
</param>
[/PHP]
– you open file /modules/mod_janewsticker/mod_janewsticker.php,at line 30:
[PHP]$target = $params->get( ‘target’ );[/PHP]
and replace them by my codes :
[PHP]
$target = $params->get( ‘target’ );
$targetLink = $target ? ‘target=”‘.$target.'”‘: “” ;
[/PHP]– open file : /modules/mod_janewsticker/tmpl/default.php, at line 23:
[PHP]<a title=”<?php echo modJANewStickerHelper::trimString( trim(strip_tags($item->introtext) ), 300); ?>”[/PHP]
replace:
[PHP]<a <?php echo $targetLink;?> title=”<?php echo modJANewStickerHelper::trimString( trim(strip_tags($item->introtext) ), 300); ?>”[/PHP]– Add this block into your language file:
[PHP]
ON CLICK, OPEN IN=On Click, Open In
ON CLICK, OPEN IN DESC=On Click, Open In
[/PHP]gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 13, 2009 at 1:31 pm #3234911st question:
In the module’s configurations there is “Show HeadText” option.
At the same time template’s block “header.php” contains row <em><?php echo JText::_(‘Headlines’)?></em>
Why header text is set 2 times?2nd question:
In Cyrillic languages words before 3 dots (where sentence is “cut”) I see a black rhomb with question mark inside (see attached picture).3nd question:
If you put cursor over the text, beginning of respective article is shown. But I observed, if article contains (“) is breaks the tip text, it ends at first occur of “
mx5gr Friendmx5gr
- Join date:
- September 2009
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
November 20, 2009 at 1:20 pm #324410<em>@gray 152740 wrote:</em><blockquote>
2nd question:
In Cyrillic languages words before 3 dots (where sentence is “cut”) I see a black rhomb with question mark inside (see attached picture).</blockquote>
Same in Greek. It happens with ja_news & ja_newsII modules as well..
I reported that a while ago but no fix has been issued…
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 20, 2009 at 3:48 pm #324427I found by myself solution for question No.2.
So, in modulesmod_janewstickerhelper.php
replace
[php]return substr( $title, 0, $max ) . ‘…’;[/php]
with
[php]return mb_substr( $title, 0, $max ) . ‘…’;[/php]gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 20, 2009 at 4:51 pm #324429I found solution for question No.3. It appeared to be a PHP bug in function strip_tags. For me it appears with double quotes (“), I found info about bug with single quote (‘).
Anyway, my solution (it covers both issue No.2 and No.3) is as follows:
in modulesmod_janewstickerhelper.php replace the entire function trimString with the new one:
[php]
/**
* Trim string with max specify. Updated by Gray to handle strip_tags bugs
*
* @param string $title
* @param integer $max
* @param bool True if text with HTML tags
* @return string
*/
function trimString( $title, $max = 60, $intro = false ){if($intro ){
# Remove some symbols due to bugs in PHP strip_tags function
$remove = array(‘”‘, ”’); // double quotes and/or single quotes
$title = str_replace($remove, ”, $title);
$title = trim(strip_tags($title));
}if(strlen($title) > $max){
return mb_substr($title, 0, $max) . ‘…’;
}
return $title;
}
[/php]
in modulesmod_janewstickertmpldefault.php
replace
<a title=”<?php echo modJANewStickerHelper::trimString( trim(strip_tags($item->introtext) ), 300); ?>” <?php echo $aClass ;?> href=”<?php echo modJANewStickerHelper::getLink($item, $userRSS); ?>”><span><?php echo modJANewStickerHelper::trimString( $item->title, $titleMaxChars );?></span>
with:
<a title=”<?php echo modJANewStickerHelper::trimString($item->introtext, 300, true); ?>” <?php echo $aClass ;?> href=”<?php echo modJANewStickerHelper::getLink($item, $userRSS); ?>”><span><?php echo modJANewStickerHelper::trimString( $item->title, $titleMaxChars );?></span>1 user says Thank You to gray for this useful post
November 22, 2009 at 1:39 am #324582All Joomlart templates look unfinished, published to early, without polish other developers offer. Joomlart has no user guides of any kind relying basically on forums, that is – help yourselves people. It takes them weeks or longer to replay to posts, users are begging for answers, and sometimes one of the developers in Vietnam offers two lines on some subject. Very, very un-business like approach. The whole Joomlart affair looks like some amateur or one-person affair: the guy has no time to answer questions.
mx5gr Friendmx5gr
- Join date:
- September 2009
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
November 22, 2009 at 2:01 pm #324597<em>@gray 153943 wrote:</em><blockquote>I found by myself solution for question No.2.
So, in modulesmod_janewstickerhelper.php
replace
[php]return substr( $title, 0, $max ) . ‘…’;[/php]
with
[php]return mb_substr( $title, 0, $max ) . ‘…’;[/php]</blockquote>It seems that mb_string is not supported by PHP 5.2.9 that we use. This is probably the issue why we get gibberish characters in mod_janews2 and mod_janews at the trimming point of a sentence…
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
mx5gr Friendmx5gr
- Join date:
- September 2009
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
November 23, 2009 at 10:49 am #324676
[21-Nov-2009 02:01:22] PHP Fatal error: Call to undefined function mb_substr() in C:inetpubwwwrootmodulesmod_janewstickerhelper.php on line 117
Under PHP 5.2.9….
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
November 23, 2009 at 12:47 pm #324693Check if in php.ini line
extension=php_mbstring.dll
is not commented.AuthorPostsThis topic contains 53 replies, has 24 voices, and was last updated by mx5gr 14 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum