www.webfan.de -> Die Geburtstagstorte wird bei mir nicht angezeigt.
Habe versuche den Block zu modifizieren, aus
$content .= "".mxCreateImage('images/birthday.gif',_BIRTHDAYHAPPY)."<br><br>";
habe ich
$content .= "<br><img src=\"images/maaxon/tcake.gif\" width=\"27\" height=\"27\" alt=\"Happy Birthday\" border=\"0\"><br>";
gemacht.
Das Resultat ist stets das selbe: Wie von Zauberhand wird der img Tag vom PragmaMx gelöscht (wie man am Quelltext der Seite sieht) :gruebel:
Wollte mir das gerade mal anschauen, aber leider steht da:
Heute haben keine Benutzer Geburtstag! :BD:
Müssen wir wohl bis morgen warten. :morning:
OK. Ich lasse User "TEST" heute Geburtstag haben, dann kann mans sehen.
Du willst also die Torte mit Kerze haben anstatt das birthday.gif oder soll die Torte vor jedem Namen?
Wenn ich deinen
$content .= "<br><img src=\"images/maaxon/tcake.gif\" width=\"27\" height=\"27\" alt=\"Happy Birthday\" border=\"0\"><br>";
verwende bekomme ich einen Parse error. Das wird wohl daran liegen das <img src ja auf ein bestehendes Bild hinweist was in einer html Seite eingebunden ist.
So kann ich dir einfach nicht helfen. Ich wollte das ganze eben mal selber auf xampp testen.
ZitatDu willst also die Torte mit Kerze haben anstatt das birthday.gif oder soll die Torte vor jedem Namen?
Also es soll unter der gesamten Liste EINE Torte erscheinen. Ich vergaß zu erwähnen: Hier im Adminmenue unter Block bearbeiten erscheint die Torte admin.php?op=BlocksEdit&bid=23 (kann ich natürlich jetzt nicht zeigen)
Zitatverwende bekomme ich einen Parse error. Das wird wohl daran liegen das <img src ja auf ein bestehendes Bild hinweist was in einer html Seite eingebunden ist.
Sorry, das versteh ich nun gar nicht, ich bekomme keinen Parse Error, was Du damit meinstz woran es liegt verstehe ich nicht, "auf ein bestehendes Bild hinweist"? - Was meinst Du damit?
Zitat
So kann ich dir einfach nicht helfen. Ich wollte das ganze eben mal selber auf xampp testen.
Welche Informationen fehlen Dir nmoch damit Du mir helfen kannst?
Ich poste jetzt mal den gesamten Blockcode, also nochmal: Im Admin funktioniert (UTorte erscheint), auf der Seite wird das img Tag "gekillt".
<?php
/************************************
pragmaMx Content Management System
Copyright (c) 2005 pragmaMx Dev Team - http://pragmaMx.org
***********************************
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.
***********************************
$Source: /home/cvs/pragmamx/stable/blocks/block-Birthday_2.php,v $
$Revision: 1.4 $
$Author: tora60 $
$Date: 2005/08/30 07:07:30 $
************************************/
/* developed by: */
/* BowlingX & Andi */
/**********************************************************************/
# listet alle User auf die HEUTE Geburtstag haben!
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
global $user_prefix;
$mxblockcache = TRUE;
$blockheigth = 100;
$sql = "SELECT uname, (YEAR( CURRENT_DATE ) - YEAR( user_bday )) - ( RIGHT( CURRENT_DATE, 5 ) < RIGHT( user_bday, 5 ) ) AS user_age FROM ${user_prefix}_users WHERE MONTH(user_bday)=MONTH(CURRENT_DATE) AND DAYOFMONTH(user_bday)=DAYOFMONTH(CURRENT_DATE) AND YEAR(user_bday)<YEAR(CURRENT_DATE) AND user_stat=1 ORDER BY user_age DESC;";
$result = sql_query($sql);
$counter = 0;
$list = "";
while (list($uname, $user_age) = sql_fetch_row($result)) {
$list .= "<div style=\"text-indent: -8px; margin-left: 8px;\"><strong><big>·</big></strong> <b><a href=\"modules.php?name=Userinfo&uname=".$uname."\">".$uname."</a></b>: ".$user_age." "._BIRTHDAYYEARS." </div>";
$counter++;
}
$content = '';
if($counter > 0){
//$content .= ""._USERSBIRTHDAY."<br>";
$content .= 'Folgende Benutzer haben heute Geburtstag:<br>';
$content .= ($blockheigth == 0 || $counter <= 5) ? "<div class='boxcontent'>".$list."</div>" : "<div class='boxcontent' style=\"height: ".$blockheigth."px; overflow : auto;\">".$list."</div>";
$content .= "<br><img src=\"images/maaxon/tcake.gif\" width=\"27\" height=\"27\" alt=\"Happy Birthday\" border=\"0\"><br>";
//$content .= "<br>".mxCreateImage('images/maaxon/tcake.gif',_BIRTHDAYHAPPY)."<br>";
$content .= "<b>Herzlichen Glückwunsch und alles Gute!</b><br><br>";
/*
$content .= ($blockheigth == 0 || $counter <= 5) ? "<div class='boxcontent'>".$list."</div>" : "<div class='boxcontent' style=\"height: ".$blockheigth."px; overflow : auto;\">".$list."</div>";
*/
}
else{
$content .= _NOBIRTHDAYS;
}
?>
Soll das wie im Anhang aussehen?
Ich hab es einmal auf meinem Xampp und dann meiner Webseite getestet.
Ja, so inetwa. Hab auch mal ein Bild gemacht, so sieht der Block bei mir im Adminmenü aus unter Block bearbeiten, und so sollte es auch auf der Seite saein, dort wird jedoch das img Tag gekillt.
mfg
Ich habe aus deinem Block mal den Code in meinem Block integriert.
<?php
/**
* This file is part of
* pragmaMx - Web Content Management System.
* Copyright by pragmaMx Developer Team - http://www.pragmamx.org
*
* pragmaMx 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 3 of the License, or
* (at your option) any later version.
*
* $Revision: 1.9.6.1 $
* $Author: tora60 $
* $Date: 2009/03/06 03:32:49 $
*/
defined('mxMainFileLoaded') or die('access denied');
global $user_prefix;
$mxblockcache = true;
$blockheigth = 100;
$sql = "SELECT uname, (YEAR( CURRENT_DATE ) - YEAR( user_bday )) - ( RIGHT( CURRENT_DATE, 5 ) < RIGHT( user_bday, 5 ) ) AS user_age FROM ${user_prefix}_users WHERE MONTH(user_bday)=MONTH(CURRENT_DATE) AND DAYOFMONTH(user_bday)=DAYOFMONTH(CURRENT_DATE) AND YEAR(user_bday)<YEAR(CURRENT_DATE) AND user_stat=1 ORDER BY user_age DESC;";
$result = sql_query($sql);
$counter = 0;
$list = '';
while (list($uname, $user_age) = sql_fetch_row($result)) {
$list .= '<li>' . mxCreateUserprofileLink($uname) . ': ' . $user_age . ' ' . _BIRTHDAYYEARS . '</li>';
$counter++;
}
$content = '';
if($counter > 0){
//$content .= ""._USERSBIRTHDAY."<br>";
$content .= 'Folgende Benutzer haben heute Geburtstag:<br>';
$content .= ($blockheigth == 0 || $counter <= 5) ? "<div class='boxcontent'>".$list."</div>" : "<div class='boxcontent' style=\"height: ".$blockheigth."px; overflow : auto;\">".$list."</div>";
$content .= "<br><img src=\"images/maaxon/tcake.gif\" width=\"27\" height=\"27\" alt=\"Happy Birthday\" border=\"0\"><br>";
//$content .= "<br>".mxCreateImage('images/maaxon/tcake.gif',_BIRTHDAYHAPPY)."<br>";
$content .= "<b>Herzlichen Glückwunsch und alles Gute!</b><br><br>";}
?>
Probiere mal meinen Code bitte aus.
Die Funktion mxCreateUserprofileLink führt bei mirn zu einem Fehler (habe auf der betreffenden Seite noch die 9er laufen)
Habe also nur diese eine Funktion enrfernt und sonst Deinen Code übernommen:
<?php
/**
* This file is part of
* pragmaMx - Web Content Management System.
* Copyright by pragmaMx Developer Team - http://www.pragmamx.org
*
* pragmaMx 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 3 of the License, or
* (at your option) any later version.
*
* $Revision: 1.9.6.1 $
* $Author: tora60 $
* $Date: 2009/03/06 03:32:49 $
*/
defined('mxMainFileLoaded') or die('access denied');
global $user_prefix;
$mxblockcache = true;
$blockheigth = 100;
$sql = "SELECT uname, (YEAR( CURRENT_DATE ) - YEAR( user_bday )) - ( RIGHT( CURRENT_DATE, 5 ) < RIGHT( user_bday, 5 ) ) AS user_age FROM ${user_prefix}_users WHERE MONTH(user_bday)=MONTH(CURRENT_DATE) AND DAYOFMONTH(user_bday)=DAYOFMONTH(CURRENT_DATE) AND YEAR(user_bday)<YEAR(CURRENT_DATE) AND user_stat=1 ORDER BY user_age DESC;";
$result = sql_query($sql);
$counter = 0;
$list = '';
while (list($uname, $user_age) = sql_fetch_row($result)) {
$list .= '<li>' .$uname . ': ' . $user_age . ' ' . _BIRTHDAYYEARS . '</li>';
$counter++;
}
$content = '';
if($counter > 0){
//$content .= ""._USERSBIRTHDAY."<br>";
$content .= 'Folgende Benutzer haben heute Geburtstag:<br>';
$content .= ($blockheigth == 0 || $counter <= 5) ? "<div class='boxcontent'>".$list."</div>" : "<div class='boxcontent' style=\"height: ".$blockheigth."px; overflow : auto;\">".$list."</div>";
$content .= "<br><img src=\"images/maaxon/tcake.gif\" width=\"27\" height=\"27\" alt=\"Happy Birthday\" border=\"0\"><br>";
//$content .= "<br>".mxCreateImage('images/maaxon/tcake.gif',_BIRTHDAYHAPPY)."<br>";
$content .= "<b>Herzlichen Glückwunsch und alles Gute!</b><br><br>";}
?>
Das REsultat ist das gleiche: Im Adminmenü erscheint die Torte, auf der Seite nicht :'(
Ich habe auf meinem xampp mal eben die Version 1.1.10 lauffähig gemacht und nun sehe ich das selbe wie du auch.
Mit etwas Zeit verbunden werde ich mir nun das ganze mal genauer Rein ziehen. ;)
Hallo Webfan, :smile:
hast du es schon mal mit
$content .= "<br>". mxCreateImage('images/maaxon/tcake.gif', _BIRTHDAYHAPPY) . "<br>";
versucht?
GerhardSt, das ist doch die ursprüngliche Zeile die ich auskommentiert habe weil sie nicht funzt.
Habe für Dich nochmal die Zeile aus Deinem Post kopiert (extra kopiert obwohl die Zeilen gleich sind :mad2: ), das Ergebnis ist das gleiche, es ist zum verrückt werden. :'(
Zitat von: GerhardSt in 30 September 2009, 15:20:43
Hallo Webfan, :smile:
hast du es schon mal mit
$content .= "<br>". mxCreateImage('images/maaxon/tcake.gif', _BIRTHDAYHAPPY) . "<br>";
versucht?
Habe ich gerade versucht funktioniert jedoch nicht.
@webfan
Folgenden Code benutzen.
<?php
/************************************
pragmaMx Content Management System
Copyright (c) 2005 pragmaMx Dev Team - http://pragmaMx.org
***********************************
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.
***********************************
$Source: /home/cvs/pragmamx/stable/blocks/block-Birthday_2.php,v $
$Revision: 1.4 $
$Author: tora60 $
$Date: 2005/08/30 07:07:30 $
************************************/
/* developed by: */
/* BowlingX & Andi */
/**********************************************************************/
# listet alle User auf die HEUTE Geburtstag haben!
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
global $user_prefix;
$mxblockcache = TRUE;
$blockheigth = 100;
$sql = "SELECT uname, (YEAR( CURRENT_DATE ) - YEAR( user_bday )) - ( RIGHT( CURRENT_DATE, 5 ) < RIGHT( user_bday, 5 ) ) AS user_age FROM ${user_prefix}_users WHERE MONTH(user_bday)=MONTH(CURRENT_DATE) AND DAYOFMONTH(user_bday)=DAYOFMONTH(CURRENT_DATE) AND YEAR(user_bday)<YEAR(CURRENT_DATE) AND user_stat=1 ORDER BY user_age DESC;";
$result = sql_query($sql);
$counter = 0;
$list = "";
while (list($uname, $user_age) = sql_fetch_row($result)) {
$list .= "<div style=\"text-indent: -8px; margin-left: 8px;\"><strong><big>·</big></strong> <b><a href=\"modules.php?name=Userinfo&uname=".$uname."\">".$uname."</a></b>: ".$user_age." "._BIRTHDAYYEARS." </div>";
$counter++;
}
$content = '';
if($counter) {
//$content .= ""._USERSBIRTHDAY."<br>";
$content .= 'Folgende Benutzer haben heute Geburtstag:<br>';
$content .= ($blockheigth == 0 || $counter <= 5) ? "<div class='boxcontent'>".$list."</div>" : "<div class='boxcontent' style=\"height: ".$blockheigth."px; overflow : auto;\">".$list."</div>";
$content .= "<br><img src=\"images/tcake.gif\" width=\"27\" height=\"27\" alt=\"Happy Birthday\" border=\"0\"><br>";
//$content .= "<br>".mxCreateImage('images/maaxon/tcake.gif',_BIRTHDAYHAPPY)."<br>";
$content .= "<b>Herzlichen Glückwunsch und alles Gute!</b><br><br>";
/*
$content .= ($blockheigth == 0 || $counter <= 5) ? "<div class='boxcontent'>".$list."</div>" : "<div class='boxcontent' style=\"height: ".$blockheigth."px; overflow : auto;\">".$list."</div>";
*/
}
else{
$content .= _NOBIRTHDAYS;
}
?>
Das tcake.gif in den Ordner images kopieren und dann funktioniert es auch. ;)
Hi
Ich habs gerade mal getestet. Die Grafik mit der Torte aus dem Ordner "Maxxon" in den Ordner "Images" verschieben und in "birthday.gif" umbenennen. Das ist alles.
Gruß
martin b
@pater1971: Ahhh. Danke!!! Jetzt funktioniert es. :)
Moin :)
nur so nebenbei...
http://www.webfan.de/
Zitat<meta name="generator" content="pragmaMx 0.1.9 - by http://pragmaMx.org">
:thumbdown: