Fandom Developers Wiki
Register
m (Reply)
Tag: sourceedit
Tag: rte-source
Line 64: Line 64:
 
Is there any way to make the module appear for users not logged into Fandom? It used to appear regardless iirc and it was helpful for drawing in new people who were on the fence about starting to edit. [[User:Roranoa_Drake_II|Roranoa Drake II]] ([[User_talk:Roranoa_Drake_II|talk]])
 
Is there any way to make the module appear for users not logged into Fandom? It used to appear regardless iirc and it was helpful for drawing in new people who were on the fence about starting to edit. [[User:Roranoa_Drake_II|Roranoa Drake II]] ([[User_talk:Roranoa_Drake_II|talk]])
 
: It's because it's attempting to load <code>mediawiki.api</code> module which doesn't load for anons. I'm aware of the bug, I just didn't get the time to fix this issue yet. It used to appear for anons back when it didn't need to query the API and took the values from JavaScript configuration. -- <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> 20:09, April 7, 2017 (UTC)
 
: It's because it's attempting to load <code>mediawiki.api</code> module which doesn't load for anons. I'm aware of the bug, I just didn't get the time to fix this issue yet. It used to appear for anons back when it didn't need to query the API and took the values from JavaScript configuration. -- <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> 20:09, April 7, 2017 (UTC)
  +
  +
== Empty Space Below Widget ==
  +
  +
What's up with the empty space below the widget? Is this something that can't be customized? [[User:DEmersonJMFM|DEmersonJMFM]]

Revision as of 20:20, 8 April 2017

Instructions

Can someone please simplify how to add this? It's very confusing, especially with where you should put each piece of code and what you should put in. (dev:DiscordIntegrator/code.js vs the importArticles thing). --Squirrel719 (talk) 09:00, August 3, 2016 (UTC)

You can either import the script through the importArticles function in Common.js (which will require the edit to be "verified"), or you can just add an import into the ImportJS page and bypass verification.
After that, you can either copy the template, or simply use the configuration option (which would require editing common.js and having the edit "verified"). Sajuuk 10:26, August 3, 2016 (UTC)

Load order

The script does not load the sidebar module in a consistent place - if the sidebar loads slightly slower than normal then it will be the first module in the sidebar rather than the last. Is it possible to fix this to be consistent? cqm 08:20, 18 Nov 2016 (UTC)

Yes, that is possible. -452 13:22, November 24, 2016 (UTC)
Could someone more knowledgeable perhaps...do something then? Since the issue persists.
~Ursuul 07:39, February 8, 2017 (UTC)
I updated it a few weeks ago, it should load below ads and content review module and above all other Rail contents. -- Cube-shaped garbage can 07:41, February 8, 2017 (UTC)
DiscordLoadOrder

────────────────────────────────────────────────────────────────────────────────────────────────────It seems not to have worked On this Wiki & others.
~Ursuul 08:28, February 8, 2017 (UTC)

That's exactly what's supposed to happen. -- Cube-shaped garbage can 08:30, February 8, 2017 (UTC)
Oh, my bad. Is there an older version that makes it always load below all rail contents? It’s a rather low-priority module for me, especially when AddRailModule is used alongside it.
~Ursuul 08:35, February 8, 2017 (UTC)
Try using
$(function() {
    mw.hook('DiscordIntegrator.added').add(function() {
        $('.DiscordIntegratorModule').appendTo('#WikiaRail');
    });
});
-- Cube-shaped garbage can 08:43, February 8, 2017 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────Perfect! Thanks so much!
~Ursuul 08:58, February 8, 2017 (UTC)

Issues that it causes for two other scripts

I imported the script through ImportJS but soon removed it because I discovered that it caused problems for two other JavaScripts that I use - Talk Button and Quick Image License (the latter doesn't have it's own page). It caused those two scripts to display twice instead of once each. ― C.Syde (talk | contribs) 10:45, December 8, 2016 (UTC)

LoggedIn parameter issue

