[Résolu - Solved] Requete banner

Une question, un bug ?
Répondre
weather
Membre
Messages : 92
Inscription : mer. févr. 04, 2009 11:34 am
Contact :

[Résolu - Solved] Requete banner

Message par weather »

Bonjour ou bonsoir... :D

Je viens de modifier un fichier .xml espérant obtenir ceci :

Image

Une fois implémenté et activé, j'obtiens ceci :

Image

Que ce soit par accès aux données via mySQL ou .csv, il semblerait
que les données se chevauchent. Comment faire si possible pour que
GW ne lise que le dernier enregistrement soit mySQL soit .csv :?:

Cela serait sympa pour créer cette bannière pouvant servir dans les
signatures ou ailleurs.

Code source ci-dessous.

Merci pour les avis avisés.

Cordialement @ tous.

-= weather =-
<?xml version="1.0" encoding="iso-8859-15" ?>
- <stylesheet>
<image width="500" height="40" />
- <!-- ================= Image d'arrière plan =================
-->
- <frame width="500" height="40" position-x="0" position-y="0">
<background color="ff0000ff" texture="img_banner.jpg" stretch="1" />
<border cornerradius="12" color="FF555555" thick="1" />
</frame>
- <!-- ================= Stats =================
-->
- <!-- Place
-->
- <textbox width="500" height="40" shadow="0" position-x="10" position-y="0" margin="0">
- <text alignement="left|top" text="Météo : La Turbie, F-06320, Les HMC">
<font color="FF008000" facename="Verdana" size="14" weight="600" italic="0" />
</text>
<background color="00000000" />
</textbox>
- <!-- Date
-->
- <textbox width="500" height="40" shadow="0" position-x="325" position-y="0" margin="0">
- <text alignement="left|top" text="Le : $CurrentDate[ %d-%m-%y à %Hh%M]">
<font color="FF008000" facename="Verdana" size="14" weight="600" italic="0" />
</text>
<background color="00000000" />
</textbox>
- <!-- Wind
-->
- <textbox width="200" height="40" shadow="0" position-x="10" position-y="13" margin="0">
- <text alignement="left|top" text="Vent : $Current[wind_speed] $Unit[Speed] - $Mean[wind_direction]°">
<font color="FF000000" facename="Verdana" size="13" weight="600" italic="0" />
</text>
<background color="00000000" />
</textbox>
- <!-- Temp
-->
- <textbox width="200" height="40" shadow="0" position-x="250" position-y="16" margin="0">
- <text alignement="left|top" text="$Current[outdoor_temperature] $Unit[Temperature]">
<font color="FFFF0000" facename="Verdane" size="22" weight="800" italic="0" />
</text>
<background color="00000000" />
</textbox>
- <!-- Rain
-->
- <textbox width="200" height="40" shadow="0" position-x="390" position-y="13" margin="0">
- <text alignement="left|top" text="Pluie : $Current[relative_rainfall] $Unit[Rainfall]">
<font color="FF0000FF" facename="Verdana" size="13" weight="600" italic="0" />
</text>
<background color="00000000" />
</textbox>
- <!-- Hum Dew
-->
- <textbox width="520" height="40" shadow="0" position-x="10" position-y="25" margin="0">
- <text alignement="left|top" text="Hum : $Current[outdoor_humidity] % - Pt. de rosée : $Current[dew_point] $Unit[Temperature]">
<font color="FF000000" facename="Verdana" size="13" weight="bold" italic="0" />
</text>
<background color="00000000" />
</textbox>
- <!-- Baro
-->
- <textbox width="520" height="40" shadow="0" position-x="355" position-y="25" margin="0">
- <text alignement="left|top" text="Baromètre : $Current[relative_pressure] $Unit[Pressure]">
<font color="FF000000" facename="Verdana" size="13" weight="bold" italic="0" />
</text>
<background color="00000000" />
</textbox>
</stylesheet>
Dernière modification par weather le jeu. févr. 19, 2009 1:17 am, modifié 1 fois.
Image
.......... updated each 30 minutes .........
Logiciels: VWStation: 14.0p87 | GW : 2.0.281b | VWSql : 2.0 | WXsim : ?????
FTPGetter : 3.19.0.83 | StartWatch : 1.1.1.144 | AdvancedTaskScheduler : 1.5b0446
OS: Windows XP SP2 | Station VantagePro 2 ventilée, UV, RadSol, LinkPro IP
Avatar de l’utilisateur
jturlier
Membre
Messages : 3149
Inscription : mar. août 22, 2006 8:38 am
Localisation : 34410 Sérignan - Languedoc
Contact :

Re: Requete banner

Message par jturlier »

Bonjour Weather,
peut-être une question stupide, texture="img_banner.jpg" n'est naturellement pas ton fichier de sortie ?
Il semble que l'image "s'incrémente" et je ne vois pas tellement de moyens de réécrire par dessus une image. Tu utilises les $current donc tu ne peux avoir qu'une valeur (mon opinion !)
Bonne journée
Jean
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"
weather
Membre
Messages : 92
Inscription : mer. févr. 04, 2009 11:34 am
Contact :

Re: Requete banner

Message par weather »

Thank you Mister John,

Etant d'un naturel paresseux, je n'ai fait que reprendre le fichier report.xml de GW et l'ai modifié
à mon gout.

J'ai donc simplement remplacé :
<frame width="440" height="270" position-x="0" position-y="0">
<background color="ff0000ff" texture="img_report1.png" stretch="1" />
<border cornerradius="20" color="FF555555" thick="1" />
</frame>
par : img_banner.jpg

