Easy-Design.Net forum




Aide générale [Réglé] petit souci avec online .php erreur ds le code

patgame Membre non connecté

EDN Concerné(e)

Rang

Avatar

Inscrit le : 28/09/2009 à 16h23

Messages: 146

Le 17/03/2010 à 10h43
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

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
Site web    
saturnin Membre non connecté

Administrateur

Rang

Avatar

Administrateur

Inscrit le : 08/08/2009 à 22h19

Messages: 3963

Le 17/03/2010 à 11h52
il manque une virgule au passage des variable en tpl :

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 :)


signaturesaturnin


Accroche toi au clavier, je retire le shell...
Site web    
patgame Membre non connecté

EDN Concerné(e)

Rang

Avatar

Inscrit le : 28/09/2009 à 16h23

Messages: 146

Le 17/03/2010 à 12h32
ben comme d hab saturnin efficace oui c'était ça je te remercie de ton intervention bénéfique comme a chaque fois
amitiés
pat
Site web    
KONA Membre non connecté

EDN Enraciné(e)

Rang

Avatar

Inscrit le : 05/10/2009 à 18h20

Messages: 691

Le 17/03/2010 à 17h08
C'est sur mon tuto ?
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie