Jump to content

Topic on Project:Support desk

wgArticlePath.replace for specific URL

4
Keraunoscopia (talkcontribs)

Hi, I have no idea what I'm doing. On my Commons .js page, I want the link to go specifically to Special:Upload&uselang=experienced so I don't have to scroll down through a block of text every time. Believe it or not, I tried going through some of the javascript pages around here but this is like reading an alien language to me. Any help would be immensely appreciated. (Rationale: for absolutely zero reason I can figure out, Commons upload wizard just won't work for me, I can't upload anything without going to this page.) Thanks! Keraunoscopia (talk) 23:41, 8 March 2013 (UTC)

Bawolff (talkcontribs)

Try the following JS (Might not be the current "best practice", but I haven't really been following the js recommended practices, and in any case, it works, which is all that matters):

$( function() {mw.util.addPortletLink ('p-tb', wgScriptPath + "/index.php?title=Special:Upload&uselang=experienced", 'Old upload')});

Note, that puts the link in the toolbar entry of the sidebar, at the bottom. If you wanted it to be in the "participate" sidebar section (like the normal upload link), change 'p-tb' to 'p-participate'.


For uploadWizard - what web browser are you using? Do you have any other information on why it might not work for you? (If you don't mind me asking. Ideally we would want to track down what is wrong with upload wizard to prevent you from using it).

Keraunoscopia (talkcontribs)

Brilliant!!!! Thank you soooooo so much. I was just trying the wgScriptPath thingy myself when I came across your reply (my way didn't work at all).

As for UploadWizard, I'm currently using Firefox 16.0.2, on Mac OS 10.5.8. The two aren't supposed to mix, but no problems so far. Anyway, looks like I started having problems on March 3. That means through February 25, I uploading dozens of images through UploadWizard fine. I recall doing these. I have a couple images on March 1 and 2 that may or may not have used UploadWizard; I don't see any hidden "uploaded with UploadWizard" categories on any of these images (february or march). So let's just say that at the beginning of March, UW stopped working.

I've since tested it on OmniWeb and Safari. I know, I don't have the best browsers in the world. I cleared the cache, I even logged out/logged in on my computer. I haven't actually turned the computer off/on yet, but I can try that later.

So, to give some details since I probably should have done that on the UW feedback page (and I'll copy this text over there too), Special:UploadWizard shows up fine, with a "Select media file to share" button. I click on it.........oooooookkkkkkkkkkkk never mind, it's working now.

Well thank you for the code! I'll go back into my preferences and turn the UW back on because uploading multiple files on multiple tabs is a pain in the rear end. Not sure what happened, but UW is working for me again. Keraunoscopia (talk) 05:27, 9 March 2013 (UTC)

Reply to "wgArticlePath.replace for specific URL"