MyBB Community Forums

Full Version: inline thread moderation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi all

when i select threads for inline thread moderation, they are selected, the counter counts correctly, but when i make an action -ex. stick-, i have the following message
Quote:Sorry, but you did not select any threads to perform inline moderation on, or your previous moderation session has expired (Automatically after 1 hour of inactivity). Please select some threads and try again.

i searched and searched, tried removing google-analytics tracking code, even the theme maker -Audentio- thankfully checked personally and confirmed it's not the theme Smile

i noticed after a refresh or even a restart of my pc, selected threads are kept selected, meaning if i select thread A, restart my pc, thread A is still selected.

any help would be much appreciated, btw quick reply works normally Smile
Dunno what causes this at all, but can you try the steps in this post and let me know what it writes to the file: http://community.mybb.com/thread-74132-p...#pid542306

Thanks.
i tried replacing moderation.php, didn't help

i try finding the code to replace but moderation.php on 1.6 is very different, not sure which part to replace...


function getids($id, $type)
{
	global $mybb;
	
	$newids = array();	
	$cookie = "inlinemod_".$type.$id;
	$cookie_ids = explode("|", $mybb->cookies[$cookie]);
	
	foreach($cookie_ids as $cookie_id)
	{
		if(empty($cookie_id))
		{
			continue;
		}
		
		if($cookie_id == 'ALL')
		{
			$newids += getallids($id, $type);
		}
		else
		{
			$newids[] = intval($cookie_id);
		}
	}
	
	return $newids;
}
the closest thing i found, should i replace that?
Err, ohh yeah that thread was on a 1.4 forum. Use this version of the function:

function getids($id, $type)
{
    global $mybb;
    $fp = fopen("mod_debug.txt", "w+");
    $newids = array();    
    $cookie = "inlinemod_".$type.$id;
    fwrite($fp, $cookie . "\n");
    fwrite($fp, $mybb->cookies[$cookie] . "\n");
    $cookie_ids = explode("|", $mybb->cookies[$cookie]);
    
    foreach($cookie_ids as $cookie_id)
    {
        if(empty($cookie_id))
        {
            continue;
        }
        
        if($cookie_id == 'ALL')
        {
            $newids += getallids($id, $type);
        }
        else
        {
            $newids[] = intval($cookie_id);
            fwrite($fp, $cookie_id . "\n");
        }
    }
    fclose($fp);
    return $newids;
}
i substituted this
function getids($id, $type)
{
    global $mybb;
    
    $newids = array();    
    $cookie = "inlinemod_".$type.$id;
    $cookie_ids = explode("|", $mybb->cookies[$cookie]);
    
    foreach($cookie_ids as $cookie_id)
    {
        if(empty($cookie_id))
        {
            continue;
        }
        
        if($cookie_id == 'ALL')
        {
            $newids += getallids($id, $type);
        }
        else
        {
            $newids[] = intval($cookie_id);
        }
    }
    
    return $newids;
} 

with
function getids($id, $type)
{
    global $mybb;
    $fp = fopen("mod_debug.txt", "w+");
    $newids = array();    
    $cookie = "inlinemod_".$type.$id;
    fwrite($fp, $cookie . "\n");
    fwrite($fp, $mybb->cookies[$cookie] . "\n");
    $cookie_ids = explode("|", $mybb->cookies[$cookie]);
    
    foreach($cookie_ids as $cookie_id)
    {
        if(empty($cookie_id))
        {
            continue;
        }
        
        if($cookie_id == 'ALL')
        {
            $newids += getallids($id, $type);
        }
        else
        {
            $newids[] = intval($cookie_id);
            fwrite($fp, $cookie_id . "\n");
        }
    }
    fclose($fp);
    return $newids;
} 

moderation.php comes as white page, reuploaded fresh one and same problem
Try and perform inline moderation again, it'll probably say you've not selected anything, but it'll write some debug stuff to a text file whilst doing it..
tried again, apparently wrong copy/paste sorry Sad

so the file contains
inlinemod_forum35

Who is your host? I'm just wondering if the OP of the thread Matt linked you to was/is using the same host.
i have shared hosting through eblanet.net, they have servers from teliasonera as i guessed from a tracert Smile
Hmm, same as the last person who had this.

What's weird here is that the javascript is reading the cookie fine. When you said you reloaded the page or even restarted your computer and they were still selected, that's because the javascript was reading the cookie and auto-selecting the ones you selected before. But, for some reason, very rarely, the PHP won't pick these cookies up, and it's only these ones.

Will continue to investigate.
Pages: 1 2 3