Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   Sistemas de gestión de contenidos (http://www.forosdelweb.com/f54/)
-   -   problemas con código de birthday mod para phpbb (http://www.forosdelweb.com/f54/problemas-con-codigo-birthday-mod-para-phpbb-230592/)

degum 10/09/2004 21:46

problemas con código de birthday mod para phpbb
 
He instalado al pie de la letra un mod que sirve de extensión para el birthday (poner fecha de cumpleaños en phpbb). Esta extensión se supone ke me permite mandar mails automáticamente a los cumpleañeros.
en includes/page_header.php el mod de birthday queda así:
// Start add - Birthday MOD
// see if user has or have had birthday, also see if greeting are enabled
if ( $userdata['user_birthday']!=999999 && $board_config['birthday_greeting'] && create_date('Ymd', time(), $board_config['default_timezone']) >= $userdata['user_next_birthday_greeting'].realdate ('md',$userdata['user_birthday'] ) )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_next_birthday_greeting = " . (create_date('Y', time(), $board_config['board_timezone'])+1) . "
WHERE user_id = " . $userdata['user_id'];
if( !$status = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update next_birthday_greeting for user.", "", __LINE__, __FILE__, $sql);
}
$template->assign_var("GREETING_POPUP",
"<script language=\"Javascript\" type=\"text/javascript\"><!--
window.open('".append_sid('birthday_popup.'.$phpEx )."', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
//-->
</script>");
} //Sorry user shall not have a greeting this year
// End add - Birthday MOD


la extensión dice que lo que dejé en negritas debe reemplazarse por lo siguiente

// START Birthday Mail Extension
$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = " . $userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, $lang['bd_sqlerror']);
}

while( $row = $db->sql_fetchrow($result) )
{
$bd_mail = intval($row['user_email']);
}

$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, $lang['bd_sqlerror']);
}
while ($row = $db->sql_fetchrow($result))
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);

$emailer->email_address(trim($row['user_email']));
$emailer->use_template("birthday", $row['user_lang']);
$emailer->set_subject($lang['bd_subject']);

$emailer->assign_vars(array(
'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $row['username']), 0, 25)),
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'BOARDNAME' => str_replace('<br />', "\n", "-- \n" . $board_config['sitename']);
);
$emailer->send();
$emailer->reset();
}

el error que aparece es:
Parse error: parse error, unexpected ';' in /home/eskape/public_html/elklub/comunidad/includes/page_header.php on line 303
siendo la línea 303 la ante-antepenúltima, es decir, la que está negrita:

);
$emailer->send();
$emailer->reset();
}


Ojalá puedan responderme ke me urge arreglar esto.

SidV 15/09/2004 12:27

borra esa linea

ferny 16/09/2004 05:11

Justo antes de eso, donde pone:

$board_config['sitename']);

Quita el ; del final.

Saludos :adios:


La zona horaria es GMT -6. Ahora son las 05:09.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.