Seite 1 von 1

Birthday Mod

Verfasst: 16.09.2003 18:04
von Micha1980
Hallo habe immer ein Steinbock im Profil meiner User. Nur neben den Beiträgen wird das richtige Sternzeichen angezeigt.

Habe die Lösung nach langem Warten und verzweifelten Suchen gefunden.

Code: Alles auswählen

#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// Generate page 

# 
#-----[ BEFORE, ADD ]--------------------------------- 
# 
// Birthday Zodiac Mod 
if ( $profiledata['user_birthday'] != 999999 ) 
{ 
   $user_birthdate = realdate('md', $profiledata['user_birthday']); 
   $i = 0; 
   while ($i<26) 
   { 
      if ($user_birthdate >= $zodiacdates[$n] & $user_birthdate <= $zodiacdates[$i+1]) 
      { 
         $zodiac = $lang[$zodiacs[($i/2)]]; 
         $u_zodiac = $images[$zodiacs[($i/2)]]; 
         $zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="top" border="0" />'; 
         $i = 26; 
      } else 
      { 
         $i = $i+2; 
      } 
   } 
} 
// END: Birthday Zodiac Mod 
// Birthday Chinese Zodiac Mod 
if ( $profiledata['user_birthday'] != 999999 ) 
{ 
   include($phpbb_root_path . 'includes/chinese.'.$phpEx); 
   $chinese = get_chinese_year( realdate('Ymd', $profiledata['user_birthday']) ); 
   $u_chinese = $images[$chinese]; 
   $chinese_img = ($chinese == 'Unknown') ? '' : '<img src="' . $u_chinese . '" alt="' . $lang[$chinese] . '" title="' . $lang[$chinese] . '" align="top" border="0" />'; 
} 
// END: Birthday Chinese Zodiac Mod
Und den alten Code selbstverständlich wechmachen.


MfG Micha

Verfasst: 29.09.2003 19:37
von Micha1980
:D So hab endlich.............


MfG Micha

Verfasst: 26.10.2003 19:17
von OderMalSo
Danke für den Tipp. :)

Aber bei mir wurde dann das Sternzeichen korregt angezeigt, dafür fehlte dann das Geburtsdatum. Hab es wie folgt hinbekommen.

Code: Alles auswählen

#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#
// Birthday Zodiac Mod
if ( $profiledata['user_birthday'] != 999999 )
{
   $user_birthdate = realdate('md', $profiledata['user_birthday']);
   $i = 0;
   while ($i<26)
   {
      if ($user_birthdate >= $zodiacdates[$n] & $user_birthdate <= $zodiacdates[$i+1])
      {
         $zodiac = $lang[$zodiacs[($i/2)]];
         $u_zodiac = $images[$zodiacs[($i/2)]];
         $zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="top" border="0" />';
         $i = 26;
      } else
      {
         $i = $i+2;
      }
   }
}
// END: Birthday Zodiac Mod

#
#-----[ REPLACE WITH ]---------------------------------
#
// Birthday Zodiac Mod
if ( $profiledata['user_birthday'] != 999999 )
{
   $user_birthdate = realdate('md', $profiledata['user_birthday']);
   $i = 0;
   while ($i<26)
   {
      if ($user_birthdate >= $zodiacdates[$n] & $user_birthdate <= $zodiacdates[$i+1])
      {
         $zodiac = $lang[$zodiacs[($i/2)]];
         $u_zodiac = $images[$zodiacs[($i/2)]];
         $zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="top" border="0" />';

         $i = 26;
      } else
      {
         $i = $i+2;
      }
   }
	$user_birthday = realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']);
} else
{
	 $user_birthday = $lang['No_birthday_specify'];
}
// END: Birthday Zodiac Mod

 
Grüssle
OderMalSo