After installing this mod I received this IPS Error:
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND mt_owner_id= AND mt_read!=1' at line 1
IP Address: ********
mySQL query error: SELECT count(mt_id) as total FROM ibf_message_topics WHERE mt_to_id= AND mt_owner_id= AND mt_read!=1
Not sure how this would effect this mod because it looks like its pulling information from the topic and this mod Im sure doesn't lol...
The error comes from doing the edit to sources\classes\class_session.php
Here is what I have above and below that line.
Can you tell what might be causing it??
Quote
//-----------------------------------------
// Synchronise the last visit and activity times if
// we have some in the member profile
//-----------------------------------------
if ( $this->member['id'] )
{
if ( !isset($this->ipsclass->input['last_activity']) OR !$this->ipsclass->input['last_activity'] )
{
$this->ipsclass->input['last_activity'] = $this->member['last_activity'] ? $this->member['last_activity'] : $this->time_now;
}
if ( !isset($this->ipsclass->input['last_visit']) OR !$this->ipsclass->input['last_visit'] )
{
$this->ipsclass->input['last_visit'] = $this->member['last_visit'] ? $this->member['last_visit'] : $this->time_now;
}
//-----------------------------------------
// If there hasn't been a cookie update in 2 hours,
// we assume that they've gone and come back
//-----------------------------------------
if ( ! $this->member['last_visit'] )
{
//-----------------------------------------
// No last visit set, do so now!
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'members',
'set' => "last_visit=".$this->time_now.", last_activity=".$this->time_now,
'where' => "id=".$this->member['id']
) );
$this->ipsclass->DB->simple_shutdown_exec();
}
else if ( (time() - $this->ipsclass->input['last_activity']) > 300 )
{
//-----------------------------------------
// If the last click was longer than 5 mins ago and this is a member
// Update their profile.
//-----------------------------------------
list( $be_anon, $loggedin ) = explode( '&', $this->member['login_anonymous'] );
$this->ipsclass->DB->simple_construct( array( 'update' => 'members',
'set' => "login_anonymous='$be_anon&1', last_activity=".$this->time_now,
'where' => "id=".$this->member['id']
) );
$this->ipsclass->DB->simple_shutdown_exec();
}
//-----------------------------------------
// Check ban status
//-----------------------------------------
if ( $this->member['temp_ban'] )
{
$ban_arr = $this->ipsclass->hdl_ban_line( $this->member['temp_ban'] );
if ( time() >= $ban_arr['date_end'] )
{
//-----------------------------------------
// Update this member's profile
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'members',
'set' => "temp_ban=''",
'where' => "id=".$this->member['id']
) );
$this->ipsclass->DB->simple_shutdown_exec();
}
else
{
$this->ipsclass->member = $this->member;
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'account_susp', 'INIT' => 1, 'EXTRA' => $this->ipsclass->get_date($ban_arr['date_end'],'LONG', 1) ) );
}
}
Here is where it says to add the code....
}
//-----------------------------------------
// Set a session ID cookie
//-----------------------------------------
$this->ipsclass->my_setcookie("session_id", $this->session_id, -1);
return $this->member;
}
/*-------------------------------------------------------------------------*/
// Build group permissions
/*-------------------------------------------------------------------------*/
function build_group_permissions()
{
if ( isset($this->member['mgroup_others']) AND $this->member['mgroup_others'] )
{
$groups_id = explode( ',', $this->member['mgroup_others'] );
$exclude = array( 'g_title', 'g_icon', 'prefix', 'suffix', 'g_promotion', 'g_photo_max_vars' );
$less_is_more = array( 'g_search_flood' );
$zero_is_best = array( 'g_attach_max', 'g_attach_per_post', 'g_edit_cutoff', 'g_max_messages' );
# Blog
$zero_is_best = array_merge( $zero_is_best, array( 'g_blog_attach_max', 'g_blog_attach_per_entry', 'g_blog_preventpublish' ) );
# Gallery
$zero_is_best = array_merge( $zero_is_best, array( 'g_max_diskspace', 'g_max_upload', 'g_max_transfer', 'g_max_views', 'g_album_limit', 'g_img_album_limit', 'g_movie_size' ) );
if ( count( $groups_id ) )
{
foreach( $groups_id as $pid )
{
if ( ! isset($this->ipsclass->cache['group_cache'][ $pid ]['g_id']) OR !$this->ipsclass->cache['group_cache'][ $pid ]['g_id'] )
{
continue;
}