MyBB Central

Full Version: Roll Dice WORKS in 1.6 - and question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
the Roll Dice plugin works perfect for 1.6, with no modifications at all.

However, since the old threads are closed and Labrocca doesn't modify or support the plugins, I am posting this to the user base here in an effort to figure out how to do a little tweak.

I am trying to figure out how to get the Roll Dice checkbox to show up in the Quick Reply box.

In his initial post, he adds the <!--rolldice--> comment into the showthread_quickreply template, but it doesn't do anything but add in the comment. not being a programmer, I figured that it would work to put the actual call in there {$rolldice} instead of the comment, but that didn't work either.


thanks Smile
A followup:

I'm pretty sure the problem is here. Either str_replace isn't working due to php version difference, or the permission checking is faulty.

PHP Code:
function quickroll()

$gcanroll explode(",",$mybb->settings['dicegroup']);
$fcanroll explode(",",$mybb->settings['diceforum']);

$mybb->settings['diceonoff'] || !in_array($mybb->user['usergroup'],$gcanroll)){ return;}    
$mybb->settings['diceforum'] != "0" && !in_array($fid,$fcanroll)) { return;}
$diceoption'<br /><label><input type="checkbox" class="checkbox" name="rolldice" value="1" />&nbsp;<strong>Roll Dice</strong></label>';
$showthread str_replace("<!--rolldice-->"$diceoption$showthread);


Has this resolved your problem?
It's a bit more complicated than that. Look into the quick reply form templates.

I would like to add this to quick reply.

Can someone explain how?