Seite 1 von 1

Wer hat den Birthday in viewtopic MOD schon eingebaut?

Verfasst: 13.12.2005 21:14
von extralarge
Nennt sich: add_birthday_cake
##############################################################
## MOD Title: ADD ON: Birthday in viewtopic.php
## MOD Author: CBACK < webmaster@cback.de > (Christian Knerr) http://www.community.cback.de
## MOD Description: Dieser MOD erweitert den Geburtstagsmod von
## mods.db9.dk mit einer kleinen Anzeige in der
## Viewtopic-Benutzerreihe, wenn ein Benutzer geburtstag
## hat. Dabei wird dann ein kleiner Kuchen neben dem ICQ
## Button angezeigt.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: 2
## templates/subSilver/viewtopic_body.tpl
## viewtopic.php
## Included Files: birthdaycake.gif
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes:
##
## Dieser MOD wurde getestet und erstellt für CBACK phpBB Orion und dient lediglich als ADD
## ON für den Birthday Hack von Niels.
##
## Wenn Du ein anderes Template als subSilver verwendest musst Du bei der Änderung in
## der viewtopic.php diese Zeile
##
## $gebbild = '<img src="templates/subSilver/images/birthdaycake.gif"
##
## anpassen indem Du subSilver mit Deinem Templateordner ersetzt.
##
##############################################################
## MOD History:
##
## 2005-03-31 - Version 1.0.0
## - Erstes Release
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php


#
#-----[ FIND ]------------------------------------------
#
// Start add - Birthday MOD
if ( $postrow[$i]['user_birthday'] != 999999 )
{
$poster_birthdate=realdate('md', $postrow[$i]['user_birthday']);
$poster_age = $this_year - realdate ('Y',$postrow[$i]['user_birthday']);
if ($this_date < $poster_birthdate) $poster_age--;
$poster_age = $lang['Age'] . ': ' . $poster_age;
} else
{
$poster_age = '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$poster_birthdate = '';

#
#-----[ FIND ]------------------------------------------
#
# Directly under the line you last edited! - Direkt unter der Zeile die Du vorher bearbeitet hast
#

}


#
#-----[ AFTER, ADD ]------------------------------------------
#

if ($this_date == $poster_birthdate)
{
$gebbild = '<img src="templates/subSilver/images/birthdaycake.gif" border="0" alt="Happy Birthday" title="Happy Birthday">';
}
else
{
$gebbild = ' ';
}



#
#-----[ FIND ]------------------------------------------
#
// Start add - Birthday MOD
'POSTER_AGE' => $poster_age,


#
#-----[ AFTER, ADD ]------------------------------------------
#
'GEB_BILD' => $gebbild,



#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl



#
#-----[ FIND ]------------------------------------------
#
<td valign="bottom" nowrap="nowrap" class="{postrow.ROW_CLASS}">{postrow.POSTER_ONLINE}{postrow.PROFILE_IMG}{postrow.PM_IMG}{postrow.EMAIL_IMG}{postrow.WWW_IMG}{postrow.AIM_IMG}{postrow.YIM_IMG}{postrow.MSN_IMG}{postrow.ICQ_IMG}</td>



#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.ICQ_IMG}



#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
&nbsp;&nbsp;&nbsp;&nbsp;{postrow.GEB_BILD}



#
#-----[ COPY ]------------------------------------------
#
birthdaycake.gif > templates/subSilver/images/birthdaycake.gif


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
#
# This MOD was created with: CBACK MIRO ModEditor (http://www.community.cback.de)
Kann:
#
#-----[ FIND ]------------------------------------------
#
<td valign="bottom" nowrap="nowrap" class="{postrow.ROW_CLASS}">{postrow.POSTER_ONLINE}{postrow.PROFILE_IMG}{postrow.PM_IMG}{postrow.EMAIL_IMG}{postrow.WWW_IMG}{postrow.AIM_IMG}{postrow.YIM_IMG}{postrow.MSN_IMG}{postrow.ICQ_IMG}</td>



#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.ICQ_IMG}



#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
&nbsp;&nbsp;&nbsp;&nbsp;{postrow.GEB_BILD}
nicht wirklich finden.

Finde zwar dreimal
{postrow.ICQ_IMG}
aber wo genau soll ich es einfügen?

Bei mir schaut das so aus:
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
document.write(' {postrow.ICQ_IMG}');
else
document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');

//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
</tr>
</table></td>
</tr>
<tr>
Danke für Eure Hilfe!

Verfasst: 14.12.2005 09:56
von Julian87
Hi,

fndest du das wirklich nicht? Verlink mal bitte deine templates/subSilver/viewtopic_body.tpl. Als .txt Datei

Julian

Verfasst: 14.12.2005 21:05
von extralarge
Servus!

Was ist mit Deinem Apfel passiert ;-)

Habe einen Testuser angelegt, mit Geburtstag heute, nur hat mein Popupstopper natürlich das Popup gestoppt (wie es ja auch sein soll).

Hab' jetzt das Geburtstagsdatum auf morgen geändert, muss dann kontrollieren, ob es funktioniert.

Finde die {postrow.ICQ_IMG} nur dreimal in dem kleinem Teil, den ich oben schon gepostet habe (und hab's dann nach dem zweitem {postrow.ICQ_IMG} eingefügt - schaut noch so am ehersten aus!).

Aber noch 'ne Frage, was zum T..fel ist die "Viewtopic-Benutzerreihe" wo der MOD ja neben dem ICQ Button angezeigt werden soll?

Fragen über Fragen!

Danke für Deine Hilfe!

P.S.: Hast Du zufällig auch Erfahrung mit dem "chatbox_mod"? Oder gibt es einen Chat den man (also in dem Fall ich NOOB) im 2.0.18 OHNE Probleme einbauen kann?