2013-10-12, 01:02:23
2013-10-12, 01:24:38
fancybox is already in core, there is a plugin for its use on front end.
2013-10-12, 01:41:55
correct but if i add the "I18N" language switch into my template the
fanybox plugin dosn´t work again.
see here.... sample page
fanybox plugin dosn´t work again.
see here.... sample page
2013-10-12, 01:55:29
Hmmm i cant seem to find where you "Fire" fancybox.
Have you added $("your_selector").fancybox(); to your code?
Edit: Just checked the fancybox plugin and noticed that it sets automatically the selector so nvm about that but I cant even find fancybox lib loaded nor the plugin on your site.
Have you added $("your_selector").fancybox(); to your code?
Edit: Just checked the fancybox plugin and noticed that it sets automatically the selector so nvm about that but I cant even find fancybox lib loaded nor the plugin on your site.
2013-10-12, 02:08:27
hmm.... confused me now than use the same config here (non dev page without multilanguage support)
sample with same config and other result
sample with same config and other result
2013-10-12, 02:20:57
Well there might be something missing/wrong in your templates <head> section since the non-dev version loads both fancybox lib and the fancybox plugin.
Can you check the head section of your dev and non-dev template file to see if theres any diferences?
Or maybe paste it here?
Can you check the head section of your dev and non-dev template file to see if theres any diferences?
Or maybe paste it here?
2013-10-12, 02:23:28
non dev version head section
dev version head section
Code:
<head>
<?php get_header(); ?>
<title><?php get_page_clean_title(); ?> - <?php get_site_name(); ?></title>
<link href="http://fonts.googleapis.com/css?family=Arvo" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Coda:400,800" rel="stylesheet" type="text/css" />
<link href="<?php get_theme_url(); ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php get_theme_url(); ?>/p01-style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
dev version head section
Code:
<head>
<!-- get_i18n_header -->
<?php get_i18n_header(); ?>
<!-- end #get_i18n_header -->
<title><?php get_page_clean_title(); ?> - <?php get_site_name(); ?></title>
<link href="http://fonts.googleapis.com/css?family=Arvo" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Coda:400,800" rel="stylesheet" type="text/css" />
<link href="<?php get_theme_url(); ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php get_theme_url(); ?>/p01-style.css" rel="stylesheet" type="text/css" media="screen" />
<!-- langswitch -->
<div id="langswitch"> <a href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">deutsch</a> |
<a href="<?php echo htmlspecialchars(return_i18n_setlang_url('en')); ?>">english</a>
</div>
<!-- end #langswitch -->
</head>
2013-10-12, 02:48:36
Well first of all move the langswitch outside of the head tags put it just after the body tag
It seems that get_i18n_header(); doesnt loads queued scripts at all. (checking it now to see whats the problem)
Edit: Not sure if this is how its supposed to be but get_i18n_header() misses the get_scripts_frontend() so no queued scripts are loaded at all (or im doing something wrong).
So editing the i18n_base/frontend.class.php and adding get_scripts_frontend() to the outputHeader() solves this.
Edited frontend.class.php
Code:
<head>
<!-- get_i18n_header -->
<?php get_i18n_header(); ?>
<!-- end #get_i18n_header -->
<title><?php get_page_clean_title(); ?> - <?php get_site_name(); ?></title>
<link href="http://fonts.googleapis.com/css?family=Arvo" rel="stylesheet" type="text/css" />
<link href="http://fonts.googleapis.com/css?family=Coda:400,800" rel="stylesheet" type="text/css" />
<link href="<?php get_theme_url(); ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php get_theme_url(); ?>/p01-style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- langswitch -->
<div id="langswitch"> <a href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">deutsch</a> |
<a href="<?php echo htmlspecialchars(return_i18n_setlang_url('en')); ?>">english</a>
</div>
<!-- end #langswitch -->
...
It seems that get_i18n_header(); doesnt loads queued scripts at all. (checking it now to see whats the problem)
Edit: Not sure if this is how its supposed to be but get_i18n_header() misses the get_scripts_frontend() so no queued scripts are loaded at all (or im doing something wrong).
So editing the i18n_base/frontend.class.php and adding get_scripts_frontend() to the outputHeader() solves this.
Edited frontend.class.php
PHP Code:
// like get_header, but tags beginning with _ are ignored and the language is appended to the canonical URL
public static function outputHeader($full=true) {
global $metad, $metak, $title, $content, $url, $parent, $language;
include(GSADMININCPATH.'configuration.php');
if ($metad != '') {
$description = stripslashes(htmlspecialchars_decode($metad, ENT_QUOTES));
} else {
if (function_exists('mb_substr')) {
$description = trim(mb_substr(html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($content, ENT_QUOTES))),ENT_QUOTES, 'UTF-8'), 0, 160));
} else {
$description = trim(substr(html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($content, ENT_QUOTES))),ENT_QUOTES, 'UTF-8'), 0, 160));
}
$description = preg_replace('/\(%.*?%\)/', " ", $description);
$description = preg_replace('/\{%.*?%\}/', " ", $description);
$description = preg_replace('/\n/', " ", $description);
$description = preg_replace('/\r/', " ", $description);
$description = preg_replace('/\t/', " ", $description);
$description = preg_replace('/ +/', " ", $description);
}
$keywords = array();
$tags = preg_split("/\s*,\s*/", stripslashes(htmlspecialchars_decode($metak, ENT_QUOTES)));
if (count($tags) > 0) foreach ($tags as $tag) if (substr(trim($tag),0,1) != '_') $keywords[] = trim($tag);
echo '<meta name="description" content="'.htmlspecialchars(trim($description)).'" />'."\n";
echo '<meta name="keywords" content="'.htmlspecialchars(implode(', ',$keywords)).'" />'."\n";
if ($full) {
echo '<meta name="generator" content="'.$site_full_name.'" />'."\n";
echo '<link rel="canonical" href="'.find_i18n_url($url,$parent,$language).'" />'."\n";
}
get_scripts_frontend();
exec_action('theme-header');
}
2013-10-12, 03:53:44
That is a huge bug, is this the latest i18n version ? I cannot imagine that noone has ever caught this before.
2013-10-12, 04:00:28
Yep its i18n 3.2.3 version available on extend.
2013-10-12, 18:05:36
yes i´ve use the latest version of I18N plugin
2013-10-12, 18:10:26
(2013-10-12, 18:05:36)phpman Wrote: [ -> ]yes i´ve use the latest version of I18N plugin
Replace the frontend.class.php file in plugins/i18n_base/ folder with the attached one below and it should work.
[attachment=286]
2013-10-12, 18:39:38
you´re right ! Thanks for the fix. But in this case i have another point of the fancybox which
installed in the base of the CMS. If you now look on the devpage (with new frontend.class.php)
it flicker it i switch from one picture to another one. On lightbox plugins (like galleries) it isn´t so.
What i must do to fix this too?
installed in the base of the CMS. If you now look on the devpage (with new frontend.class.php)
it flicker it i switch from one picture to another one. On lightbox plugins (like galleries) it isn´t so.
What i must do to fix this too?
2013-10-13, 02:46:07
Hmmm i just checked your dev-page and i still see the old head section so i cant see what could be the problem with fancybox. Is the frontend.class.php changed and the plugin activated?
Edit: I see the plugin was updated by @mvlcek so u should update your plugin and after we see whats with the fancybox thing.
Edit: I see the plugin was updated by @mvlcek so u should update your plugin and after we see whats with the fancybox thing.
2013-10-13, 03:00:10
i´ve used your modified I18N frontend.class.php File and if i use it, it work.
But now after @mvlcek has update the plugin i replace the complete plugin with the new version
to check if my new problem solved or not. In this case (see my last posting in the I18N area i´ve check
the fancybox issue too. After Update of the new version (replacement of your file with authors files
if dosn´t work again.
Now i wrote to mvlcek that he look on your solution to update the plugin to fix this issue too.
But now after @mvlcek has update the plugin i replace the complete plugin with the new version
to check if my new problem solved or not. In this case (see my last posting in the I18N area i´ve check
the fancybox issue too. After Update of the new version (replacement of your file with authors files
if dosn´t work again.
Now i wrote to mvlcek that he look on your solution to update the plugin to fix this issue too.