How to solve problems with grey thumbs/images that happens using characters non-ASCII standard
  • I've posted the solution on this message, but i think that is better a new topic publishing the solution.

    People using minishowcase have already known that there are problems with some characters in languages like spanish. After trying a lot of possible solutions now i've get the best solution.

    You need to following the following steps:

    1. On config/settings.php set false to $settings['set_double_encoding'], so the line now is (by default is false, but it's possible that you changed it):
    <br />$settings['set_double_encoding'] = false;<br />

    2. On libraries/thumb.display.php search this code (it's practically at top of the file)
    <br /> //// receives the original image as [?img=relative/path/to/image.jpg] ////<br /> // get image path<br /> $img = false;<br /> if (isset($_GET["img"])) {<br /> if ($settings['set_double_encoding']) {<br /> $img = "../".Url_decode(htmlentities($_GET["img"]));<br /> <br /> } else {<br /> <b>$img = "../".str_replace("\\","", htmlentities($_GET["img"]));</b><br /> }<br /> } else {<br /> <br /><br /> $img = false;<br /> }<br />

    And change the line (bold line in previous code)
    <br />$img = "../".str_replace("\\","", htmlentities($_GET["img"]));<br />

    to
    <br />$img = "../".str_replace("\\","", html_entity_decode(htmlentities($_GET["img"])));<br />

    Now all characters like ñ, á, é, í, ó, ú and others in others languages works fine.

  • victorvictor July 22

    fenix-tx, that's really invaluable! you don't know how many hurs i've spent trying to solve that *damn* problem. i owe you a big beer!

    i'll add the code to minishowcase. gracias mi amigo, me has salvado la vida! :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership