Fandom Developers Wiki
Register
Tag: sourceedit
Tag: rte-source
Line 133: Line 133:
 
:: Weird. Does anybody else have an idea what might be causing the issue? -- <span style="font-family:Courier New;color:yellow">[[User:KockaAdmiralac|<span style="color:yellow">Cube</span>]]-[[User talk:KockaAdmiralac|<span style="color:yellow">shaped</span>]] [[Special:Contributions/KockaAdmiralac|<span style="color:yellow">garbage can</span>]]</span> 06:23, February 3, 2017 (UTC)
 
:: Weird. Does anybody else have an idea what might be causing the issue? -- <span style="font-family:Courier New;color:yellow">[[User:KockaAdmiralac|<span style="color:yellow">Cube</span>]]-[[User talk:KockaAdmiralac|<span style="color:yellow">shaped</span>]] [[Special:Contributions/KockaAdmiralac|<span style="color:yellow">garbage can</span>]]</span> 06:23, February 3, 2017 (UTC)
 
:::The original issue here (a stray non-breaking space at the end of [[MediaWiki:UserTags/module.i18n.js]]; caused by an editor bug, I believe) was [[Special:Diff/50867|fixed a few days ago]], however it seems the server caches for some wikis still haven't updated (another issue I've noticed a lot recently…). - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 07:57, February 3, 2017 (UTC)
 
:::The original issue here (a stray non-breaking space at the end of [[MediaWiki:UserTags/module.i18n.js]]; caused by an editor bug, I believe) was [[Special:Diff/50867|fixed a few days ago]], however it seems the server caches for some wikis still haven't updated (another issue I've noticed a lot recently…). - [[User:OneTwoThreeFall|OneTwoThreeFall]]&nbsp;<sup>[[User talk:OneTwoThreeFall|talk]]</sup> 07:57, February 3, 2017 (UTC)
  +
::::The issue is finally resolved for me. [[User:DEmersonJMFM|DEmersonJMFM]] 02:50, February 7, 2017 (UTC)

Revision as of 02:50, 7 February 2017

This is the talk page for UserTags. Post here if you have any of the following:
  • Questions about the the script or how to use it.
  • Any translations that are missing from the script.
  • Any improvements or suggestions for the script.
Archives


Tags Update

These tags should be updated to include the user tag for content moderators. Content Moderators don't have an existing user-identity box, unlike Administrators - User-identity-box-group-sysop - but then Roll-backers don't have an existing user-identity box either, and this script still allows Roll-backers to have the rollback user tag next to their username. Similarly because this script is still outdated, with Discussions Moderators still being tagged as Moderators. I tried to update the user tag name for Discussions Moderators on my wiki, but it broke, so I had to revert back to the user tag saying Moderator. ― C.Syde (talk | contribs) 09:14, August 12, 2016 (UTC)

Did you add "content-moderator" to both, tags and default groups?
window.UserTagsJS = {
	modules: {},
	tags: {
		threadmoderator: { u:'Discussions Moderator' },
		content-moderator: { u: 'Content Moderator' }
	}
};

UserTagsJS.modules.mwGroups =  ['bureaucrat', 'chatmoderator', 'threadmoderator', 'rollback', 'content-moderator', 'sysop', 'bannedfromchat'];

importArticle({type:'script', article:'u:dev:MediaWiki:UserTags/code.js'});

Could you provide a link to your edit, where changing the default groups and labels (like above) didn't give you the correct result? AmonFatalis 10:15, August 12, 2016 (UTC)

Yes for the Discussions Moderator identity box, but the change prevented the tag from appearing altogether. So I was forced to undo the changes.
I haven't updated the tags on my wiki to add content moderators, because I don't know how to get it to work. And I've never felt quite the same about editing Java Script pages since they became covered by the review process. ― C.Syde (talk | contribs) 10:31, August 12, 2016 (UTC)
[1] I've integrated the groups you were missing into your script configuration.AmonFatalis 12:00, August 12, 2016 (UTC)
The only problem is that now the Custom Java Script review module is in a different language. And I don't know why it's like that, or how to fix it. ― C.Syde (talk | contribs) 12:04, August 12, 2016 (UTC)
Known bug. It doesn't change the overall behavior of the module (same colors and layout as before), so you can just wait it out and report it through Special:Contact.AmonFatalis 12:29, August 12, 2016 (UTC)

Does not work on Special:Following

Hi there,

This script is really nice, but it does not work on Special:Following. In our wiki we use the following two functions to identify a user page and get the username therefrom. If you think it is useful, you can combine it with your script ;)

