Lynx
Пользователь
MOD Title: Birthday Cake (Birthday MOD add-on)
MOD Author: evil3 < [email protected] > (Igor Wiedler)
Adapted for TorrentPier R775 modern by Demetri (Dmitrit Y. Mayer)
Adapted for TorrentPier II by Lynx
MOD Description: Display a birthday cake in viewtopic if the user has birthday.
Installation Level: Easy
Installation Time: ~3-5 Minutes
Files To Edit:
## viewtopic.php
## templates/default/tpl_config.php
## language/lang_russian/lang_main.php
## language/lang_english/lang_main.php
## templates/default/viewtopic.tpl
Included Files:
## templates/default/images/icon_birthday.gif
License: GNU General Public License v2
Поскольку мод даты рождения встроен в движок, установка данного мода не требует дополнительных условий.
#
#-----[ COPY ]---------------------------------------------
#
icon_birthday.gif to templates/default/images/icon_birthday.gif
#
#-----[ OPEN ]---------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]---------------------------------------------
#
#
#-----[ AFTER, ADD ]---------------------------------------------
#
#
#-----[ FIND ]---------------------------------------------
#
#
#-----[ AFTER, ADD ]---------------------------------------------
#
#
#-----[ OPEN ]---------------------------------------------
#
templates/default/tpl_config.php
#
#-----[ FIND ]---------------------------------------------
#
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_russian/lang_main.php
#
#-----[ FIND ]---------------------------------------------
?>
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]---------------------------------------------
?>
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
#
#-----[ OPEN ]---------------------------------------------
#
templates/default/viewtopic.tpl
#
#-----[ FIND ]---------------------------------------------
#
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
EoM
MOD Author: evil3 < [email protected] > (Igor Wiedler)
Adapted for TorrentPier R775 modern by Demetri (Dmitrit Y. Mayer)
Adapted for TorrentPier II by Lynx
MOD Description: Display a birthday cake in viewtopic if the user has birthday.
Installation Level: Easy
Installation Time: ~3-5 Minutes
Files To Edit:
## viewtopic.php
## templates/default/tpl_config.php
## language/lang_russian/lang_main.php
## language/lang_english/lang_main.php
## templates/default/viewtopic.tpl
Included Files:
## templates/default/images/icon_birthday.gif
License: GNU General Public License v2
Поскольку мод даты рождения встроен в движок, установка данного мода не требует дополнительных условий.
#
#-----[ COPY ]---------------------------------------------
#
icon_birthday.gif to templates/default/images/icon_birthday.gif
#
#-----[ OPEN ]---------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]---------------------------------------------
#
PHP:
//
// Generate ranks, set them to empty string initially.
//
$poster_rank = $rank_image = '';
$gender_image = '';
#-----[ AFTER, ADD ]---------------------------------------------
#
PHP:
// Birthday Cake
$poster_birthdate = '';
// Birthday Cake [END]
#-----[ FIND ]---------------------------------------------
#
PHP:
'POSTER_NAME' => profile_url(array('username' => $poster, 'user_rank' => $user_rank)),
#-----[ AFTER, ADD ]---------------------------------------------
#
PHP:
// Birthday Cake
'BIRTHDAY_TODAY' => (isset($poster_birthdate)) ? (($this_date == $poster_birthdate) ? true : false ) : false,
'BIRTHDAY_CAKE_IMG' => '<img src="' . $images['icon_birthday'] . '" alt="' . $lang['Birthday_Cake'] . '" title="' . $lang['Birthday_Cake'] . '" align="top" border="0" />',
'L_BIRTHDAY_TODAY' => $lang['Birthday_Cake'],
// Birthday Cake [END]
#-----[ OPEN ]---------------------------------------------
#
templates/default/tpl_config.php
#
#-----[ FIND ]---------------------------------------------
#
PHP:
// post_buttons
$images['icon_quote'] = $_lang .'icon_quote.gif';
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
PHP:
// Birthday Cake
$images['icon_birthday'] = $_main .'icon_birthday.gif';
// Birthday Cake [END]
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_russian/lang_main.php
#
#-----[ FIND ]---------------------------------------------
?>
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
PHP:
//
// Birthday Cake
//
$lang['Birthday_Cake'] = 'С Днем Рождения!';
//
// Birthday Cake [END]
//
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]---------------------------------------------
?>
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
PHP:
//
// Birthday Cake
//
$lang['Birthday_Cake'] = 'Happy Birthday!';
//
// Birthday Cake [END]
//
#-----[ OPEN ]---------------------------------------------
#
templates/default/viewtopic.tpl
#
#-----[ FIND ]---------------------------------------------
#
HTML:
<p><img src="{SPACER}" width="{TOPIC_LEFT_COL_SPACER_WITDH}" height="<!-- IF postrow.POSTER_AVATAR || postrow.RANK_IMAGE -->2<!-- ELSE -->30<!-- ENDIF -->" border="0" alt="" /></p>
#-----[ BEFORE, ADD ]---------------------------------------------
#
HTML:
<!-- Birthday Cake -->
<!-- IF postrow.BIRTHDAY_TODAY --><center><br /><br /><p class="birthdaycake">{postrow.BIRTHDAY_CAKE_IMG}<br>{postrow.L_BIRTHDAY_TODAY}<br /></p></center><!-- ENDIF -->
<!-- Birthday Cake [END] -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
EoM