• Resolved Viktor Adorjan

    (@misuracing)


    Hi,

    Thank you very much for the new version and the continous efforts on this plugin, Alex!. Unfortunately since the latest update, I’ve been having difficulties with the character encoding. I’m using the latest version of the WordPress, the latest version of the plugin with the built-in thickbox. I’m blogging in Hungarian so I’ve translated the thickbox js file and modified its default character encoding and of course I’m using Hungarian titles for the pictures. It used to work with the previous versions but after the update the character encoding is wrong in the thickbox window. On the backend the entered text is correct and in the SQL file as well. I’ve tried to update the entered texts and changed the character encoding of the nextgen files that contained the ‘caption’ word, but no luck. Because my failure with resolving this issue, I decided to downgrade for the 1.0.2 and it works fine again, so unfortunately I can’t show a working example.

    BTW my blog is located at the https://misuracing.liveforspeed.hu, almost every post features a singlepic and a few of them galleries or albums.

    Thanks in advance,

    Misu

Viewing 4 replies - 1 through 4 (of 4 total)
  • winged_soldier

    (@winged_soldier)

    Hi there.

    I have exactly the same problem, except that I use shutter-reloaded instead of thickbox.

    As I figured out, in the source of the webpage, in the <a href="... ... title="text"> the title “text” is encoded badly. If i place an image on the page by hand, setting all attributes by hand including the title property of anchor tag, it works just fine.

    So I tought there is something with the singlepic.php, but TBH I’m just learning php, and can’t find out what.

    winged_soldier

    (@winged_soldier)

    Sorry for double-posting, but I found out a solution.

    In the older version singlepic title is got from the image description:
    $out = '<a href="'.$picture->imagePath.'" title="'.stripslashes($picture->description).'" '.$picture->get_thumbcode("singlepic".$imageID).' >';

    In the new version it’s gotten from the “linktitle” (donno what it is exactly).
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->linktitle ?>" <?php echo $image->thumbcode ?> >

    Description is still a valid value, so if you change the singlepic.php (nextgen gallery dir/view/) to this:

    <?php
    /**
    Template Page for the single pic
    
    Follow variables are useable :
    
    	$image : Contain all about the image
    	$meta  : Contain the raw Meta data from the image
    	$exif  : Contain the clean up Exif data
    	$iptc  : Contain the clean up IPTC data
    	$xmp   : Contain the clean up XMP data 
    
     You can check the content when you insert the tag <?php var_dump($variable) ?>
     If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
    **/
    ?>
    
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>
    
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    	<img class="<?php echo $image->classname ?>" src="<?php echo $image->thumbnailURL ?>" alt="<?php echo $image->alttext ?>" title="<?php echo $image->alttext ?>" />
    </a>
    <?php if (!empty ($image->caption)) : ?><span><?php echo $image->caption ?></span><?php endif; ?>
    <?php endif; ?>

    It will work fine.

    Changed line is 20th:
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >

    description was linktitle before.

    Thread Starter Viktor Adorjan

    (@misuracing)

    fantastic, thank you very much for your effort!

    Alex Rabe

    (@alexrabe)

    will be fixed in the next release

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] 1.1.0 wrong character encoding with thickbox’ is closed to new replies.