Jump to content

SMF Moderation Buttons at top top of topic


Jones
 Share

Recommended Posts

In our current theme the moderation buttons ( move , remove, lock, sticky, etc) are at the very bottom of the page. Right over the lower breadcrumbs. For ease of use we would really like to move them up to the top of the threads as well. I'm not very fluent in PHP or SMF and the few things I've tried haven't worked. All I've managed to do is put two sets of the same button strip on top of one another. lol. I can provide code if needed but I think that portion of the template is p standard so here's to hoping its just a simple 'put line xyz there'. 

 

Thanks in advance!

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Ooh, good idea.

 

So the trick to this is that the moderator button strip is not generated until just before it is output. Trying to move it to the top by itself probably just confuses the code because it doesn't know what to do. Lol

 

What you'll want to do, then, is find this, should be around line 710 (find Show the page index... if you need):
$mod_buttons = array(
...
call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));

 

Cut from the top line to the last here, and move this up toward the top, you can put these under where it builds the $normal_button array (above it is fine if you're not sure where it actually ends).

 

Then just copy and paste this
echo '

            <div id="moderationbuttons">', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';

 

Wherever you want the second moderator strip to show. Below the template_button_strip for the $normal_buttons array would work fine, but you may want to play with placement until it looks good to you.
Hope that's not too confusing!

  • Love 1
  • Thank you 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

❤️ Thank you so much! Worked perfectly, and you explained it very well. You were dead on with it being about the array placement. lol

  • You're Welcome 1
  • Cheers 1

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.