test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • hortitrends Friend
    #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 Friend
    #376607

    Hi 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 Friend
    #474265

    hi,
    this also works for slideshowlite? only for the title or even for the description?
    tks
    lucio

    Ninja Lead Moderator
    #474326

    You 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);
    }
    }

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

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