FM Themes
Welcome to FM Themes
where you can share your punBB, phpBB 2, Invision, & phpBB 3 themes for Forumotion forums.

You are viewing the forum as a guest, so you will not be able to use the full forum. To use all the features of the forum, you need to log in or create a FREE account by registering.

How to add staff moderation color icon?

View previous topic View next topic Go down

Solved How to add staff moderation color icon?

Post by brandon_g on Sat Apr 18, 2015 5:07 pm

Hello,

I am sorry if this is in the wrong section at all... there was no section for all versions and since my forum is [You must be registered and logged in to see this link.] I figured I should create the topic here even though I bet the code works for all versions.

I have created this topic to inquire about adding a staff moderation color icon similar  to what we have here at FMThemes. It could really be useful for my staff and I have no idea how to install one or where to find the codes for one.

What I mean is something like this: [You must be registered and logged in to see this link.] the icon with the hat in colors.

How can I add one to my forum? A test forum is available to test all codes on Smile.

Any help on this matter would be greatly appericated.

-Brandon

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by SLGray on Sun Apr 19, 2015 3:34 pm

Are you referring to the mod color button in the editor?


Last edited by SLGray on Sun Apr 19, 2015 5:50 pm; edited 1 time in total

SLGray
Administrator

Reputation : 294
Points : 1595
Posts : 3721

View user profile http://fmthemes.forumotion.com

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by Ange Tuteur on Sun Apr 19, 2015 4:39 pm

Administration Panel > Modules > JavaScript codes management > New

Title : SCEditor Mod color
Placement : In all the pages
Code:
$(function() {
  if (!$.sceditor || !_userdata.user_level) return;
 
  var mods = {
    'u1' : '#FF6600',
    'u2' : '#FF0000',
    'u3' : '#FFFF00',
    'u4' : '#00FF00'
  },
  c = '#000000', i, u = 'u' + _userdata.user_id;
 
  for (i in mods) {
    if (i == u) {
      c = mods[i];
      break;
    }
  }
 
  $.sceditor.command.set('modcolor', {
    exec : function() { this.insert('[color=' + c + '][b]','[/b][/color]') },
    txtExec : function() { this.insert('[color=' + c + '][b]','[/b][/color]') },
    tooltip : 'Insert mod color'
  });
 
  toolbar += '|modcolor';
});

At the top you'll see a mods object with id:color pairs. To the right of the colon is the ID of the member, and to the left is their color. That's all you need to edit in the script.. Wink

As for the image, you'll need to add your own via CSS. Replace IMAGE by the URL of your image.
Display > Colors > CSS
Code:
.sceditor-button-modcolor {
  background-image:url(IMAGE) !important;
}

Ange Tuteur
Themer

Reputation : 204
Points : 9162
Posts : 303

View user profile http://fmdesign.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Sun Apr 19, 2015 8:01 pm

Thanks guys I will give these a try first thing! Smile

Edit: Is it ok if I use the icon you guys have? If so what is the url to the icon/image?

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by Ange Tuteur on Mon Apr 20, 2015 8:47 pm

There's no problem. Wink
[You must be registered and logged in to see this link.]

Ange Tuteur
Themer

Reputation : 204
Points : 9162
Posts : 303

View user profile http://fmdesign.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Mon Apr 20, 2015 9:29 pm

Ok I will add it soon Very Happy.

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Thu Apr 23, 2015 8:03 am

Hello,

After running a test of this on my test forum and adding the image url to the css. It works fine... but why is there the word youtube on the icon?

See:
[You must be registered and logged in to see this image.]

It is the last one in the editor.

Is there a way to fix this?

-Brandon

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by SLGray on Fri Apr 24, 2015 3:34 pm

This happened to me when I added the three new editor buttons. Reenter the codes again.

SLGray
Administrator

Reputation : 294
Points : 1595
Posts : 3721

View user profile http://fmthemes.forumotion.com

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Fri Apr 24, 2015 3:58 pm

What do you mean re enter the codes again... Like uninstall it and then reinstall it?

-Brandon

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by SLGray on Fri Apr 24, 2015 10:53 pm

That is correct.

SLGray
Administrator

Reputation : 294
Points : 1595
Posts : 3721

View user profile http://fmthemes.forumotion.com

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Sat Apr 25, 2015 4:41 pm

Ok I just removed all code relating to this feature, then re added it again... The word youtube is still appears on the icon. Mad Crying or Very sad Neutral

Ang other ideas?

-Brandon

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by SLGray on Sat Apr 25, 2015 5:01 pm

Have you cleared your browser's cache?

SLGray
Administrator

Reputation : 294
Points : 1595
Posts : 3721

View user profile http://fmthemes.forumotion.com

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Sat Apr 25, 2015 6:36 pm

I am using my mobile phone... I am pretty sure it isn't the cache... Should i try clearing the forum cookies

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by Ange Tuteur on Sun Apr 26, 2015 8:43 pm

My bad, I forgot to select the inner DIV of the button. That's where the icon is applied, the default for the FA SCEditor is a YT icone.

Change .sceditor-button-modcolor to .sceditor-button-modcolor div

Ange Tuteur
Themer

Reputation : 204
Points : 9162
Posts : 303

View user profile http://fmdesign.forumotion.com/

Back to top Go down

Solved Re: How to add staff moderation color icon?

Post by brandon_g on Mon May 04, 2015 3:32 pm

[You must be registered and logged in to see this link.] wrote:My bad, I forgot to select the inner DIV of the button. That's where the icon is applied, the default for the FA SCEditor is a YT icone.

Change .sceditor-button-modcolor to .sceditor-button-modcolor div

Thanks Ange, that indeed did the trick. Smile

Thanks so much... Solved and Archived Smile.

brandon_g
Coder

Reputation : 67
Points : 2255
Posts : 497

View user profile http://broadcastingduo.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum