Allowing another user to delete/unpublish posts
Posted: 08 Sep 2012, 07:41
I would like to make another user able to delete or unpublish posts so they can help me monitor the guestbook. I tried setting this user to an administrator and even a super admin and neither made the delete/unpublish options appear. The only line of code I can find that deals with this is
I have very little exposure to php, but can usually make some sense of what is written. I can't figure out what the 'administrator' is referring to as setting another user to an admin did not help.
Ideally I'd like this user to be set as a Editor and be able to delete posts, while other users set as Authors cannot
Thanks,
mm_dancer
Code: Select all
if ($this->tmpl['administrator'] != 0) {
$gbPosts.='<a href="'.JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbook&id='.$this->id.'&Itemid='.JRequest::getVar('Itemid', 0, '', 'int').'&controller=phocaguestbook&task=delete&mid='.$values->id.'&limitstart='.$this->pagination->limitstart).'" onclick="return confirm(\''.JText::_( 'Delete Message' ).'\');">'.JHTML::_('image', 'components/com_phocaguestbook/assets/images/icon-trash.gif', JText::_( 'Delete' )).'</a>';
$gbPosts.='<a href="'.JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbook&id='.$this->id.'&Itemid='.JRequest::getVar('Itemid', 0, '', 'int').'&controller=phocaguestbook&task=unpublish&mid='.$values->id.'&limitstart='.$this->pagination->limitstart).'">'.JHTML::_('image', 'components/com_phocaguestbook/assets/images/icon-unpublish.gif', JText::_( 'Unpublish' )).'</a>';
}
Ideally I'd like this user to be set as a Editor and be able to delete posts, while other users set as Authors cannot
Thanks,
mm_dancer