MyBB Community Forums

Full Version: [SOLVED] Inline moderation problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
OK, first thing to try is to upload a new copy of ./moderation.php from a fresh download.

If that doesn't fix it, edit ./moderation.php; starting from line 1819 is this:

function getids($id, $type)
{
	global $mybb;
	$cookie = "inlinemod_".$type.$id;
	$ids = explode("|", $mybb->cookies[$cookie]);
	foreach($ids as $id)
	{
		if($id != '')
		{
			$newids[] = intval($id);
		}
	}
	return $newids;
}

Can you change that to this:

function getids($id, $type)
{
	global $mybb;
	$fp = fopen("mod_debug.txt", "w+");
	$cookie = "inlinemod_".$type.$id;
	fwrite($fp, $cookie . "\n");
	fwrite($fp, $mybb->cookies[$cookie] . "\n");
	$ids = explode("|", $mybb->cookies[$cookie]);
	foreach($ids as $id)
	{
		if($id != '')
		{
			$newids[] = intval($id);
			fwrite($fp, $id . "\n");;
		}
	}
	fclose($fp);
	return $newids;
}

Try to perform some moderation again, if it doesn't work, look in your root folder (i.e. same place as moderation.php is) for a new file called mod_debug.txt, what's it written to this??
Fresh moderation.php did not fix it, so I have made the edits that you said to the file.
I reported this same problem a few times on different MyBB sites, for example Zingas forum

This problem has been going on for awile for me also this is marked in devs but cant remember where exactly..
(2010-07-26, 09:43 PM)Rob1991 Wrote: [ -> ]Fresh moderation.php did not fix it, so I have made the edits that you said to the file.

Did the mod_debug.txt file get made and written to??
(2010-07-26, 10:20 PM)MattRogowski Wrote: [ -> ]
(2010-07-26, 09:43 PM)Rob1991 Wrote: [ -> ]Fresh moderation.php did not fix it, so I have made the edits that you said to the file.

Did the mod_debug.txt file get made and written to??

Yep, inside it is
Quote:inlinemod_thread507
Hmm... OK... right, undo that change by uploading another copy of that file... next, in ./global.php, just before the ?> at the end, add this:

if($mybb->user['uid'] == 1)
{
        print_r($mybb->cookies);
}

This will print out the cookies, but they'll only show to you so don't worry. It'll add a load of text right up at the top of the forum; can you select some threads but not submit the form, just tick the boxes, refresh the page, copy the output at the top, and PM it to me??
Thanks... output there is even weirder. OK, in that code can you change the 1 to 134 so it'll show for me??
(2010-07-27, 09:59 PM)MattRogowski Wrote: [ -> ]Thanks... output there is even weirder. OK, in that code can you change the 1 to 134 so it'll show for me??

Done, thanks for your help again btw.
No problem Smile

Just so people know what's what, I'm trying things via FTP.
Thing I don't understand is this; the cookie is being stored perfectly fine in the browser, and it is clearly being read in some way because when you select some threads and refresh the page, they stay selected, and unless I'm misunderstanding how it works it must be using the cookie to be able to know what to pre-select. However if I echo the cookies out, they're not there, and the cookie is apparently empty when it's processing the moderation action... doesn't make any sense to me Huh
Pages: 1 2 3 4