We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25260
    • 156 Posts
    Hi,

    I’ve got a quite long description for some images that I would like to display in slimbox.

    I insert that in the description field (it’s a default field, I’m also using custom fields with 0.6v of Maxigallery but not in this case), save the gallerie, reopen the managing page and all of the text is there, so it seems that data is stored correctly in the DB table.

    When I zoom the image in my site, description gets truncated after 70 chars.

    ATM I don’t have time to dig into the source code of slimbox, so if anyone has got any hints or solutions for this problem it would be REALLY appreciated.

    Thanks to all.

    Cheers,

    Roberto
      • 26016
      • 561 Posts
      Hi,
      I tried to replicate your problem by putting a huge description on a photo in slimbox. But it displayed just fine, no truncation! I wonder if you’re using lots of parameters for width or something like that? By the way, I’m not using any custom fields.

      Beyond that, the only quick way I can think of is via CSS. You could try styling the following DIV, maybe change the font-size or something:

      #lbCaption

      Good luck, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 25260
        • 156 Posts
        I found the problem. It was an apostrophe.

        Simply, replacing [+maxigallery.picture.descr:htmlent+] with [+maxigallery.picture.descr+] solved the problem.

        I really don’t remember what :htmlent does, and I couldn’t find it quickly by some searches, so if anyone knows please post smiley

        Cheers,

        Roberto
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          http://wiki.modxcms.com/index.php/PHx#Modifiers
          htmlent

          Converts the input to html entities.

          phx.parser.class.inc.php at line 254:
          case "htmlent": $output = htmlentities($output,ENT_QUOTES,$modx->config['etomite_charset']);


          http://php.net/manual/en/function.htmlentities.php
          $str = "A 'quote' is <b>bold</b>";
          // Outputs: A ’quote’ is <b>bold</b>
          echo htmlentities($str, ENT_QUOTES);

          Note that not all character sets are supported by this function; since the PHx function specified the default configuration character set this may cause a problem.


            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org