FANDOM


  • I would like to disable upload pop-up on my wiki, I used this code in both Wikia.js and Common.js:

    $(document).ready(function()
    {
    	$('a.wikia-button.upphotos').unbind('click',UploadPhotos.showDialog);
    });

    But it is useless for now, could anyone help?

      Loading editor
    • what kind of upload pop up are you looking at? placeholder button? in edit button?

        Loading editor
    • All kinds, especially the button name "Add a Photo" on right rail.

        Loading editor
    • just set the button to hide (for the rail).

        Loading editor
    • Nope, I would like it link direct to via "Special:Upload".

        Loading editor
    • then set jquery .click() function to open special upload

        Loading editor
    • Could you show me how can I do it? I'm not good with the code, I don't know where .click() should be put.

        Loading editor
    • ill try now..

        Loading editor
    • what about when you editing in a page? would you like to change the current page, or open a new window? I think those buttons should be left alone.

        Loading editor
    • if you only want the function for only the rail, then alter the code like this:

      $(".upphotos").click(function () {
      	window.location.replace("http://lightorbit.wikia.com/wiki/Special:Upload");});

      And it should only need to go into common.js

        Loading editor
    • The method described on disable wiki already does that. The link already points to Special:Upload. It only "unbinds" the script added by Wikia so it acts like a normal link instead of opening the pop-up.

        Loading editor
    • hm... good point.

      where did you insert the code?

        Loading editor
    • Do you see the link "Where do I put that?" above the code? Try to follow the instructions

        Loading editor
    • Ciencia Al Poder wrote: Do you see the link "Where do I put that?" above the code? Try to follow the instructions

      i dont think this comment is to me?

        Loading editor
    • Echoblast53 wrote: i dont think this comment is to me?

      Of course it is

        Loading editor
    • Ciencia Al Poder wrote:

      Echoblast53 wrote: i dont think this comment is to me?

      Of course it is

      i ment if Itsuki Lee put it into Common.js, or MediaWiki:Common.js

        Loading editor
    • Oh, sorry. Blame the lack of indentation of this absurd and stupid (I'm allowed to write that, Eladkse?) forum system

      Edited for language by Eladkse

      Added alternate negative adjectives so the whole message idea remains

        Loading editor
    • Echoblast53 wrote:
      if you only want the function for only the rail, then alter the code like this:
      $(".upphotos").click(function () {
      	window.location.replace("http://lightorbit.wikia.com/wiki/Special:Upload");});

      And it should only need to go into common.js

      Thank you Echoblast53.

        Loading editor
    • Ciencia Al Poder wrote: Oh, sorry. Blame the lack of indentation of this forum system

      Edited for language by Eladkse

      No worries,

      But is every jquery expert sure that the jquery will work ({{#NewWindowLink: w:c:disable:Add_a_Photo_button_in_the_photos_module|code here}})?

        Loading editor
    • I recently had a similar code removed from my wiki, so be aware that you are breaking the ToU. <sigh>

        Loading editor
    • Lachlan5963 wrote: I recently had a similar code removed from my wiki, so be aware that you are breaking the ToU. <sigh>

      tou?

        Loading editor
    • Terms of Use and Help:Customization Policy. Both are written in a special way so staff can distort it to avoid just about anything they don't like. Or, they can just add new sections.

        Loading editor
    • Lachlan5963 wrote: Terms of Use and Help:Customization Policy. Both are written in a special way so staff can distort it to avoid just about anything they don't like. Or, they can just add new sections.

      seems changing the upload button location seems fine, just not removing it

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.