function isUserpage() {
    return ($.inArray(wgNamespaceNumber,[2,3,1200,500]) !== -1 || (wgCanonicalSpecialPageName && $.inArray(wgCanonicalSpecialPageName,['Contributions','Following']) != -1));
}
 
function getUserByPage() {
    if($.inArray(wgNamespaceNumber,[2,1200,500]) != -1) {
        return /:(.*)/.exec(wgPageName)[1].replace('_',' ');
    }
    else if(wgCanonicalSpecialPageName == 'Contributions') {
        return /\/(.*)/.exec(wgPageName)[1].replace('_',' ');
    }
    else if(wgCanonicalSpecialPageName == 'Following') {
        return wgUserName;
    }
}

Agent Zuri ?ber mich Nachrichtenseite Ank?ndigungen 07:39, August 26, 2016 (UTC)

Disabling Modules

Hey, I’ve noticed that certain modules, like the MediaWiki Groups, are listed as “enabled by default.” Does this imply that they can be disabled? The way I’m structuring my Staff on my Wiki is cascading, so if a Staff member is a Discussions Mod they will also be a Chat Mod & Rollback, & if a Staff member is a Content Mod they will also be a Discussions Mod & a Chat Mod & a Rollback, et cetera. Because of this, they get not only their tag but those below them, which is unnecessary since this is common knowledge on my Wiki. For this reason I was wondering if I could somehow disable the MediaWiki Groups so that I could use only Custom Tags, because I wouldn’t want to have to write whole User Filters for each & every staff member, I’d rather just have the other tags be off so that only the tags I assign to them will show up. Can this be done? How? Are there alternatives? Pls halp :) —Preceding unsigned comment added by Ursuul (talkcontribs) . Please sign your posts with ~~~~!

Faulty implode module

I believe I have correctly followed the installation process. Below is the code relevant to an odd issue I am having with the implode module. It works, I guess, but for some reason, the generated tag instead of saying 'moderator' says '¿moderator?' and the console detects some sort of error. I am aware that the two moderator variants are relatively new usergroups, and there was recently an update that I think properly introduced internal code for the 'content-moderator' group, although I am not sure how this might relate with my issue here. Any help in diagnosing or solving it would be much appreciated. Thanks.

window.UserTagsJS = {
    modules: {},
    tags: {}
};
UserTagsJS.modules.implode = {'moderator': ['content-moderator', 'threadmoderator']};

Hackey5 (talk) 04:37, October 30, 2016 (UTC)

This is due to not having set up the custom 'moderator' tag that you've created via implode module. Check the Core Configuration section in the docs for details on this.
Basically, you'll need to add a line like below to the UserTagsJS.tags object:
moderator: { u: 'display text for the moderator tag here' }
- OneTwoThreeFall (talk) 06:46, October 31, 2016 (UTC)
Ah, the other modules had worked on their own, so I assumed this one would too. Thanks for clarifying! Hackey5 (talk) 17:20, October 31, 2016 (UTC)

Disappearing tags

I inserted the script in importjs and added to the wikia.css and monobook.css according to the page but the "bureaucrat" tag disappeared, while the "autoconfirmed user" and "new editor" tags showed up. Can someone tell me how to choose which tags to be displayed on profiles, please?

Masson Thief (talk) 03:12, November 23, 2016 (UTC)

Recurring Bug

I’ve noticed that certain User-Name gradients, such as this:

