Wikia

Community Central

Fubuki風吹

aka sqm

894 Edits since joining this wiki
December 28, 2012
usertalkblogcontribseditcountsigbot

Hello there, and welcome to my message wall! Feel free to message me about anything here. I'll reply in about 12 hours. I'll try my best to reply as soon as I can. If I don't, feel free to post your message again.

141.8.189.114
  Loading editor
  • Think I've found the way to purge the cache for the code editor. Maybe doing "pagename?action=raw&action=purge" before loading the editor, or having a button to "Purge Page", will help solve the issue.

      Loading editor
    • 141.8.189.114
        Loading editor
  • Would you mind helping me optimize a bit of JS I have? It's intended to replace the sysop (or forummod or chatmod tags if needed) tag on specific users' userpages with their own custom text. (For example, on the page of the founder's girlfriend, I might want to change the sysop tag to say "Queen")

    /* http://www.mediawiki.org/wiki/Manual:Messages_API#Using_an_API_query_from_JavaScript
       Grab group names */
    function loadMessages( messages ) {
    	return new mw.Api().get( {
    		action: 'query',
    		meta: 'allmessages',
    		amlang: mw.config.get( 'wgUserLanguage' ),
    		ammessages: messages
    	} ).done( function ( data ) {
    		$.each( data.query.allmessages, function ( index, message ) {
    			if ( message.missing !== '' ) {
    				mw.messages.set( message.name, message['*'] );
    			}
    		} );
    	} );
    }
    function group(groupName) {
        return mw.msg('user-identity-box-group-' + groupName);
    }
    /* Replace Sheepy's sysop tag with "Mad Queen"
       Replace MaxiGamer's sysop tag with "Poosie Destroyahr" */
    function doChange(){
        var tags = document.getElementsByClassName("tag");
        var i, tagToReplace, tagReplaceWith;
        switch (mw.config.get("wgTitle")) {
            case "MaxiGamer WiiU":
                tagToReplace = group('sysop');
                tagReplaceWith = "Poosie Destroyahr";
                break;
     
            case "Sheepalicious McBigbutt":
                tagToReplace = group('sysop');
                tagReplaceWith = "Mad Queen";
                break;
        }
        for (i = 0; i <= tags.length-1; i++) {
            document.getElementsByClassName("tag")[i].innerHTML = tags[i].innerHTML.replace(tagToReplace,tagReplaceWith);
        }
    }
     
    loadMessages('user-identity-box-group-chatmoderator|user-identity-box-group-sysop|user-identity-box-group-threadmoderator').done(doChange());

    I'm trying to keep it user-friendly for the other admins and mods (who have very little experience in javascript even compared to myself who is definitely not as experienced as you), hence why the doChange function might seem a bit weird...


      Loading editor
    • View all 5 replies
    • Ah, thanks.

      Question, is it normal that the syntax highlighting is yelling at me about "use !== to compare with 0"?

      Also, no worries about the api thing. I just assumed that, since mediawiki.org had it, it would work as you'd expect it to - tested and functional.

        Loading editor
    • Yes, the code editor throws warnings for code which is not conventional. != is needed here, so don't change it.

      Also, I've updated the code above, so update it on your side too.

        Loading editor
    • 141.8.189.114
        Loading editor
  • I didn't want to bump a very old forum thread but the original discussion was here. This is late and I know, I wanted to ask if you would be willing to set up the non-conventional method of a javascript form to set this up? I promoted you to admin for access to common.js in the meantime.

    template that is inserted

    preload

    quick insertion template

    test page

      Loading editor
  • Can you block an IP address and how?

      Loading editor
  • Would you like to do me a favor (again)? I need to change the "Recent Activity" box back to the old Oasis theme using CSS.

      Loading editor
  • Hello friend. I like Gowther too.

    Tumblr nisvmzofji1t1f4gmo1 500
      Loading editor
  • Just thought this might humor you. This is from earlier today on a wiki I administrate.

    I'm not supposed to be able to delete threads, but... WHAM somehow knew what page to delete. :/

      Loading editor
    • Eeyup, WHAM has the support of deleting threads, while conventional methods are a lot more complicated. I do recall 452 describing it in some comments, but that seemed a lot more complex.

        Loading editor
    • Well then, maybe the author of WHAM should set it to remove instead of delete if they aren't VSTF/Wikia Admin, I mean if that's possible. Restoring the deleting thread doesn't cause it to reappear on the message wall and also it'll say "Empty's wall" on Special:Contributions. :/

        Loading editor
    • I'm not entirely sure how the the thread namespace works. I've never really bothered to look into how all of it's done, simply because I'm accustomed to the old-style forums and talkpages. So, I'd say threads are not my strong points, sorry. For the changes you wish to add and the errors, you could contact the author of the script though.

        Loading editor
    • I'm not sure of how the thread API works (if there is any) to cause messages to be removed, so I don't know how that'd work. Though you are admin on that wiki and you do have the delete permission which is all that is needed to delete thread comments (or any page). I might add an optional config in the future to not delete forum threads, so for now you could try using the "Delete Selected" option on WHAM if this becomes a common issue.

        Loading editor
    • 141.8.189.114
        Loading editor
  • hiya thank you for helping me edit my username if you need anything just let me know

      Loading editor
  • Hey Sqm,

    Thanks for helping put those forum posts up for deletion! However, could you please just report the user to the VSTF directly, instead of tagging every post for deletion?

    The reason is this: We can easily wipe out all of the spammer's posts with one click, however, because you tagged them, we have to go through your contributions and manually delete each one of your posts that tags them (which is a slight pain ;)).

    Thank you for your help, though, and keep being awesome!

    PRETZEL

      Loading editor
  • How can I add more fonts to my chat? For example, this chat have 9 fonts, and I want to add 1 more. What is the code to do that? (You can also make a page about that).

      Loading editor
    • 141.8.189.114
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message

Around Wikia's network

Random Wiki