mnezerka
Forum Replies Created
-
Forum: Plugins
In reply to: [Easy Table] National first character missing bugHi, I have the same problem. It seems it caused by
fgetcsv
function which is called fromeasy_table_str_getcsv
function. Functionfgetcsv
uses system locale setting, so it depends how is it set on your site – try echo setlocale(LC_ALL, 0). Here is a fix which helped in my case, where system locale was set to “C”. I changed locale to specific valuecs_CZ.UTF-8
just for thefgetcsv
loop, it is set back after$option = get_option(‘easy_table_plugin_option’);
$limit = !empty($option[‘limit’]) ? (int)$option[‘limit’] : 2000;
$oldLocale = set_locale(LC_ALL, 0);
setlocale(LC_ALL, ‘cs_CZ.UTF-8’);
while (($data = @fgetcsv( $handle, $limit, $delimiter, $enclosure )) !== FALSE) {
$num = count($data);
for ($c=0; $c < $num; $c++) {
$line++;
$data[$c] = str_replace(‘NLINEBREAK’,”\n”,$data[$c]);
$data[$c] = str_replace(‘RLINEBREAK’,”\r”,$data[$c]);
$data[$c] = str_replace(‘_ESCAPED_SEPATATOR_’,$delimiter,$data[$c]);
$return[$line] = $data[$c];
}
}
fclose($handle);
setlocale(LC_ALL, $oldLocale);
return $return;It will make sense to experiment a bit with various system settings, or replace usage of
fgetcsv
with another solution (parsing csv isn’t so difficult to do it in code of plugin) not dependant on system locale setting.Forum: Plugins
In reply to: [BSGallery] [Plugin: BSGallery] This Plugin will Do this ?This plugin has nothing to do with location of uploaded images. It’s main purpose is to generate “<a…><img…/>” tags in format easily readable by many lightbox-like javascript tools (LightBox, FancyBox, etc.)