News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

"remove selected" posts button not showing on my theme

Started by Jade Elizabeth, November 14, 2013, 09:34:38 PM

Previous topic - Next topic

Jade Elizabeth

On my display.template.php that I recoded, the buttons for removing selected posts, etc, are not there when I select posts. I also thought there was a split posts option with that but I must have gotten confused.

What makes the "remove selected [#]" button show in the default Curve theme? I'm pretty sure the JS is okay.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

Well, the JS messes with the div#moderationbuttons_strip, dynamically adding items to that ul li. Depending on what you did to your template you may have broken that.

Jade Elizabeth

I tried adding that class to the div with the buttons but...it's not helping :/. I dunno what I did!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor


Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Nup still not working.

// Allow adding new mod buttons easily.
call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));

echo '<div class="brspagesection brspagesection2" id="moderationbuttons_strip">', template_button_strip($mod_buttons, 'right', array('id' => 'moderationbuttons_strip')), '<br /><br /></div>';
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

Firstly, you're not supposed to have two things in the template with the same id.

Secondly, the div must be that id and contain a ul, which gets the extra li attached as needed.

Jade Elizabeth

I don't understand buttons and I'm not sure why but the id isn't showing either :(. Can you help me out please? :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

A link to the place this is happening would be useful.

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

OK, so for some strange reason you should declare that id twice (because it only outputs it once but needs both)

The original working code in 2.0.6 is:
echo '
<div id="moderationbuttons">', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';

Jade Elizabeth

Okay I changed it to this and it's still not happening...

<div class="brspagesection brspagesection2" id="moderationbuttons">
', template_button_strip($mod_buttons, 'right', array('id' => 'moderationbuttons_strip')), '
<br /><br /></div>'
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: