MyBB Community Forums

Full Version: Parse Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
$plugins->add_hook("modcp_reports", "socialgroups_reported_posts"); 

 function socialgroups_reported_posts()
{
	global $db, $mybb, $lang;
	 if ($report['type']==1) 
	{ 
		$report['postlink'] ="<a href='$settings[\'bburl\']/groupthread.php?pid=$report[\'pid\']' target='_blank'>$report['pid']</a>"; 
		$report['threadlink'] ="<a href='$settings[\'bburl\']/groupthread.php?conid=$report[\'tid\']' target='_blank'>$report['tid']</a>";
	 } 
} 

In short, this is supposed to separate reported posts since I'm working on a social groups type feature that vbulletin has. I'm getting close to finishing it, but I'm getting a parse error on the line that says
$report['postlink'] ="<a href='$settings[\'bburl\']/groupthread.php?pid=$report[\'pid\']' target='_blank'>$report['pid']</a>"; 

I can't seem to figure out why.
function socialgroups_reported_posts()
{
    global $db, $mybb, $lang;
    if ($report['type'] == 1) 
    { 
        $report['postlink'] ='<a href="'.$settings['bburl'].'/groupthread.php?pid='.$report['pid'].'" target="_blank">'.$report['pid'].'</a>'; 
        $report['threadlink'] ='<a href="'.$settings['bburl'].'/groupthread.php?conid='.$report['tid'].'" target="_blank">'.$report['tid'].'</a>';
    } 
}

Pay more attention to your quotation marks. Always use single quotes, at least for HTML output so you can properly use double quotes. Concatenate the variables.