MyBB Community Forums

Full Version: How to Make PostIcons Multiselectable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello! I am currently using PostIcons to create options for users to select content warnings for each individual post. I have turned everything into checkboxes, but am unable to make it functional. Currently, I have "Content Warning: None" automatically selected for when members make a post. I want them to be able to change and select multiple depending on the content of their post, but unable to make it functional.

https://i.imgur.com/Ya5dPJ2.png
https://i.imgur.com/WPtSTlc.png

TEMPLATE SETS/POSTICON TEMPLATES/POSTICONS

<tr>
<td class="trow1" style="vertical-align: top"><strong>Content Warning:</strong></td>
<td class="trow1" valign="top" colspan="2" style="padding-top: 1em;">{$iconlist}<input type="checkbox" class="checkbox" name="icon" value="21" checked="checked" style="display: none;" /></td>
</tr>

TEMPLATE SETS/POSTICON TEMPLATES/POSTICONS_ICON

<label class="posticons_label"><input type="checkbox" name="icon" value="{$dbicon['iid']}"{$checked} /> <span class="{$dbicon['name']}"><img src="{$dbicon['path']}" alt="{$dbicon['name']}" title="{$dbicon['name']}" /></span></label>

TEMPLATE SETS/POSTbit TEMPLATES/POSTBIT

{$ignore_bit}{$deleted_bit}
<div class="post {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
<button class="dropbtn">Extended Information</button>
<div class="dropdown-content">
<div class="{$post['fid1']} accounts">{$post['attached_accounts']}</div>
  <div class="{$post['fid1']} grid">
     <div class="{$post['fid1']} {$post['fid21']}">
        <div class="mini_title">{$post['fid21']}</div>
     </div>
     <div class="{$post['fid1']} achievements">
        <span class="title">Achievements</span>
        {$post['fid23']}
     </div>
</div>
      <div class="{$post['fid1']} about">
        <span class="mini_title">About the Player</span>
        <div class="about_blurb">{$post['fid3']}</div>
     </div>
     <div class="{$post['fid1']} plotting">
         {$post['fid25']}
     </div>
</div>
<div class="post_author">
<div class="custom_author" style="background-image: url({$post['fid20']});">
      <div class="post_author overlay">
        {$post['useravatar']}
		  <div class="author_information">
          <fancy>{$post['profilelink']}</fancy>
          <div class="mini_title">{$post['usertitle']}</div>
        </div>
        <div class="author_statistics">
          <div class="health_bar">
            <div class="health" style="width: {$post['fid5']}%;" title="{$post['fid5']} / 100 HP">
            </div>
          </div>
<hr /><div class="statistics_table">
		<span>{$post['fid7']}</span>
                <span>{$post['fid8']}</span>
                <span>{$post['fid9']}</span>
			<hr />
            <span>{$post['fid24']}</span>
            <span>{$post['fid11']}</span>
            <span>{$post['fid12']}</span>
<hr  /> 
		    <span>{$post['fid14']}</span> 
            <span>{$post['fid15']}</span> 
			<span><a href="private.php?action=send&amp;uid={$post['uid']}" title="{$lang->postbit_pm}" class="postbit_pm">Message</a></span>
          </div>
      </div>
</div>
</div>
</div>
  <div class="post_head">
    {$post['posturl']}
    <b>{$thread['displayprefix']}{$thread['subject']}</b>
    <span class="post_date" style="float: right; padding-right: 1em;">{$post['postdate']} / <b><span class="post_wordcount"><span id="wordcount_{$post['pid']}"></span> {$lang->char_wordcount}</span></span></b>
    {$post['subject_extra']}
  </div>
  <div class="post_content">
{$post['icon']}
			
       
    <div class="post_body scaleimages" id="pid_{$post['pid']}">
      {$post['message']}
    </div>
    <div class="post_meta" id="post_meta_{$post['pid']}">
        {$post['poststatus']}
    </div>
    {$post['input_editreason']}
  </div>
	 {$post['signature']}
  <div class="post_controls">
    <div class="postbit_buttons author_buttons float_left">
      {$post['button_pm']}{$post['button_find']}
    </div>
    <div class="postbit_buttons post_management_buttons float_right">
      {$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    </div>
  </div>
</div>

I am unsure what other files need to be edited to achieve this. Thank you for any assistance you may provide!