MyBB Community Forums

Full Version: Post Icons Dropdown Box
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could anyone make/show me the way of making a dropdown box for post icons. I'm going to have a lot of post icons, and it's going to looks messing with just radio buttons.
You could use MyBB's built in drop down menu.

<div class="menu">
<ul>
  <li><a href='javascript:;' id="postmenu">Post options</a></li>
      <ul>
            </div> 


 <div id="postmenu_popup" class="popup_menu" style="display: none;">
      <div class="popup_item_container">
       {$post['button_pm']}
      </div>
      <div class="popup_item_container">
        {$post['button_www']}
      </div>
      <div class="popup_item_container">
       {$post['button_find']}
      </div>
      <div class="popup_item_container">
       variable goes here
      </div>
  </div>


<script type="text/javascript">

// <!--
    if(use_xmlhttprequest == "1")
    {
        $("#postmenu").popupMenu();
    }
// -->
</script>

I'd leave the edit post button as normal tho as it uses a drop down itself.
(2015-01-30, 09:37 PM)iAndrew Wrote: [ -> ]You could use MyBB's built in drop down menu.


<div class="menu">
<ul>
  <li><a href='javascript:;' id="postmenu">Post options</a></li>
      <ul>
            </div> 


 <div id="postmenu_popup" class="popup_menu" style="display: none;">
      <div class="popup_item_container">
       {$post['button_pm']}
      </div>
      <div class="popup_item_container">
        {$post['button_www']}
      </div>
      <div class="popup_item_container">
       {$post['button_find']}
      </div>
      <div class="popup_item_container">
       variable goes here
      </div>
  </div>


<script type="text/javascript">

// <!--
    if(use_xmlhttprequest == "1")
    {
        $("#postmenu").popupMenu();
    }
// -->
</script>

I'd leave the edit post button as normal tho as it uses a drop down itself.

You know what template to edit?
Templates > Your theme > Postbit Templates > Postbit and postbit_Classic
(2015-01-30, 10:29 PM)iAndrew Wrote: [ -> ]Templates > Your theme > Postbit Templates > Postbit and postbit_Classic

I'm not talking about the Edit button and stuff like that. I'm talking about the topic icons like this

[Image: BX9btPv.png]
I see, well you'd have to edit

Templates > New reply Templates > New reply
Templates > New Thread Templates > New Thread

You could try move the {$posticons} into the dropdown but you'd have to find the template with the HTML for that Variable to edit it.
actual template is posticons (in Post Icon Templates)

basic code:
<td class="trow1" valign="top">{$iconlist}</td>
below code for the posticons template might work for modal popup of post icons
<tr>
<td class="trow1" style="vertical-align: top"><strong>{$lang->post_icon}</strong><span class="smalltext"><label class="posticons_label"><input type="radio" class="radio" name="icon" value="-1"{$no_icons_checked} />{$lang->no_post_icon}</label></span></td>
<td class="trow1" valign="top"> 
<a href="#" onclick="$('#posticons').modal({ fadeDuration: 250, keepelement: true }); return false;" class="posticons">post icons</a>
 <div class="modal" id="posticons">{$iconlist}</div>
</td>
</tr>

style properties like below may be added to bottom of global.css
(edit through admin panel in advanced edit mode)
.sceditor-container {z-index: 1;} 
#posticons {z-index: 99;}
(2015-01-31, 11:04 AM).m. Wrote: [ -> ]below code for the posticons template might work for modal popup of post icons



<tr>
<td class="trow1" style="vertical-align: top"><strong>{$lang->post_icon}</strong><span class="smalltext"><label class="posticons_label"><input type="radio" class="radio" name="icon" value="-1"{$no_icons_checked} />{$lang->no_post_icon}</label></span></td>
<td class="trow1" valign="top"> 
<a href="#" onclick="$('#posticons').modal({ fadeDuration: 250, keepelement: true }); return false;" class="posticons">post icons</a>
 <div class="modal" id="posticons">{$iconlist}</div>
</td>
</tr>

style properties like below may be added to bottom of global.css
(edit through admin panel in advanced edit mode)



.sceditor-container {z-index: 1;} 
#posticons {z-index: 99;}

can we have list dropdown like this one
[attachment=34260]

so when we choose one icon, it will update the button "no icon". like the pict.
can we?
[attachment=34261]