-
AuthorPosts
-
February 13, 2011 at 11:47 pm #160151
Hi,
Apostrophe’s in type are shown will slash, I’m using the JA Rave template, I have looked at previous people who had similar issues but the code is not found where its suggested.Can anyone help, please
thanks
thuanlq Friendthuanlq
- Join date:
- October 2010
- Posts:
- 528
- Downloads:
- 0
- Uploads:
- 29
- Thanks:
- 8
- Thanked:
- 121 times in 99 posts
February 14, 2011 at 9:44 am #376607Hi Hortitrends,
Try to:
– Open file “helper.php” in the folder “modules/mod_jaslideshow2/”, then find to function:
/**
* trim string with max specify
*
* @param string $title
* @param integer $max.
*/
function trimString( $title, $maxchars=60, $includeTags = NULL )
{...
}
replace with this code:
function trimString( $title, $maxchars=60, $includeTags = NULL )
{
if(!empty($includeTags))
{
$title = $this->trimIncludeTags($title,$this->buildStrTags($includeTags));
}
$title = str_replace( array('"',"'"), array(""","'"), $title);//I added this line code to fix this issue.
if (function_exists ( 'mb_substr' )) {
$doc = JDocument::getInstance ();$title2 = SmartTrim::mb_trim ( ($title), 0, $maxchars, $doc->_charset );
return stripslashes($title2);
} else {
$title2 = SmartTrim::trim ( ($title), 0, $maxchars );
return stripslashes($title2);
}
}
Good luck,librandi Friendlibrandi
- Join date:
- February 2012
- Posts:
- 587
- Downloads:
- 89
- Uploads:
- 163
- Thanks:
- 123
- Thanked:
- 2 times in 2 posts
November 26, 2012 at 6:22 pm #474265hi,
this also works for slideshowlite? only for the title or even for the description?
tks
lucioNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 27, 2012 at 3:29 am #474326You can try to apply it to slideshowlite module by opening file:
<blockquote>modulesmod_jaslideshowlitehelpershelper.php</blockquote>
from
function trimString($title, $maxchars = 60, $includeTags = NULL)
{
if (!empty($includeTags)) {
$title = $this->trimIncludeTags($title, $this->buildStrTags($includeTags));
}
if (function_exists('mb_substr')) {
$doc = JDocument::getInstance();
return SmartTrim::mb_trim(($title), 0, $maxchars, $doc->_charset);
} else {
return SmartTrim::trim(($title), 0, $maxchars);
}
}
change to
function trimString($title, $maxchars = 60, $includeTags = NULL)
{
if (!empty($includeTags)) {
$title = $this->trimIncludeTags($title, $this->buildStrTags($includeTags));
}
$title = str_replace( array('"',"'"), array(""","'"), $title);
if (function_exists('mb_substr')) {
$doc = JDocument::getInstance();
return SmartTrim::mb_trim(($title), 0, $maxchars, $doc->_charset);
} else {
return SmartTrim::trim(($title), 0, $maxchars);
}
} -
AuthorPosts
This topic contains 4 replies, has 4 voices, and was last updated by Ninja Lead 12 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum