← Older revision
Revision as of 00:27, November 26, 2013
Line 1:
Line 1:
==Where is Wikia.js?==
==Where is Wikia.js?==
I want to use this on my wiki but I don't know where it is.[[User:VirusKA|VirusKA]] ([[User talk:VirusKA|talk]]) 21:06, November 21, 2013 (UTC)
I want to use this on my wiki but I don't know where it is.[[User:VirusKA|VirusKA]] ([[User talk:VirusKA|talk]]) 21:06, November 21, 2013 (UTC)
−
:If you can't find Mediawiki:Wikia.js on the search bar, then you would need to create it on yourself on the wiki. [[User:Kamikaze839|<span style="color:#8A2BE2;">'''Kamikaze839'''</span>]] 21:01, November 25, 2013 (UTC)
+
+
:You would have to navigate to the Wikia.js page on your wiki. For example: http://yourwiki.wikia.com/wiki/MediaWiki:Wikia.js (replace yourwiki with the name of your wiki). [[User:Rappy 4187|Rappy]] <staff/> 21:16, November 21, 2013 (UTC)
+
::Yeah i just figured that out.[[User:VirusKA|VirusKA]] ([[User talk:VirusKA|talk]]) 22:48, November 21, 2013 (UTC)
== Foo me?!?==
== Foo me?!?==
"phillipabatz.wikia.com/foo_page" please
"phillipabatz.wikia.com/foo_page" please
+
+
==Scripts Not Working==
+
For some reason on my wiki, [[w:c:lordofultima|The Lord of Ultima Wiki]], A bunch of the scripts, etc. I've installed don't want to load or will just stop working all of a sudden. Could someone please take a look at mi code and fix it? Also, I have those problems with my Global.js pages as well.
+
+
[[User:WilliamLazycat|William]] ([[User_talk:WilliamLazycat|Talk]]), Bureaucrat of the [[w:c:lordofultima|Lord of Ultima Wiki]] 04:10, November 22, 2013 (UTC)
+
+
:The list of imported scripts isn't separated with commas. By adding the missing commas you could also collect the other imports like this:
+
:<syntaxhighlight lang="jquery" enclose="div">
+
/* Any JavaScript here will be loaded for all users on every page load. */
+
+
var fdButtons = [];
+
fdButtons[fdButtons.length] = {
+
'label': 'Delete'
+
};
+
+
// http://dev.wikia.com/wiki/RevealAnonIP
+
window.RevealAnonIP = {
+
permissions : ['sysop', 'bureaucrat']
+
};
+
+
importArticles({
+
type: 'script',
+
articles: [
+
'w:c:dev:AutoEditDropdown/code.js',
+
'w:c:dev:FastDelete/code.js',
+
'w:c:dev:FloatingToc/code.js',
+
'w:c:dev:ListAdmins/code.js',
+
'w:c:dev:RevealAnonIP/code.js',
+
'w:c:dev:SocialIcons/code.js'
+
]
+
});
+
</syntaxhighlight>
+
: [[User:Arkondi|Arkondi]] ([[User talk:Arkondi|talk]]) 07:19, November 22, 2013 (UTC)
+
+
== Notes about namespaces ==
+
According to the code, this only works in ns:0,1,500,501,1201,and talk:1201 (whatever that is numerically). So that's main, talk, user blog, talk user blog, Thread and whatever is implied by the :1 in 1201:1. (Is that a coding mistake?)
+
+
This is a very limited number of namespaces, and frankly I can ''easily'' imagine directly sharing stuff from MediaWiki, our custom namespaces at Tardis, and the Help, Project, File and Category namespaces.
+
+
I think it'd be useful to have some sort of mechanism for local admin to specify which namespaces the icons will appear in. — [[User talk:CzechOut|CzechOut]] 19:30, November 22, 2013 (UTC)
+
:I've increased the number of namespaces the buttons display in, and I'll look into giving admins the option to define extra namespaces. [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 01:49, November 23, 2013 (UTC)
+
::It's now possible to define extra namespaces. See the [[SocialIcons#Configuration|configuration]] for more information. [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 02:23, November 23, 2013 (UTC)
+
+
:I'm not seeing where there's any user defined way to add this to custom namespaces, but this only loads in mainspace, blog and thread, 0, 500 and 1201 respectively. As for the syntax error question, consider the following
+
<syntaxhighlight lang="javascript">
+
var foo = {
+
1: 1,
+
2: 0,
+
3: 1,
+
4: 0,
+
5: 1
+
},
+
i,
+
x = 1;
+
+
// loop through numbers 1-5
+
for ( i = 1; i <= 5; i += 1 ) {
+
// this will print 1 0 1 0 1
+
console.log( foo[ i ] );
+
}
+
+
// check if the property 1 has a value of 1
+
if ( foo[ x ] === 1 ) {
+
// this will print true
+
console.log( 'true' );
+
}
+
+
// this will print false as the property is not defined
+
if ( foo[ '6' ] === 1 ) {
+
console.log( 'true' );
+
} else {
+
console.log( 'false' );
+
}
+
+
// now let's try this idea with a pagename
+
var page = {
+
'foo': 1,
+
'bar': 1,
+
'baz': 1
+
};
+
+
// this will print true if wgPageName (the current page) matches foo, bar or baz
+
if ( page[ wgPageName ] === 1 ) {
+
console.log( 'true' );
+
}
+
+
</syntaxhighlight>
+
:If you look at the last conditional, it's a quick easy way of checking if we're on the right page and only requires us to call wgPageName once as opposed to 3 times, each time checking if we're on the correct page. With this we can call wgPageName once ultimately making the script a little faster. {{User:Cqm/Signature|02:21, 23 Nov 2013 (UTC)}}
+
::And as I was writing the above, said change has been made... {{User:Cqm/Signature|02:24, 23 Nov 2013 (UTC)}}
+
:::I indeed added my response here before I saved the code page, hence why the option wasn't in the actual code yet. It should be now.
+
:::Feel free to make the change you've suggested above: if it saves us some extra milliseconds I'm all for it :). [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 02:26, November 23, 2013 (UTC)
+
+
:Tweaked it slightly by making it possible ''not to load it on a namespace''. Hope you don't mind.--''[[User:UltimateSupreme|<span style="color:#0078ff; text-shadow: 0px 1px 0.4px #0054d3, -1px -1px 1px white, -2px -2px 6px #0093f4;">~Ultimate</span>]][[User talk:UltimateSupreme|<span style="color:#f00; text-shadow: 0px 1px 0.4px #f33, 1px 0px 1px white, 2px 2px 6px #f33, -2px -2px 6px #f33;">Supreme</span>]]'' 10:34, November 23, 2013 (UTC)
+
::That's totally fine! [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 16:30, November 23, 2013 (UTC)
+
+
== Twiter tinyurl-ing ==
+
What would make this dramatically more useful to me is if the automatic text that's generated for a tweet were automatically tiny-url-ed. Many of our URLs would cut the 140 character limit in half, so tiny-url-ing is usually required. — [[User talk:CzechOut|CzechOut]] 19:40, November 22, 2013 (UTC)
+
:That's a great idea! I'll look into the TinyURL API and see what I can do. [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 01:49, November 23, 2013 (UTC)
+
::It seems that both the bit.ly API and the TinyURL api either require user authentication or put a limit on the amount of URL's you can shorten per day (unless you pay, of course). I'll hold off on making this change for now. [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 02:28, November 23, 2013 (UTC)
+
+
:::What about is.gd ([http://is.gd/apishorteningreference.php documentation], [http://is.gd/usagelimits.php ratelimit info])? It's not so well known, but it works. {{User:Cqm/Signature|17:07, 23 Nov 2013 (UTC)}}
+
::::It seems that Twitter automatically shortens URL now, per [https://blog.twitter.com/2011/link-sharing-made-simple this blog]. A link never takes up more than nineteen characters. I tested it: if you insert a link, then remove some of its characters the character count will not go down. [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 18:18, November 23, 2013 (UTC)
+
+
==Not Working==
+
This is not working on my wiki. [http://www.golden-globes.wikia.com]I need help!
+
+
[[User:Abbeylover|Abbeylover <3]] ([[User talk:Abbeylover|talk]]) 22:18, November 22, 2013 (UTC)
+
:I've installed the SocialIcons feature on your wiki. [[User:MarkvA|<span style="color: blue;">Mark</span>]]<staff /> ([[User talk:MarkvA|<span style="color: blue; font-size: x-small">talk</span>]]) 01:49, November 23, 2013 (UTC)
+
+
==New Feature Suggestion==
+
Hey yall. I had an idea for a position of the buttons. How about putting them next to the number of pages indicator rather than under them. Any chance of that happening?
+
+
[[User:WilliamLazycat|William]] ([[User_talk:WilliamLazycat|Talk]]), Bureaucrat of the [[w:c:lordofultima|Lord of Ultima Wiki]] 03:33, November 23, 2013 (UTC)