PhpBB-Power Communauté francophone de support et de mods pour phpBB
|
| Voir le sujet précédent :: Voir le sujet suivant |
| Auteur |
Message |
Darkenshin Membres actifs

Inscrit le: 23 Déc 2004 Messages: 601
|
Posté le: Jeu 03 Mar 2005 à 20:59 Sujet du message: [Addon] Color group in Birhday |
|
|
| Code: | ## EasyMod 0.1.13 compliant
########################################################
## MOD Title: Addon Color group to Birhday
## MOD Author: Oyo (n/a) http://www.u-web.org/
## MOD Description: Ajoute la couleur des utilisateurs dans la liste des anniversaires
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit 1
## index.php
## Included Files: (n/a)
########################################################
##
## Version History:
## 3/03/2005 - first addon release
##
########################################################
## Author Notes:
##
## Cette install requière le mod birthday et Color Group
##
########################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
########################################################
## 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 MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
###############################################
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------------
#
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
#
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$style_color = color_group_colorize_name($birthdayrow['user_id']);
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .' ('.$user_age.')</a>,';
#
#-----[ FIND ]------------------------------------------------
#
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
#
#-----[ REPLACE WITH ]------------------------------------------------
#
$style_color = color_group_colorize_name($birthdayrow['user_id']);
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .' ('.$user_age.')</a>,';
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM |
_________________ Pas de support par MP ¦ MSN ¦ Mail ¦ Skype ¦ Téléphone ¦ Courrier Postal...

Dernière édition par Darkenshin le Mer 02 Avr 2008 à 14:31; édité 2 fois |
|
| Revenir en haut de page |
|
 |
Gernouille Esprit servant
Inscrit le: 28 Déc 2004 Messages: 156
|
Posté le: Sam 05 Mar 2005 à 22:56 Sujet du message: |
|
|
Slt
Je ne trouve pas ces lignes?  |
|
| Revenir en haut de page |
|
 |
Darkenshin Membres actifs

Inscrit le: 23 Déc 2004 Messages: 601
|
Posté le: Dim 06 Mar 2005 à 0:12 Sujet du message: |
|
|
interessant... tu peux m'expliquer comme ça s'affiche sur ton index ?
tu es obligé d'avoir ses ligne sinon cela n'afficherai pas le nom et l'age sur ton index si deplus je te fait une citation de l'install du mod de Niels (élaguer au niveau de l'historique).
| Code: |
##############################################################
## MOD Title: Birthday
## MOD Author: Niels < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
## MOD Description: This mod will add a birthday field into your
## user's profile and make users age viewable
## to others when viewing posts.
## MOD Version: 1.5.6
## Compatibility: 2.0.13
##
## Installation Level: Advanced
## Installation Time: 30 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit: 18
## index.php
## viewtopic.php
## admin/admin_board.php
## admin/admin_users.php
## includes/functions.php
## includes/page_header.php
## includes/usercp_avatar.php
## includes/usercp_register.php
## includes/usercp_viewprofile.php
## language/lang_english/lang_admin.php
## language/lang_english/lang_main.php
## language/lang_french/lang_admin.php
## language/lang_french/lang_main.php
## templates/subSilver/index_body.tpl
## templates/subSilver/overall_header.tpl
## templates/subSilver/profile_add_body.tpl
## templates/subSilver/profile_view_body.tpl
## templates/subSilver/viewtopic_body.tpl
## templates/subSilver/admin/board_config_body.tpl
## templates/subSilver/admin/user_edit_body.tpl
##
## Included Files: 3
## birthday_db_update.php
## root/birthday_popup.php
## root/templates/subSilver/greeting_popup.tpl
##
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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 MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## 1. Full MOD description
## -----------
## This mod will add a birthday field into your user's profile
## and make users age viewable to others when viewing posts.
## Users who not specify a birthday, the script will default
## to "None Specified."
## At the day of the users birthday (next visit) the board can
## be configured to display a birthday greeting .
##
## 2. EasyMOD
## -----------
## This MOD is compatible and can be installed by EasyMOD
## of Nuttzy (but is not officially EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## However, on alpha releases of EM and meanwhile beta or
## final release some actions are NOT performed.
## You'll have to do them manually !
##
## 2.1 SQL commands are not performed
## -----------
## This MOD need a database update.
## Then, in any case if you install this MOD manually or using
## an alpha release of EM, please copying the *_db_update.php
## in your phpBB root directory, run it with your navigator,
## and then delete it from the phpBB root directory.
##
## Please, do it NOW! Before editing phpBB files by EM or manually!!!
## Otherwise, you may have an error message during your next
## connection.
##
## 2.2 Translation are not managed
## -----------
## Moreover, EM can not already manage actions for any other
## language than English (but language intructions are proceed
## to all installed languages in order to prevent errors).
## So the translations provided with this MOD must be installed
## manually if you need them.
##
## 3. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://mods.db9.dk/viewtopic.php?t=6
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------------
#
copy birthday_db_update.php to birthday_db_update.php
copy root/birthday_popup.php to birthday_popup.php
copy root/templates/subSilver/greeting_popup.tpl to templates/subSilver/greeting_popup.tpl
#
# This MOD need a database update.
# Then, as you must have now copied the birthday_db_update.php file
# in your phpBB root directory, run it with your navigator...
# http://www.yourWebSite.xxx/phpbbRootDir/birthday_db_update.php
#
# ...and then delete it from the phpBB root directory!!!
#
# Please, do it NOW! Before editing phpBB files by EM or manually!!!
# Otherwise, you may have an error message during your next
# connection.
#
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Start output of page
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Birthday Mod, Show users with birthday
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
while ($birthdayrow = $db->sql_fetchrow($result))
{
usleep(2);
$user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] ));
if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
if ( $user_birthday2 > $date_today && $user_birthday2 <= $date_forward )
{
// user are having birthday within the next days
$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']);
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
} else if ( $user_birthday2 == $date_today )
{
//user have birthday today
$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] );
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
}
|
je veux bien que tu ne trouve pas les ligne mais bon ça me parrait peu probable  _________________ Pas de support par MP ¦ MSN ¦ Mail ¦ Skype ¦ Téléphone ¦ Courrier Postal...
 |
|
| Revenir en haut de page |
|
 |
Gernouille Esprit servant
Inscrit le: 28 Déc 2004 Messages: 156
|
Posté le: Dim 06 Mar 2005 à 10:09 Sujet du message: |
|
|
Ben justement je les trouves pas mais j'ai bidouillez un peu et les couleurs et les noms se sont afficher
Note:avant les noms des anniversaires ne marchez pas sur mon index mais sur mon portal on voyez bien les noms il devais avoir une erreur de fonction
Mais c'est bon c'est régler Merci |
|
| Revenir en haut de page |
|
 |
Darkenshin Membres actifs

Inscrit le: 23 Déc 2004 Messages: 601
|
Posté le: Dim 06 Mar 2005 à 13:31 Sujet du message: |
|
|
 _________________ Pas de support par MP ¦ MSN ¦ Mail ¦ Skype ¦ Téléphone ¦ Courrier Postal...
 |
|
| Revenir en haut de page |
|
 |
|
|
Vous ne pouvez pas poster de nouveaux sujets dans ce forum Vous ne pouvez pas répondre aux sujets dans ce forum Vous ne pouvez pas éditer vos messages dans ce forum Vous ne pouvez pas supprimer vos messages dans ce forum Vous ne pouvez pas voter dans les sondages de ce forum Vous ne pouvez pas joindre des fichiers Vous ne pouvez pas télécharger des fichiers
|
|