Hi! This si my site
http://candyeyes.es/portfolio and after I applied the code below in the theme.php file so I could make the latest images of the gallery show up (cause it's on the cpmfetch gallery is on the same folder as the index.php file), I have an issue with the special characters, cause they're not showing up correctly. For example: the € charactes displays as €, as you can see in my site.
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
ob_start();
include "/home/candyeye/public_html/portfolio/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/home/candyeye/public_html/portfolio/cpmfetch/cpmfetch_config.php");
$options = array( 'imageheight' => '40', 'imagewidth' => '30', 'imagestyle' => 'image100');
$objCpm->cpm_viewLastAddedMedia(2,6, $options);
$objCpm->cpm_close();
$cpmfetch_latest = ob_get_clean();
$template_vars = array(
'{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => theme_page_title($section),
'{CHARSET}' => $charset,
'{META}' => $meta,
'{GAL_NAME}' => $CONFIG['gallery_name'],
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
'{SYS_MENU}' => theme_main_menu('sys_menu'),
'{SUB_MENU}' => theme_main_menu('sub_menu'),
'{ADMIN_MENU}' => theme_admin_mode_menu(),
'{CUSTOM_HEADER}' => $custom_header,
'{JAVASCRIPT}' => theme_javascript_head(),
'{MESSAGE_BLOCK}' => theme_display_message_block(),
'{CPMFETCH_LATEST}' => $cpmfetch_latest,
);
$template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars);
echo template_eval($template_header, $template_vars);
// Show various admin messages
adminmessages();
}
I've been looking in the forum, and could it be a problem with UTF8 or language coding? cause I swear I didn't change anything more than adding the that code. As help given on some threads of this forum, I tried to change the ITF8 to iso-8859-2 (Central European, as the language is spanish) and nothing changed. I also tried to add the charset function like this:
function form_charset($optionvalue, $selected)
{
global $CONFIG;
$charsets = array(//'Default' => 'language file',
'Arabic' => 'iso-8859-6',
'Baltic' => 'iso-8859-4',
'Central European' => 'iso-8859-2',
'Chinese Simplified' => 'euc-cn',
'Chinese Traditional' => 'big5',
'Cyrillic (windows-1251)' => 'windows-1251',
'Cyrillic (koi8-r)' => 'koi8-r',
'Greek' => 'iso-8859-7',
'Hebrew' => 'iso-8859-8-i',
'Icelandic' => 'x-mac-icelandic',
'Japanese' => 'euc-jp',
'Korean' => 'euc-kr',
'Maltese' => 'iso-8859-3',
'Thai' => 'windows-874',
'Turkish' => 'iso-8859-9',
'Unicode' => 'utf-8',
'Vietnamese' => 'windows-1258',
'Western' => 'iso-8859-1'
);
//$value = strtolower($CONFIG['charset']);
echo "<select name=\"$optionvalue\">";
foreach ($charsets as $country => $charset)
{
echo "<option value=\"$charset\" " . ($selected == $charset ? 'selected="selected"' : '') . ">$country ($charset)</option>\n";
}
echo "</select>";
}
and no result. Could anyone help me to make the special characters show up as they are?
Thanks.