Menü

Login

Aktuelle Version

Forum > CBOX: Geburtstag *

DOTLAN Intranet / Portal >> Konfiguration, Erweiterungen, Addons > CBOX: Geburtstag
Antwort erstellen
Autor Thema: CBOX: Geburtstag
Griffon
07.01.2005 um 04:20 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

Folgende Zeilen in die html/styles/<stylename>.php einbauen um die aktuellen Geburtstage anzuzeigen. Die Box wird nur dargestellt wenn Geburtstagskinder vorhanden sind.

Code:
# /www/html/styles/default.php

global $USER, $S, $DB, $rightbox;
$birthday = "";
$all = $DB->query_all("
SELECT id, nick, YEAR(NOW())-YEAR(geb) AS old
FROM user
WHERE
ver_email > 0 AND
DATE_FORMAT(geb,'%m-%d')=DATE_FORMAT(NOW(),'%m-%d')
");
if(is_array($all) && count($all)) {
foreach($all AS $bday)
$birthday .= "<li><a href=\"".$S->link(sprintf($USER->link['userdetails'],$bday['id']))."\">".htmlentities($bday['nick'])."</a> (".intval($bday['old']).")</li>";
$rightbox[] = array(FALSE,'Heute haben Geburtstag:',$birthday,TRUE);
}


[Editiert von Griffon am 21.Nov.2005 um 13:46]
 
haenno
21.11.2005 um 09:39 QuoteProfileSend PM
NEW

Clan: Kein Clan
Postings: 210

Inaktive User sind drin Ich finde hier alles was inaktiv ist^^

Code:
$all = $DB->query_all("
SELECT id, nick, YEAR(NOW())-YEAR(geb) AS old
FROM user
WHERE
ver_email > 0 AND
DATE_FORMAT(geb,'%m-%d')=DATE_FORMAT(NOW(),'%m-%d')
");

// by griffon
größer 0 == aktive Nutzer. Nutzer mit ver_email < 0 sind gelöscht

[Editiert von Griffon am 21.Nov.2005 um 13:46]
 
X-R4Y
05.10.2006 um 16:18 QuoteProfileSend PM
NEW

Clan: Terrors of Time
Postings: 57

Bloodrayne
Kann man das ganze auch templatebasiert erstellen? Wenn ja, wie?

__________________
if ( $ahnung == 'keine' ) { lies ( FAQ ) && suche ( Forum | Archiv | Suche ) }
if ( $antwort == 0 ) { post->frage }

 
Griffon
05.10.2006 um 20:36 QuoteProfileSend PM

NEW

Clan: dotlan.net
Postings: 1252

warum nicht. Es hindert dich ja nicht dran, die Geburtstagsliste vorher in ein Template zu packen und dann in die Box.

Und ehe du fragst. Ich würde diese Geburtstagsliste mit CSS formatieren und bunt machen und nicht via HTML. Das kannst du ja dann in jeder CSS Datei machen und musst nicht am template bei jedem Layout rum fummeln.
 
[ Antwort erstellen ]