User talk:MarkS
If you leave a comment here then I will normally reply to your comment here unless:
Therefore if you leave a comment please add this page to your watch list. |
Archive |
Signpost updated for May 21st, 2007.
![]() |
---|
| ||
Volume 3, Issue 21 | 21 May 2007 | About the Signpost |
|
| |
Home | Archives | Newsroom | Tip Line | Single-Page View | Shortcut : WP:POST |
|
You are receiving this message because you have signed up for the Signpost spamlist. If you wish to stop receiving these messages, simply remove your name from the list. Ralbot 05:24, 22 May 2007 (UTC)
question about extra edit buttons
Thanks for the great extension! I'm trying to install it on my local mediawiki installation. I'm having a bit of trouble..
I created a user MarkS and copied the css file to User:MarkS/XEB/live.css and the .js file to User:MarkS/extraeditbuttons.js and added this line in MarkS/monobook.js:
- // Script from User:MarkS/extraeditbuttons.js
importScript('User:MarkS/extraeditbuttons.js'); //User:MarkS/extraeditbuttons.js
in the error console of firefox I get the following error:
- Error: invalid label
- Source File: :http://localhost/FLM/mediawiki-1.9.3/index.php?title=User:MarkS/monobook.js&action=raw&ctype=text/javascript&dontcountme=s
- Line: 1, Column: 16
- Source Code:
- {{subst:js|User:MarkS/extraeditbuttons.js}}
pointing to the colon after the word 'User' above
can you please point me to your previous answers regarding local installation
thanks a lot for your time and any help!
--Gargamel573 22:03, 24 May 2007 (UTC)
- Sorry for the delay in reply I've been away. My best guess is that your setup doesn't like the 'importScript' function. I suspect this function is somewhere in English Wikipedia rather than the MediaWiki software. Try using the following lines in monobook.js instead of the line importScript line:
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:MarkS/extraeditbuttons.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
- By the looks of it the top of XEB article has been updated for a new form of including scripts which might not work on other setups. I'll amend the main XEB documentation. Let me know how you get on. --MarkS(talk) 19:20, 28 May 2007 (UTC)
- Thanks for the help, it works great!
- one last Q: to what location (path) on the wiki do I copy the images I downloaded from the XEB page?
- Thanks a lot for the extension and the help :)
- Gargamel573 11:41, 30 May 2007 (UTC)
- Its going to be a long boring process to move the images! But my understanding is that it should be done because Wikimedia don't like external sites linking into their images. To get the images out of wikipedia the quickest way is to display the XEB toolbar and right click on each button and select SaveAs to save the images to your local machine. Then user the "Upload file wizard" in your wiki to upload them. I don't think it will offer you a choice where to save the image it just uploads it and gives it an almost random path name. You need to make a note of the path name (and make sure it is the path of the image itself rather than the page with the image and all its information). Once you've move the images you should see that the URL starts with the same path. Place this common route into the variable ISRC (you can see this at the top of the script). Then place the bit that changes for each button into the part of the script that contains the details of each button). Any problems let me know. --MarkS(talk) 19:35, 30 May 2007 (UTC)
Signpost updated for May 28th, 2007.
![]() |
---|
| ||
Volume 3, Issue 22 | 28 May 2007 | About the Signpost |
|
| |
Home | Archives | Newsroom | Tip Line | Single-Page View | Shortcut : WP:POST |
|
You are receiving this message because you have signed up for the Signpost spamlist. If you wish to stop receiving these messages, simply remove your name from the list. Ralbot 06:37, 29 May 2007 (UTC)
Hello Mark. A question about your "Extra buttons" script.
I installed your extra buttons script in my .js file however for some reason the extra buttons only work for talk pages of users. In articles or in talk pages of articles the extra buttons don't seem to work. Is there any way you can make them work everywhere?Wikidudeman (talk) 01:41, 2 June 2007 (UTC)
- XEB should work fine for both articles and talk pages. I've done a bit of testing and the problem seems to line in your monobook.js file. You call the "addOnloadHook" function at the bottom of your code and pass in a function to run. The bottom of that function has an if statement ('if ( show_cwli == true )'). JavaScript Debugger (a firefox extension that I use for checking for errors) reports 'show_cwli' as an undefined variable. If I remove the if statement (and the conditional block of code that goes with it) then it all works fine. The top of the function passed to addOnloadHook stops further execution for User and User_Talk pages which is why XEB works fine for these pages for you. My guess is that your function runs first, fails to complete and that stops XEB's code frrm running. I hope this helps, if you want to discuss some more let me know. --MarkS(talk) 19:31, 4 June 2007 (UTC)
- Do you know what I could change in my monobook file exactly to make it work? I'm not great with scripts so could you just copy the original flawed text and provide the new text that would fix the problem? Here's my monobook file [[1]].Wikidudeman (talk) 22:26, 4 June 2007 (UTC)
- From my testing removing the following lines near the bottom of your monobook.js should make it work:
if ( show_cwli == true ) {
addPortletLink("tags", "javascript:doCleanup('can we link it')", "can we link it", "can we link it", "Can we link it", "");
}
- Doing this may (in some circumstances) stop this part of your script running. I'm not sure what circumstances they are because in my testing this bit always crashed and didn't actually work. Try it and let me know if this works. --MarkS(talk) 21:35, 8 June 2007 (UTC)
Signpost updated for June 4th, 2007.
![]() |
---|
| ||
Volume 3, Issue 23 | 4 June 2007 | About the Signpost |
|
| |
Home | Archives | Newsroom | Tip Line | Single-Page View | Shortcut : WP:POST |
|
You are receiving this message because you have signed up for the Signpost spamlist. If you wish to stop receiving these messages, simply remove your name from the list. Ralbot 07:38, 5 June 2007 (UTC)
Signpost updated for June 11th, 2007.
![]() |
---|
| ||
Volume 3, Issue 24 | 11 June 2007 | About the Signpost |
|
| |
Home | Archives | Newsroom | Tip Line | Single-Page View | Shortcut : WP:POST |
|
You are receiving this message because you have signed up for the Signpost spamlist. If you wish to stop receiving these messages, simply remove your name from the list. Ralbot 02:47, 13 June 2007 (UTC)
Hi, please see this page. Thank you--OsamaK 10:27, 14 June 2007 (UTC)
- Answered on the script talk page --MarkS(talk) 19:54, 14 June 2007 (UTC)
Where is common.js ?
Hi Mark,
I am very interested in using your script on our own wiki. You mention at the end of your descriptions that it may be possible to add the script to common.js as a way of automatically enabling the extra buittons for all users. I would like to do this but can't find common.js on our wiki server. Where is it supposed to be?
Cheers, Geoff Glt101 21:17, 18 June 2007 (UTC)
Hi again,
For those, like me, who are utterly bemused by how this all works, here is what I have discovered so far. The Big Secret is that there is no file called common.js It is actually a page stored in the wiki. You take the javascript document.write that Mark shows and paste it into that page by going here: http://your.domain.name/index.php?title=MediaWiki:Common.js As yet, I haven't got these buttons to work on our wiki, so this is not the whole story.
Cheers, Geoff Glt101 18:04, 19 June 2007 (UTC)
Hi one more time,
I got the buttons working (hurrah!) ...but there is a strange problem. I can make the buttons work on our wiki if I use the document.write with the URL pointing to your page here User:MarkS/extraeditbuttons.js. If I try to load the code from a User page on our own wiki it does nothing.
I know that code in http://wiki.originlab.com/index.php?title=MediaWiki:Common.js is working from simple document.write statements -I see output. However, if I put the same statements into the top of the User:<UserName>/extraeditbuttons.js I see nothing.
Can you exaplin why it should work when the URL points to your page here and not when the URL is http://wiki.originlab.com/index.php?title=User:Originla/extraeditbuttons.js ? The code at both sites is identical.
We are using MediaWiki 1.9.3
Cheers, Geoff Glt101 18:43, 19 June 2007 (UTC)
- To be honest I don't know. A problem I've often had is knowing exactly how all the standard MediaWiki scripts interact with Wikipedia scripts and with XEB itself. If I look at http://wiki.originlab.com/index.php?title=User:Originla/extraeditbuttons.js then I can see the code. The top part of the code attempts to load a CSS file (you've updated the URL for your wiki) but when I follow that link I can't find the CSS file. Did you copy this over as well? It might be crashing here when it tries to load the CSS file. Another possibility is that users aren't allowed to run their own Javascript. To fix this you need to have '$wgAllowUserJs=true;' in your localsettings.php file. Without this turned on then MediaWiki won't run anything in the user space (took me ages to find this when I setup my own test wiki). It it still doesn't work then you could try running a debugger with it (I use a Firefox extension called JavaScript debugger and tell it to stop on all errors) to see if something is wrong. If you still can't solve it and your willing to let me setup an ID on your wiki then let me know and I'll have a look. --MarkS(talk) 19:42, 21 June 2007 (UTC)
Signpost updated for June 18th, 2007.
![]() |
---|
| ||
Volume 3, Issue 25 | 18 June 2007 | About the Signpost |
|
| |
Home | Archives | Newsroom | Tip Line | Single-Page View | Shortcut : WP:POST |
|
You are receiving this message because you have signed up for the Signpost spamlist. If you wish to stop receiving these messages, simply remove your name from the list. Ralbot 08:53, 19 June 2007 (UTC)