Aide générale [Réglé] petit souci avec online .php erreur ds le code
slt la communauté
j'essaie de mettre e n place les avatrs ds online mais j'ai une erreur de php si qq peut y jeter un coup d'oeil
j'ai essayé de suivre a la lettre le tuto mais ça coince
voici le message d'erreur
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /homepages/34/d296337196/htdocs/phpboost/phpboost/online/online.php on line 87
et voici mon php online
merci aux spécialistes php j'ai la version 3.06 du programme
j'essaie de mettre e n place les avatrs ds online mais j'ai une erreur de php si qq peut y jeter un coup d'oeil
j'ai essayé de suivre a la lettre le tuto mais ça coince
voici le message d'erreur
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /homepages/34/d296337196/htdocs/phpboost/phpboost/online/online.php on line 87
et voici mon php online
Code PHP :
<?php /*################################################## * online.php * ------------------- * begin : November 23, 2006 * copyright : (C) 2006 Viarre Régis * email : [[email protected]][email protected][/mail] * * ################################################### * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ require_once('../kernel/begin.php'); require_once('../online/online_begin.php'); require_once('../kernel/header.php'); $Template->set_filenames(array( 'online'=> 'online/online.tpl' )); //Membre connectés.. $nbr_member = $Sql->query("SELECT COUNT(*) FROM " . DB_TABLE_SESSIONS . " WHERE level <> -1 AND session_time > '" . (time() - $CONFIG['site_session_invit']) . "'", __LINE__, __FILE__); import('util/pagination'); $Pagination = new Pagination(); $Template->assign_vars(array( 'PAGINATION' => $Pagination->display('online' . url('.php?p=%d'), $nbr_member, 'p', 25, 3), 'L_LOGIN' => $LANG['pseudo'], 'L_AVATAR' => $LANG['avatar'], 'L_LOCATION' => $LANG['location'], 'L_LAST_UPDATE' => $LANG['last_update'], 'L_ONLINE' => $LANG['online'] )); $result = $Sql->query_while("SELECT s.user_id, m.user_avatar, s.level, s.session_time, s.session_script, s.session_script_get, s.session_script_title, m.login FROM " . DB_TABLE_SESSIONS . " s JOIN " . DB_TABLE_MEMBER . " m ON (m.user_id = s.user_id) WHERE s.session_time > '" . (time() - $CONFIG['site_session_invit']) . "' ORDER BY " . $CONFIG_ONLINE['display_order_online'] . " " . $Sql->limit($Pagination->get_first_msg(25, 'p'), 25), __LINE__, __FILE__); //Membres enregistrés. while ($row = $Sql->fetch_assoc($result)) { switch ($row['level']) //Coloration du membre suivant son level d'autorisation. { case 0: $status = 'member'; break; case 1: $status = 'modo'; break; case 2: $status = 'admin'; break; default: $status = 'member'; } //Avatar if (empty($row['user_avatar'])) $user_avatar = ($CONFIG_USER['activ_avatar'] == '1' && !empty($CONFIG_USER['avatar_url'])) ? '<img src="../templates/' . get_utheme() . '/images/' . $CONFIG_USER['avatar_url'] . '" alt="" />' : ''; else $user_avatar = '<img src="' . $row['user_avatar'] . '" alt="" />'; $row['session_script_get'] = !empty($row['session_script_get']) ? '?' . $row['session_script_get'] : ''; $Template->assign_block_vars('users', array( 'USER' => !empty($row['login']) ? '<a href="' . HOST . '/member/member.php?id=' . $row['user_id'] . '" class="' . $status . '">' . $row['login'] . '</a>': $LANG['guest'], 'LOCATION' => '<a href="' . HOST . DIR . $row['session_script'] . $row['session_script_get'] . '">' . stripslashes($row['session_script_title']) . '</a>', 'LAST_UPDATE' => gmdate_format('date_format_long', $row['session_time']) 'USER_AVATAR' => $user_avatar )); } $Sql->query_close($result); $Template->pparse('online'); require_once('../kernel/footer.php'); ?>
merci aux spécialistes php j'ai la version 3.06 du programme
il manque une virgule au passage des variable en tpl :
j'ai pas tester ton fichier dis moi si c'est bien sa
Code PHP :
'LAST_UPDATE' => gmdate_format('date_format_long', $row['session_time']) 'USER_AVATAR' => $user_avatar
Code PHP :
'LAST_UPDATE' => gmdate_format('date_format_long', $row['session_time']) , 'USER_AVATAR' => $user_avatar
j'ai pas tester ton fichier dis moi si c'est bien sa
Accroche toi au clavier, je retire le shell...
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie