I think you may be emptying $entrybits (setting it to "") when all you want to do is not add to it.
Your code, given the following journal table entries, would result in your collected template output looking as follows:
Code:
JOURNAL ENTRY $entrybits
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1_Not_Private "1_Not_Private"
2_Not_Private "1_Not_Private 2_Not_Private"
3_Private ""
4_Not_Private "4_Not_Private"
rest_not_private "4_Not_Private rest_not_private"
If this is right, you will want to just remove the code I have colored here:
Code:
if($entry['private'])
{
if(($bbuserinfo['usergroupid']=="6") OR ($bbuserinfo['userid'] == $journalinfo['journalist_id']) OR (in_array($bbuserinfo['userid'], $wcv_entry)))
{
eval('$entrybits .= "' . fetch_template('journal_entrybits') . '";');
}
else
{
$entrybits='';
}