Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SlimBox Plugin ??
#8
Well first of all move the langswitch outside of the head tags put it just after the body tag
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($metadENT_QUOTES));
    } else {
      if (
function_exists('mb_substr')) { 
        
$description trim(mb_substr(html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($contentENT_QUOTES))),ENT_QUOTES'UTF-8'), 0160));
      } else {
        
$description trim(substr(html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($contentENT_QUOTES))),ENT_QUOTES'UTF-8'), 0160));
      }
      
$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($metakENT_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');
  } 
Reply


Messages In This Thread
SlimBox Plugin ?? - by phpman - 2013-10-12, 01:02:23
RE: SlimBox Plugin ?? - by shawn_a - 2013-10-12, 01:24:38
RE: SlimBox Plugin ?? - by phpman - 2013-10-12, 01:41:55
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-12, 01:55:29
RE: SlimBox Plugin ?? - by phpman - 2013-10-12, 02:08:27
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-12, 02:20:57
RE: SlimBox Plugin ?? - by phpman - 2013-10-12, 02:23:28
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-12, 02:48:36
RE: SlimBox Plugin ?? - by shawn_a - 2013-10-12, 03:53:44
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-12, 04:00:28
RE: SlimBox Plugin ?? - by phpman - 2013-10-12, 18:05:36
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-12, 18:10:26
RE: SlimBox Plugin ?? - by phpman - 2013-10-12, 18:39:38
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-13, 02:46:07
RE: SlimBox Plugin ?? - by phpman - 2013-10-13, 03:00:10
RE: SlimBox Plugin ?? - by Kolyok - 2013-10-13, 03:04:43



Users browsing this thread: 1 Guest(s)