Jump to content

What's wrong with this function?


Padgoi

Recommended Posts

I keep getting an error about unexpected t_function, expecting ).

 

	function fetch_latest_replies($read_perms)
{
	$latest_replies = '';

	$this->ipsclass->DB->simple_construct(
		array(
			'select'	=> 't.title, t.tid, t.forum_id, t.last_post, t.last_poster_name, t.last_poster_id, t.views, t.posts as replies, m.mgroup',
			'from'		=> 'topics t left join ' . SQL_PREFIX . 'members m on (m.id = t.last_poster_id)',
			'where'		=> 't.forum_id in (' . $read_perms . ')',
			'order'		=> 't.last_post desc',
			'limit'		=> array(0, $this->ipsclass->vars['_inferno_topxstats_show'])
		)
	);
	$this->ipsclass->DB->simple_exec();

	while ($thread = $this->ipsclass->DB->fetch_row())
	{
		$thread['replies']		= $this->ipsclass->do_number_format($thread['replies']);
		$thread['last_post']		= $this->ipsclass->get_date ($thread['last_post'], 'SHORT' );
		$thread['forum']		= $this->ipsclass->txt_truncate($thread['forum_id']);			
		$thread['views']		= $this->ipsclass->do_number_format($thread['views']);
		$thread['title']		= $this->ipsclass->txt_truncate($thread['title'], $this->ipsclass->vars['_inferno_topxstats_titles']);

		$latest_replies .= $this->ipsclass->compiled_templates[$this->skingroup]->inferno_topxstats_latestreply($thread);
	}
	setTimeout( function() { Effect.SlideDown( $latest_replies, { duration: 0.3 } ); });
	return $latest_replies;
}

Link to comment
https://forums.phpfreaks.com/topic/119661-whats-wrong-with-this-function/
Share on other sites

Ok, but that didn't work.  I'm trying to add the SlideDown effect to this list of topics I have that updates via Ajax and not sure how.  The tutorial shows how to add it via a href, but this is updating via ajax, so I don't know where to put the javascript function to call the slidedown effect, which is the line in the above post. 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.