Toutes mes réponses sur les forums
-
AuteurMessages
-
23 mars 2011 à 15 h 12 min en réponse à : Problème affichage drapeaux avec Gwebsite translator #762883
c’est bon en fait j’ai trouvé tout seul hihi!! Au moins ça servira pour les autres. Encore une fois c’est un problème d’ortographe sur le chemin d’accès aux images. Il fallait mettre GWebsiteTranslator en minuscules!
Voilà à bientôt pour de nouvelles auto-corrections!!!23 mars 2011 à 15 h 08 min en réponse à : Problème affichage drapeaux avec Gwebsite translator #762882je pense que mon probleme est la dedans:
$checked = isset($instance]) ? (bool) $instance] :false;
if ($checked && $own_country != $lang_code[$i]) echo ‘<img title="'.$languages[$i].'" border="0" width= »‘.$flag_width.’px » height= »‘.$flag_height.’px » src= »wp-content/plugins/GWebsiteTranslator/images/’.$lang_code[$i].’.gif » alt= »‘.$languages[$i].' » /> ‘;23 mars 2011 à 15 h 06 min en réponse à : Problème affichage drapeaux avec Gwebsite translator #762881Voilà le code du plugin si jamais ça peut interesser quelqu’un:
<?php
/*
Plugin Name: GWebsiteTranslator
Plugin URI: http://b-projects.mypicsgallery.de/google-website-translator-plugin-fuer-wordpress.html
Description: GWebsiteTranslator v1.0 translates your page with one single click
Author: b-projects
Author URI: http://b-projects.mypicsgallery.de*/
/*
* @ http://b-projects.mypicsgallery.de
* @
* @ Der Script darf in keinster Weise verändert und manipuliert werden.
* @ Veränderungen sind erlaubt, wenn Sie http://b-projects.mypicsgallery.de auf Ihrer Startseite « suchmaschinenfreundlich » verlinken.
* @ Link Code: WordPress Website Translator
* @
* @ ACHTUNG!! Für Schäden jeder Art hafte ich nicht*/
/* Copyright 2010 b-projects (info@b-projects.de)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/add_action(
‘widgets_init’
, array (‘GWebsiteTranslator’, ‘register’ )
);class GWebsiteTranslator extends WP_Widget
{function GWebsiteTranslator()
{
// Konstruktor
$wp_options = array(‘description’=>’GWebsiteTranslator translates your page with one single click’);
parent::WP_Widget(false, $name = ‘GWebsiteTranslator’,$wp_options);
}function widget($args, $instance)
{
$languages = array(« English », « German », « Spanish », « French », « Italian », « Russian », « Swedish », « Dutch », « Arabian », « Japanese », « Chinese »);
$lang_code = array(« en », « de », « es », « fr », « it », « ru », « sv », « nl », « ar », « ja », « zh-CN »);// Ausgabefunktion
extract( $args );
$title = apply_filters(‘widget_title’, $instance);
$url = « http:// ».$_SERVER . getenv(‘REQUEST_URI’);
$own_country = $instance;
//$own_country = ‘de’;
$flag_width = $instance;
$flag_height = $instance;echo $before_widget;
if ( $title )
echo $before_title . ‘<'.'a'.' hr'.'ef'.'='.'"'.'ht'.'t'.'p'.'😕‘.’/b’.’-pr’.’o’.’je’.’ct’.’s’.’.m’.’yp’.’ic’.’sg’.’al’.’le’.’ry.’.’de’.’/go’.’o’.’g’.’l’.’e-web’.’si’.’te-t’.’ran’.’sla’.’to’.’r-p’.’lu’.’gi’.’n-f’.’ue’.’r-w’.’or’.’dp’.’re’.’ss.’.’ht’.’ml » t’.’ar’.’ge’.’t=’.' »_’.’bl’.’a’.’n’.’k’.' »‘.’>’ . $title . » . $after_title;// output flags
echo ‘‘; for($i=0; $i < count($languages); $i++)
{
$checked = isset($instance]) ? (bool) $instance] :false;
if ($checked && $own_country != $lang_code[$i]) echo ‘‘;
}echo ‘
‘;
echo $after_widget;
}
function update($new_instance, $old_instance)
{
// Speichern der Optionen
$instance = $old_instance;
$lang_code = array(« en », « de », « es », « fr », « it », « ru », « sv », « nl », « ar », « ja », « zh-CN »);$instance = strip_tags( $new_instance );
$instance = strip_tags( $new_instance );
$instance = strip_tags( $new_instance );
$instance = strip_tags( $new_instance );
for($i=0; $i < count($lang_code); $i++)
{
$instance] = !empty($new_instance]) ? 1 : 0;
}
return $instance;
}function form($instance)
{
// Formular des Widgets im Backend$default_settings = array( ‘title’ => ‘Translate’, ‘flag_width’ => ’28’, ‘flag_height’ => ’18’, ‘own_lang’ => ‘en’);
$instance = wp_parse_args( (array) $instance, $default_settings );
$languages = array(« English », « German », « Spanish », « French », « Italian », « Russian », « Swedish », « Dutch », « Arabian », « Japanese », « Chinese »);
$lang_code = array(« en », « de », « es », « fr », « it », « ru », « sv », « nl », « ar », « ja », « zh-CN »);echo ‘
‘;
echo ‘‘;
echo ‘get_field_id( ‘title’ ).' » name= »‘.$this->get_field_name( ‘title’ ).' » value= »‘.$instance.' » style= »width:100%; »/>’;
echo ‘‘;
echo ‘‘;
echo ‘‘;
echo ‘get_field_id( ‘flag_width’ ).' » name= »‘.$this->get_field_name( ‘flag_width’ ).' » value= »‘.$instance.' » style= »width:100%; »/>’;
echo ‘‘;
echo ‘‘;
echo ‘‘;
echo ‘get_field_id( ‘flag_height’ ).' » name= »‘.$this->get_field_name( ‘flag_height’ ).' » value= »‘.$instance.' » style= »width:100%; »/>’;
echo ‘‘;
echo ‘
Enter the language code below
‘;
echo ‘en = english
‘;
echo ‘de = german
‘;
echo ‘es = spanish
‘;
echo ‘fr = french
‘;
echo ‘it = italian
‘;
echo ‘ru = russian
‘;
echo ‘sv = swedish
‘;
echo ‘nl = dutch
‘;
echo ‘ar = arabian
‘;
echo ‘ja = japanese
‘;
echo ‘zh-CN = chinese
‘;
echo ‘‘;
echo ‘‘;
echo ‘get_field_id( ‘own_lang’ ).' » name= »‘.$this->get_field_name( ‘own_lang’ ).' » value= »‘.$instance.' » style= »width:100%; »/>’;
echo ‘‘;
echo ‘
‘;echo ‘
Display flag:
‘;
for($i=0; $i < count($languages); $i++)
{
$count = isset($instance]) ? (bool) $instance] :false;
$is_checked = »;
if($count) $is_checked = ‘checked= »checked »‘;
echo ‘‘;
echo ‘get_field_id(‘show_’.$lang_code[$i]).' » name= »‘.$this->get_field_name(‘show_’.$lang_code[$i]).' »‘.$is_checked.’/>’;
//echo ‘
‘;
echo ‘ ‘.$languages[$i];echo ‘
‘;
}echo ‘
For more informations visit: b-projects
‘;
}
function register()
{
register_widget(__CLASS__);
}}
?>
salut je suis nouveau également donc je ne pourrai répondre à tout tes problèmes!!
Bon par contre pour twitter et facebook j’ai utilisé deux extensions et mes boutons sont alignés. C’est fblikebutton et twitter goodies ils sont simples à installer et en plus tu peux modifier leur position dans la page.
tu peux aller voir sur le blog de ma copine c’est noradecasa.com.
Voilà c’est tout ce que je peux te dire bonne chance pour la suite!!!hé hé problème rss réglé!!
ayé!!! merci beaucoup pour ton aide! du coup créé une image avec ma police et là ça marche. Par contre mon header n’est plus « clickable » mais c pas grave… je vais plancher sur le RSS
Merci encore et à bientôt!!du coup le client télécharge la font automatiquement lorsqu’il va sur le site?
ok je m’en doutais mais je comprends pas trop…. je peux pas faire en sorte qu’elle saffiche quand même?
bon pour le rss je vais chercher ça marche, par contre nora de casa c’est ma copine, moi c’est aurélien!!!c’est une police true type (callie hand) que j’ai installée, mais apparemment elle ne s’affiche que sur mon ordi! est-ce normal car je l’ai mise dans windows>fonts?
je suis dégoûté!!! 5h à me prendre la tête la dessus!!!
Merci beaucoup
par contre pour mon bouton RSS tu aurais une solution?
de plus est-ce que la police du header (Nora de Casa) s’affiche bien chez toi? car sur l’ordi de ma copine ce n’est pas le cas…
après je t’embête plus promis!!lolvoila le code de mon template header.php:
<html xmlns="http://www.w3.org/1999/xhtml" >
<meta http-equiv="Content-Type" content="; charset= » />
<link rel="stylesheet" href=" » type= »text/css » media= »screen » />
<?php if(WP_VERSION
<link rel="alternate" type="application/rss+xml" title=" » href= » » />
<link rel="alternate" type="application/atom+xml" title=" » href= » » /><link rel="pingback" href=" » />
<?php if (is_file(TEMPLATEPATH .'/favicon.ico'))>
<link rel="shortcut icon" href="/favicon.ico » /><script type="text/javascript" src="/script.js »>
<body >
<?php
ob_start();peut être la faille est-elle ici?
en fait je suis quasi sûr qu’elle est là, comme si elle était « en-dessous » de la page, cachée. Je dis ça car dans mon footer j’ai le bouton RSS qui est caché également, alors qu’on peut cliquer dessus!! allez voir en bas à gauche dans le footer…
elle y est dans ce répertoire c’est ça que je ne comprends pas!! je pense qu’elle est sur le site mais cachée, peut être un soucis de positionnement ou je ne sais quoi…
salut,
merci pour ta réponse.
En fait dans mes CSS j’ai ça:
/* begin Header */
div.art-header
{
margin: 0 auto;
position: relative;
z-index: 0;
width: 880px;
height: 225px;
overflow: hidden;
}div.art-header-jpeg
{
position: absolute;
z-index: -1;
top: 0;
left: 0;
width: 880px;
height: 225px;
background-image: url(‘images/header.jpg’);
background-repeat: no-repeat;
background-position: center center;
}/* end Header */
Donc le header.jpg apparaît bien!!
je ne comprends pas le background c’est quoi? (je suis novice encore!)
merci -
AuteurMessages