Ce n'est que le background de la "frame" et n'a donc rien à voir avec les données qui sont affichées
par dessus. Enfin, j'espère... :wink:

Merci pour l'aide.

Cordialement @ tous.

-= weather =-
Image
.......... updated each 30 minutes .........
Logiciels: VWStation: 14.0p87 | GW : 2.0.281b | VWSql : 2.0 | WXsim : ?????
FTPGetter : 3.19.0.83 | StartWatch : 1.1.1.144 | AdvancedTaskScheduler : 1.5b0446
OS: Windows XP SP2 | Station VantagePro 2 ventilée, UV, RadSol, LinkPro IP
Avatar de l’utilisateur
jturlier
Membre
Messages : 3149
Inscription : mar. août 22, 2006 8:38 am
Localisation : 34410 Sérignan - Languedoc
Contact :

Re: Requete banner

Message par jturlier »

Le naturel fainéant n'est pas un défaut mais une qualité quand il s'agit de se simplifier la vie.
C'est qd même bizarre ton truc.
Tu as deux images superposées datant l'une du 18 et l'autre du 17/02. Elles n'ont pas la même mise en page : tu utilisais pour l'humidité la même taille de police de caractères, mais celle du 17 était en weight 400 et celle du 18 en 800.
Je ne connais aucun moyen de superposer 2 images sans en prendre une comme fond pour l'autre.
Es-tu sûr que ce ne soit pas le résultat d'une manip ... curieuse ?
Je ne vois pas trop bien comment t'aider sur ce sujet !
Si tu trouves, donne l'explication, même si c'est une erreur ça peut toujours aider.
Jean
weather
Membre
Messages : 92
Inscription : mer. févr. 04, 2009 11:34 am
Contact :

Re: Requete banner

Message par weather »

:evil: Grrrr :evil:

Je suis un vrai schtroumphhhh... :roll:

Si j'avais pris la peine de vérifier mon image de background avant je n'aurais
pas eu à poser ma question stupide.

Problème résolu.

Merci Sir John pour l'aide.

Cordialement @ tous

=- weather =-

Résultat dans la signature en bas. Mise @ jour toutes les 30 minutes.

Script final pour les ceussss que cela intéresse.
<?xml version="1.0" encoding="iso-8859-15" ?>
<stylesheet>
<image width="500" height="40" />
<!-- ================= Image d'arrière plan ================= -->
<frame width="500" height="40" position-x="0" position-y="0">
<background color="ff0000ff" texture="img_banner.jpg" stretch="1" />
<border cornerradius="12" color="FF555555" thick="1" />
</frame>
<!-- ================= Stats ================= -->
<!-- Place -->
<textbox width="500" height="40" shadow="0" position-x="10" position-y="0" margin="0" >
<text alignement="left|top" text="Météo : La Turbie, F-06320, Les HMC">
<font color="FF008000" facename="Verdana" size="14" weight="600" italic="0" />
</text>
<background color="00000000"/>
</textbox>
<!-- Date -->
<textbox width="500" height="40" shadow="0" position-x="325" position-y="0" margin="0" >
<text alignement="left|top" text="Le : $CurrentDate[ %d-%m-%y à %Hh%M]">
<font color="FF008000" facename="Verdana" size="14" weight="600" italic="0" />
</text>
<background color="00000000"/>
</textbox>

<!-- Wind -->
<textbox width="200" height="40" shadow="0" position-x="10" position-y="13" margin="0" >
<text alignement="left|top" text="Vent : $Current[wind_speed] $Unit[Speed] - $Mean[wind_direction]°">
<font color="FF000000" facename="Verdana" size="13" weight="600" italic="0" />
</text>
<background color="00000000"/>
</textbox>
<!-- Temp -->
<textbox width="200" height="40" shadow="0" position-x="255" position-y="16" margin="0" >
<text alignement="left|top" text="$Current[outdoor_temperature] $Unit[Temperature]">
<font color="FFFF0000" facename="Verdane" size="22" weight="800" italic="0" />
</text>
<background color="00000000"/>
</textbox>
<!-- Rain -->
<textbox width="200" height="40" shadow="0" position-x="380" position-y="13" margin="0" >
<text alignement="left|top" text="Pluie : $Current[relative_rainfall] $Unit[Rainfall]" >
<font color="FF0000FF" facename="Verdana" size="13" weight="600" italic="0" />
</text>
<background color="00000000"/>
</textbox>

<!-- Hum Dew -->
<textbox width="520" height="40" shadow="0" position-x="10" position-y="25" margin="0" >
<text alignement="left|top" text="Hum : $Current[outdoor_humidity] % - Pt. de rosée : $Current[dew_point] $Unit[Temperature]">
<font color="FF000000" facename="Verdana" size="13" weight="400" italic="0" />
</text>
<background color="00000000"/>
</textbox>
<!-- Baro -->
<textbox width="520" height="40" shadow="0" position-x="350" position-y="25" margin="0" >
<text alignement="left|top" text="Baromètre : $Current[relative_pressure] $Unit[Pressure]">
<font color="FF000000" facename="Verdana" size="13" weight="400" italic="0" />
</text>
<background color="00000000"/>
</textbox>
</stylesheet>
Image
.......... updated each 30 minutes .........
Logiciels: VWStation: 14.0p87 | GW : 2.0.281b | VWSql : 2.0 | WXsim : ?????
FTPGetter : 3.19.0.83 | StartWatch : 1.1.1.144 | AdvancedTaskScheduler : 1.5b0446
OS: Windows XP SP2 | Station VantagePro 2 ventilée, UV, RadSol, LinkPro IP
Répondre