|
naken
|
 |
« on: February 29, 2012, 09:16:31 PM » |
|
I have tried adding a new template to the Addventure Wiki to make it easier to link to Addventure episodes. The template is here: http://www.ftf10.com/wiki/index.php?title=Template:Ep. Unfortunately it’s slightly fiddly to use: ideally you could just pass it the simple episode number, and it would split that apart into the necessary pieces and reformat them to construct the URL. But as it is you have to supply the first 3 digits ( with leading zeroes) in addition to the full episode number ( without leading zeroes). The Mediawiki software offers an extension that includes one or two functions that would be useful for this purpose: http://www.mediawiki.org/wiki/Extension:StringFunctions. But it appears that extension is not installed. Also this one http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions allows conditional constructs, which can be used, for example, to implement optional default arguments to a template. So pretty please, could someone add these extensions? 
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #1 on: February 29, 2012, 11:44:24 PM » |
|
An Addventure episode link template is a damn good idea. I'll look at it to see if the extensions are doable, but it won't be till at least this weekend. (I'll be busy the next few nights with the end-of-month Index updates.)
|
|
|
|
« Last Edit: March 01, 2012, 02:26:55 AM by Adama »
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
JH_
E Cup
Posts: 748
|
 |
« Reply #2 on: March 06, 2012, 07:31:17 AM » |
|
Thanks, Naken.
|
|
|
|
|
Logged
|
JH
|
|
|
|
naken
|
 |
« Reply #3 on: March 06, 2012, 10:28:53 PM » |
|
I’m still hoping for those string functions, so hopefully I can make the template easier to use. 
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #4 on: March 07, 2012, 01:30:04 AM » |
|
Sorry, been swamped with either Indexing or Work stuff. I do intend to get to it... unless JH wants to take a look.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
JH_
E Cup
Posts: 748
|
 |
« Reply #5 on: March 07, 2012, 06:55:44 AM » |
|
I'm afraid that wiki templates aren't an area that I know anything about.
|
|
|
|
|
Logged
|
JH
|
|
|
|
naken
|
 |
« Reply #6 on: March 07, 2012, 10:04:35 PM » |
|
Are you at least able to install that StringFunctions extension? That’s all I’m asking for; I can fix my template to make use of them.
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #7 on: March 08, 2012, 12:47:49 AM » |
|
First pass at installing it (following instructions on web page) gave me an error when I refreshed a Wiki page, I think it was "Magic Word not found"... will have to try again later.
(problem is that you've traded one guy who knows MediaWiki but has no time (Ten) for one guy who has the time but doesn't know MediaWiki very well (me)...)
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #8 on: March 08, 2012, 12:51:11 AM » |
|
It does appear that the ParserFunctions extension is already installed; it's just StringFunctions which is having problems.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
|
|
JH_
E Cup
Posts: 748
|
 |
« Reply #10 on: March 08, 2012, 07:09:46 AM » |
|
First pass at installing it (following instructions on web page) gave me an error when I refreshed a Wiki page, I think it was "Magic Word not found"... will have to try again later.
(problem is that you've traded one guy who knows MediaWiki but has no time (Ten) for one guy who has the time but doesn't know MediaWiki very well (me)...)
And another who doesn't even know what MediaWiki is. I can create, edit and delete wiki articles, and block users, but that's about as far as my knowledge goes.
|
|
|
|
|
Logged
|
JH
|
|
|
|
naken
|
 |
« Reply #11 on: April 03, 2012, 07:43:32 PM » |
|
Any joy with this?
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #12 on: April 04, 2012, 04:24:06 AM » |
|
Any joy with this?
Thought you'd be asking about this soon... sorry for not attending to it. I haven't looked at it since the install originally failed on March 7; I need to get back on and see if I can figure out why it didn't work.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
naken
|
 |
« Reply #13 on: August 23, 2012, 02:51:21 AM » |
|
Any joy with this?
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #14 on: August 26, 2012, 05:16:55 AM » |
|
Sorry, just spent the last few hours trying again. I still get that "Magic Word not found" error on all Wiki pages if I try to install the StringFunctions extension.
Any Python or MediaWiki experts out there? Here is the text of the error:
------------------------------------------------------ Internal error
Magic word not found
Backtrace:
#0 /home1/ftfoneze/public_html/wiki/includes/MagicWord.php(231): Language->getMagic(Object(MagicWord)) #1 /home1/ftfoneze/public_html/wiki/includes/MagicWord.php(184): MagicWord->load('len') #2 /home1/ftfoneze/public_html/wiki/includes/parser/Parser.php(3998): MagicWord::get('len') #3 /home1/ftfoneze/public_html/wiki/extensions/StringFunctions/StringFunctions.php(125): Parser->setFunctionHook('len', Array) #4 /home1/ftfoneze/public_html/wiki/includes/Hooks.php(117): wfStringFunctions(Object(Parser)) #5 /home1/ftfoneze/public_html/wiki/includes/parser/Parser.php(164): wfRunHooks() #6 /home1/ftfoneze/public_html/wiki/includes/StubObject.php(58): Parser->firstCallInit('wfStringFunctio...', Array) #7 /home1/ftfoneze/public_html/wiki/includes/StubObject.php(76): StubObject->_call('ParserFirstCall...', Array) (and so on...) ------------------------------------------------------
Thanks for any advice...
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
JH_
E Cup
Posts: 748
|
 |
« Reply #15 on: August 26, 2012, 05:30:40 PM » |
|
Since error messages tend to be very literal, the "Magic word not found" makes me wonder if there could be a typo at some point (though evidently not in the bit that you've quoted) so that a reference to "MagicWord" has an unwanted space in the middle of it.
|
|
|
|
|
Logged
|
JH
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #16 on: August 26, 2012, 05:58:41 PM » |
|
I think it's failing because the "len" magic word is not found. "len" is one of the functions in the StringFunctions extension. So it sounds like StringFunctions is depending on something else, or needs some other config options, but what is it???
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #17 on: August 26, 2012, 07:44:58 PM » |
|
Good news! For Naken anyway. I managed to do some hacking on the StringFunctions extension code, and got it to work. See my User Page for some examples that I tested with. Now I just need to solve the CAPTCHA issue. And somebody wanted a tree function...
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #18 on: August 26, 2012, 11:01:34 PM » |
|
... and CAPTCHA is installed now too!
At the moment it's configured so that it should only come up if you're creating a new account, or if you mis-type your password. If anybody has problems with pages not loading, please let me know.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
naken
|
 |
« Reply #19 on: August 27, 2012, 02:02:39 AM » |
|
Brilliant! Now to get back to that template I was trying to write...
|
|
|
|
|
Logged
|
|
|
|
|
naken
|
 |
« Reply #20 on: August 27, 2012, 02:22:41 AM » |
|
OK, it works! I have updated my Ep template to just take a simple episode number, and it will construct the appropriate episode URL.
Do you have to impose the CAPTCHA on existing users?
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #21 on: August 27, 2012, 02:35:36 AM » |
|
No, the Captcha is currently only active for new registrations or if you mistype your password. The specific config options that are available are: - 'edit' - triggered on every attempted page save (off)
- 'create' - triggered on page creation (off)
- 'addurl' - triggered on a page save that would add one or more URLs to the page (on, but the previous restrictions on URLs are still in place too)
- 'createaccount' - triggered on creation of a new account (on)
- 'badlogin' - triggered on the next login attempt after a failed one (on)
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
naken
|
 |
« Reply #22 on: August 27, 2012, 02:43:35 AM » |
|
Hmm, I was updating my user page to use the new version of the Ep template, and when I tried to save, it asked me to identify all the pictures of cats.
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #23 on: August 27, 2012, 03:20:01 AM » |
|
Hmm, I was updating my user page to use the new version of the Ep template, and when I tried to save, it asked me to identify all the pictures of cats.
Hm, odd. Maybe it thought you were trying to put a URL in there for some reason. However, when I tried updating the Ep template myself just now, it didn't prompt me. Let me know if it happens again, maybe we can figure it out.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
naken
|
 |
« Reply #24 on: August 27, 2012, 03:43:42 AM » |
|
Updating the Ep template didn't trigger it, it was updating my user page.
|
|
|
|
|
Logged
|
|
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #26 on: August 27, 2012, 05:08:06 AM » |
|
All right, I have turned off the "addurl" trigger. Try it again.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
naken
|
 |
« Reply #27 on: August 27, 2012, 05:23:57 AM » |
|
I reverted the edit and went to apply it again, and it still wants the cats.
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #28 on: August 27, 2012, 05:29:20 AM » |
|
Urg... it doesn't ask me that even when I edit the SAME page. Maybe it's because I have admin rights on the wiki.
Try creating a new page with just plain text on it? No URLs or links of any kind.
JH, can you try some things and see if you have any issues?
I'm not going to be able to look at it any further tonight, I need to get to sleep so I can go to work tomorrow... will have to pick this up again tomorrow night.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
JH_
E Cup
Posts: 748
|
 |
« Reply #29 on: August 27, 2012, 06:17:58 AM » |
|
No Captcha coming up for me, even if I add a new URL to a page. In any case, isn't the idea of the URL template to make it so that the Wiki doesn't realise that a URL is being added? So I doubt if it's the "addurl" option that's triggering it. Whatever's causing it, it looks as though admins are immune.
|
|
|
|
|
Logged
|
JH
|
|
|
|
naken
|
 |
« Reply #30 on: August 27, 2012, 01:57:23 PM » |
|
Try creating a new test username, and see if it happens with that.
|
|
|
|
|
Logged
|
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #31 on: August 27, 2012, 02:23:40 PM » |
|
Will try it late tonight.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
Adama
F Cup
Posts: 1404
Addventure Master
|
 |
« Reply #32 on: August 28, 2012, 03:45:17 AM » |
|
I think I've fixed it now. I was turning off the addurl trigger in the wrong place, looks like. I was able to duplicate your problem like you said, by using a test ID.
I also learned that it only happens if you're adding a new external link to a page; it would not have been triggered just by editing a page which already had links on it. So that may be the real reason why JH and my tests didn't catch it.
|
|
|
|
|
Logged
|
Adama, Addventure mega-geek
|
|
|
|
|
|