Try ;
PHP Code:
if($entry['journal_private'])
{
$view_journal= false;
if($bbuserinfo['userid'])
{
if(($bbuserinfo['userid'] == $entry['journalist_id']) OR ($bbuserinfo['usergroupid']==6))
{
$view_journal= true;
}
elseif(!$view)
{
if($entry['journal_allowbuddies'] == 1 AND isset($entry['jbuddylist']))
{
$buddies= explode(' ', $entry['jbuddylist']);
if(in_array($bbuserinfo['userid'], $buddies))
{
$view_journal= true;
}
}
elseif(isset($entry['journal_whocanview']))
{
$wcv= explode(',', $entry['journal_whocanview']);
if(in_array($bbuserinfo['userid'], $wcv))
{
$view_journal= true;
$isbuddy= true;
}
}
}
}
}
It should do the same. Ignore the space at the start of line 1 - the forum seems to be adding that.
AFAIK;
PHP Code:
if
{
//code here//
}
elseif
{
//other code here//
}
is just a short version of
PHP Code:
if
{
//code here//
}
else
{
if
{
//other code here//
}
}
It's usually easier to follow them if you remember this.