MyBB Community Forums

Full Version: Let users delete their polls.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Apparently my registered users can post polls, but can't delete them. I can't find such option in the permissions section... how can I let them remove their own polls?
Not without a plugin.
Is there any? (searched the listing, no decent results)
Open ./showthread.php and find;
		if(!is_moderator($fid, 'caneditposts'))
		{
			$edit_poll = '';
		}
		else
		{
			$edit_poll = " | <a href=\"polls.php?action=editpoll&amp;pid={$poll['pid']}\">{$lang->edit_poll}</a>";
		}
and Change it into;
		if($thread['uid'] == $mybb->user['uid'])
		{
			$edit_poll = " | <a href=\"polls.php?action=editpoll&amp;pid={$poll['pid']}\">{$lang->edit_poll}</a>";
		}

Now open ./polls file and find;
	if(!is_moderator($fid, "caneditposts"))
	{
		error_no_permission();
	}
and Change it into;
	if($thread['uid'] != $mybb->user['uid'])
	{
		error_no_permission();
	}
Save both files.

Now Thread author is able to delete poll as well Wink