Solved: 14 Years, 4 Months ago Portal Annoucements
#8
Solved: 14 Years, 4 Months ago
looks like this plugin creates thread uncommon way. When you create thread using deafault feature announce shows up on portal page. Well then what's the difference of creating thread between plugin-way and default-way?

i guess this part of plugin creates new thred:
	$user=$mybb->user['username'];
		if ($user == '')
		{
			$user="Guest";
		}
		$uid=$mybb->user['uid'];
		$insert_array = array(
		"fid" => intval($form['forum_fid']),
		"subject" => "Город: $form[name]",
		"icon" => 0,
		"uid" => intval($uid),
		"username" =>  $user,
		"dateline" => time(),
		"lastpost" => time(),
		"closed" => "",
		"visible" => 1,
		);
		$db->insert_query("threads", $insert_array);
		$newtid = $db->insert_id();
		$insert_post = array(
		"tid" => intval($newtid),
		"subject" => "Город: $form[name]",
		"fid" => intval($form[forum_fid]),
		"uid" => intval($uid),
		"username" =>  $user,
		"dateline" => time(),
		"message" => $bbmessage,
		"visible" => 1,
		);

I noticed that when you create thread usual way there appears record in SQL "mybb_threadsread" about this thread and when plugin creates thread there is no any records in "mybb_threadsread" could it be the reason?
I solved it Smile I have no questions, thank you MattRogowski Smile
Portfolio - Plum


Messages In This Thread
Portal Annoucements - by ZeroT - 2009-07-22, 11:25 AM
RE: Portal Annoucements - by Matt - 2009-07-22, 11:29 AM
RE: Portal Annoucements - by ZeroT - 2009-07-22, 09:08 PM
RE: Portal Annoucements - by leealex - 2009-07-31, 12:27 PM
RE: Portal Annoucements - by Matt - 2009-07-31, 12:46 PM
RE: Portal Annoucements - by leealex - 2009-07-31, 01:48 PM
RE: Portal Annoucements - by Matt - 2009-07-31, 01:50 PM
RE: Portal Annoucements - by leealex - 2009-08-01, 02:46 AM

Forum Jump:


Users browsing this thread: 6 Guest(s)