a[href$=":Gunpowder2830"],
a[href$="/Gunpowder2830"]{
    color: #9999FF !important
    font-weight: bold !important;
    font size: 100%;
    background: -ms-linear-gradient(left, #FFFFFF 0%, #6699FF 50%, #000033 100%); background: -moz-linear-gradient(left, #FFFFFF 0%, #6699FF 50%, #000033 100%); background: -o-linear-gradient(left, #FF1493 0%, #FF0000 50%, #0A16F9 100%); background: -webkit gradient(linear, left top, right top, color stop(0, #FFFFFF), color-stop(0.5, #6699FF), color-stop(1, #000033)0; background: -webkit-linear-gradient(left, #FFFFFF 0%, #FFFFFF 50%, #000033 100%); background: linear-gradient(To Right, #FFFFFF 0%, #6699FF 50%, #000033 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

When placed in the Wikia.css page, they conflict with the UserTags JS. I’ve noticed this problem twice, both times it desaturated the colors of the Tags. An example can be see here.

As you can see, the Tier 5 Ship tag, which has a color in the Wikia.css, is completely desaturated for some reason. I have no idea why, but I can only assume that it is either a bug or that something about the gradient conflicts with the a.tag color inherit CSS which gives the tags their colors. Has anyone else had this issue? If so, is there a fix?
~Ursuul 21:04, December 8, 2016 (UTC)

I'm not sure what the problem is, as I don't normally use JavaScript for anything other than scripts. I tend to just use Cascading Style Sheets for changing the designs of wikis. Is there any reason why you're using both CSS and JS for this stuff? I usually tend to find it easier using just one, or the other. ― C.Syde (talk | contribs) 22:00, December 8, 2016 (UTC)
Because, as it states in the Styling/Appearance guide, you use CSS to control the colors of the tag which is made by the JS. Something about the CSS in the gradient I posted is interfering with the CSS that controls the UserTag colors, I just don’t know what it is or why it’s happening.
~Ursuul 22:04, December 8, 2016 (UTC)
That's probably because part of the code you presented is wrong. Instead of a[href$="/Gunpowder2830"] you'll want a[href="/wiki/User:Gunpowder2830"].C.Syde (talk | contribs) 22:09, December 8, 2016 (UTC)
Well, if that is the case, then how is that on this Wikia.css page, those gradients are used without the “User:” part added (or the $ removed) & don’t cause problems? I know that page is a bit of a mess & needs to be simplified, but if you look you can see they’re used without that tag & they still work; it’s just the above gradient that doesn’t work. I know there’s something wrong with it, because when I remove it the problem goes away, & when I re-add it the problem reappears, but I don’t think it’s the “User:” or $ parts. However, I will try it out to see if it works.
~Ursuul 22:30, December 8, 2016 (UTC)
EDIT: Still caused the problem. See how it looks here? It’s like that everywhere now. My main solution is just to not add this gradient.
~Ursuul 22:33, December 8, 2016 (UTC)
Okay, well, I'm not sure if there's anything I can do, since that's all that I can think of that would be causing the problem. I've recoloured all the user tags on the Community Central Wiki, when I used CSS to revert back to the design before it was redesigned to match the Fandom brand change, and I succeeded in recolouring the user tags. So unless this message will be of any use, this problem will be out of my hands. ― C.Syde (talk | contribs) 22:37, December 8, 2016 (UTC)
That’s ok. Thanks for trying. I’m just hoping someone with the right solution will come along, or at least someone who’s experienced this problem before & has some advice.
~Ursuul 22:40, December 8, 2016 (UTC)
Just discovered that the way those username highlights were added to CSS also work. I suspected that they didn't work because I was unfamiliar with those CSS codes, as I hadn't memorised them. But I recently revised some codes in MediaWiki:Wikia.css on a wiki and discovered that they colour the usernames using the same methods that you presented. ― C.Syde (talk | contribs) 02:37, December 9, 2016 (UTC)

Script is Broken

Sometime in the last week the script broke (confirmed on multiple wikis), likely the result of a bad script edit here. DEmersonJMFM 15:42, January 31, 2017 (UTC)

I noticed that too. ― C.Syde (talk | contribs) 22:34, January 31, 2017 (UTC)
So, no one has volunteered to fix it yet?--Luma.dash (talk) 18:42, February 2, 2017 (UTC)
After clearing my cache the script seems to be fixed on my side. -- Cube-shaped garbage can 18:52, February 2, 2017 (UTC)
Clearing cache/purging does nothing for me. DEmersonJMFM 19:19, February 2, 2017 (UTC)
Nothing for me, too. Cannot we ask one of the staff for help?--Luma.dash (talk) 19:42, February 2, 2017 (UTC)

(reset indent)
Could you open your JavaScript console and check which error are you getting? -- Cube-shaped garbage can 19:49, February 2, 2017 (UTC)

It's fixed at my end. I didn't even have to clear my cache. ― C.Syde (talk | contribs) 23:06, February 2, 2017 (UTC)

Uncaught Error: JavaScript parse error: Parse error: Illegal token in file 'w:dev:UserTags/module.i18n.js' on line 293 DEmersonJMFM 03:24, February 3, 2017 (UTC)

I don't get it. The issue seems to be fixed. At least at my end. Are you saying that you're still experiencing issues? ― C.Syde (talk | contribs) 03:34, February 3, 2017 (UTC)
I had the same error before refreshing my cache. That file also doesn't seem to have any parsing errors, I can import it normally.
Weird. Does anybody else have an idea what might be causing the issue? -- Cube-shaped garbage can 06:23, February 3, 2017 (UTC)
The original issue here (a stray non-breaking space at the end of MediaWiki:UserTags/module.i18n.js; caused by an editor bug, I believe) was fixed a few days ago, however it seems the server caches for some wikis still haven't updated (another issue I've noticed a lot recently…). - OneTwoThreeFall talk 07:57, February 3, 2017 (UTC)
The issue is finally resolved for me. DEmersonJMFM 02:50, February 7, 2017 (UTC)