MyBB Community Forums

Full Version: add modcp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to add a modcp button next to the usercp but it's only visible for those who are moderators.

The (header_welcomeblock_member) is for those who are members (right?)
Code: http://gyazo.com/3fb7bb1c7c754e4e92273b14dea91d66

The (header_welcomeblock_moderator) is for those who are moderators (right?)
Code: http://gyazo.com/080759039966977096a7688a9bad7e05
I want to style this button just like the usercp and put it next to it and it will only be visible when you log in as moderator right?

When I look at the code in "Inspect Element" (Chrome), I am logged in as a moderator but I don't see the code inside the html?
http://gyazo.com/87edfcecd771531d33afd20aaae89982

Is the code that is inside the (header_welcomeblock_moderator) suppose to add to the (header_welcomeblock_member)? Or do I copy everything inside the (header_welcomeblock_member) into my (header_welcomeblock_moderator) and add the modcp button?

http://www.Vizzy.VisualizeEdits.com/
Try adding this


{$modcplink}

After

<div id="modcp button">

And right before

 
</div>

So it becomes

<div id="modcp button">
{$modcplink}
</div>

Also remove the div tags from the moderator welcomeblock header template.
(2013-07-12, 10:04 PM)Race Wrote: [ -> ]Try adding this


{$modcplink}

After

<div id="modcp button">

And right before

 
</div>

So it becomes

<div id="modcp button">
{$modcplink}
</div>

Also remove the div tags from the moderator welcomeblock header template.

Like this?
http://gyazo.com/0b38bd87a34129f4617f053412e5086d

and leave it like this?
http://gyazo.com/4d791aded157a84e5f042f12de8c9d1e
Correct.
That's correct. Leave them both like the screenshots above.
It work, thank you very much Race!
No problem. I'm glad that I could help.
(2013-07-12, 10:23 PM)Race Wrote: [ -> ]No problem. I'm glad that I could help.

Hey, I got it fixed as you can see here
Admin: http://gyazo.com/b26cc64ac6fa5b5c191a7442b1368e1c

But when I logged into my member account, this is what I see??
Member: http://gyazo.com/6e21baba058cdf6a1ae8cf5c91cc05df
Actually remove the div tags from the member welcomeblock template and add it to the moderator one but leave the following code:

{$modcplink}

In the member welcomeblock template.
(2013-07-12, 10:42 PM)Race Wrote: [ -> ]Actually remove the div tags from the member welcomeblock template and add it to the moderator one but leave the following code:

{$modcplink}

In the member welcomeblock template.

It work! Thanks! Preview:
Member: http://gyazo.com/0b044308c897b0593ffd7c2c84baf5e0
Moderator: http://gyazo.com/47d17c7634cbc9eab30b38ca5639df10
Admin: http://gyazo.com/6c4ac5b01db9be2a6a6d0e282da08c5e