So a few days ago, the Discord widget on our wiki's front page started displaying the unregistered user message even if you're logged in; looking at the revision history of the script, I assumed this was something to do with the most recent edits and simply waited for the latest revision to get passed, though it appears as though I assumed wrong. I can't tell if this is an isolated incident or an actual bug with the script, so a response would be appreciated in order to clear that up.

Thanks,
~PlasmoidThunder 14:35, January 27, 2017 (UTC)

That was a bug which I fixed, it got approved about two or three days ago. The widget is displaying normally for me on that front page, can you try clearing your cache? -- Cube-shaped garbage can 15:01, January 27, 2017 (UTC)
Tried clearing the cache and cookies, null editing the page, and restarting the browser, but I still get that message.
~PlasmoidThunder 15:16, January 27, 2017 (UTC)
Awkward, I can't reproduce the issue. Is somebody else facing that issue too? Which browser/OS are you using? -- Cube-shaped garbage can 15:27, January 27, 2017 (UTC)
A few people in the wiki's chat are seeing the same issue. I'm using Google Chrome, though I can't vouch for everyone else.
~PlasmoidThunder 19:56, January 27, 2017 (UTC)
Hey there, I had the same issue as well on We Bare Bears wiki with G.Chrome last week but things seems to be fixed after I remove the script import from MediaWiki:ImportJS and then re-adding the script again, you can try that and hopefully that helps, cheers. 𝒮𝓉𝒶𝓇𝓂𝒶𝓃 𝒲 13:40, January 28, 2017 (UTC)
We have it in our Common.js, but I'll give that a try and see if anything happens.
~PlasmoidThunder 15:12, January 28, 2017 (UTC)
That seemed to do the trick, thanks.
~PlasmoidThunder 21:56, January 30, 2017 (UTC)

The script doesn't work

I tried to install this script on this wiki, I set up server settings, but the script doesn't work. --Шпик (обс.) 16:00, March 9, 2017 (UTC)

Your Common.js is throwing an error on the mw.toolbar.addButton part. Try wrapping that part of your code like
$(function() {
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/ru/1/1d/Button_redirect_rus.png", "Перенаправление", "#REDIRECT [[","]]", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/commons/3/3c/Button_cat_ru.png", "Категория", "[[Категория:","]]", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikisource/ru/0/0b/Button-quotes.png", "Кавычки", "«", "»", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikisource/ru/a/a9/Button-dash.png", "Тире", "—", "", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/commons/0/0e/Button_acute_accent.png", "Ударение", "́","", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/commons/4/43/Button-template.png", "Шаблон", "{{","}}", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/commons/3/34/Button_hide_comment.png", "Комментарий", "<!-- "," -->", "");
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/commons/f/fd/Button_blockquote.png", "Развёрнутая цитата", "<blockquote>\n","\n</blockquote>", "");
    mw.toolbar.addButton('https://upload.wikimedia.org/wikipedia/commons/6/60/Button_insert_table.png', 'Вставить таблицу', '{| class="wikitable"\n|', '\n|}', '-\n! заголовок 1\n! заголовок 2\n! заголовок 3\n|-\n| строка 1, ячейка 1\n| строка 1, ячейка 2\n| строка 1, ячейка 3\n|-\n| строка 2, ячейка 1\n| строка 2, ячейка 2\n| строка 2, ячейка 3');
    mw.toolbar.addButton("https://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png", "Примечание", "<ref>","</ref>", "");
});
-- Cube-shaped garbage can 16:17, March 9, 2017 (UTC)

Making the Module Appear for Users Not Logged In

Is there any way to make the module appear for users not logged into Fandom? It used to appear regardless iirc and it was helpful for drawing in new people who were on the fence about starting to edit. Roranoa Drake II (talk)

It's because it's attempting to load mediawiki.api module which doesn't load for anons. I'm aware of the bug, I just didn't get the time to fix this issue yet. It used to appear for anons back when it didn't need to query the API and took the values from JavaScript configuration. -- Cube-shaped garbage can 20:09, April 7, 2017 (UTC)

Empty Space Below Widget

What's up with the empty space below the widget? Is this something that can't be customized? DEmersonJMFM