UDWiki:Community Portal/Technical Help Archive: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
mNo edit summary
No edit summary
Line 179: Line 179:
'''Notes'''
'''Notes'''


Into a smaller, 3x3 area? It's probably easy to do, but I'm stumped. --[[User:TheBardofOld|TheBardofOld]] 23:40, 27 May 2010 (BST)
Into a smaller, 3x3 area? It's probably easy to do, but I'm stumped. --{{User:TheBardofOld/Sig}} 23:40, 27 May 2010 (BST)
:You'd need to edit the template. We already have a similar template that works on a 4x4 group of blocks, and you can see it in action at, say, [[Caiger Mall]], up in the top left of the page. It's the [[:Template: Multiblock Structure|Multiblock Structure template]]. If that'll work for you, great. If not, you'll probably want to start either with that or with the one you're currently using and then just chop it back to be 3x3. {{User:Aichon/Signature}} 01:19, 28 May 2010 (BST)
:You'd need to edit the template. We already have a similar template that works on a 4x4 group of blocks, and you can see it in action at, say, [[Caiger Mall]], up in the top left of the page. It's the [[:Template: Multiblock Structure|Multiblock Structure template]]. If that'll work for you, great. If not, you'll probably want to start either with that or with the one you're currently using and then just chop it back to be 3x3. {{User:Aichon/Signature}} 01:19, 28 May 2010 (BST)
::Alright, thanks. --[[User:TheBardofOld|TheBardofOld]] 02:49, 28 May 2010 (BST)
::Alright, thanks. --{{User:TheBardofOld/Sig}} 02:49, 28 May 2010 (BST)


== Mini Calendar Help ==
== Mini Calendar Help ==

Revision as of 00:27, 12 May 2012

Pretty new page...

Just set this up - everyone okay with this?

Anyway, is there a way on my user page to make those sidebars always equal the same length in pixels, even when I'll be changing the individual templates (thus just adding a few blank lines not a solution.) Linkthewindow  Talk  02:32, 22 March 2009 (UTC)

Doubt it, though height:ypx can set the height, but if the content is more than the limit set then it will exceed it. --  AHLGTG THE END IS NIGH! 02:01, 30 March 2009 (BST)

Includeonly parsing

I'm stumped by this one, I'm currently attempting to create some boilerplate documentation for flagboxes for consistancy and to reduce server load (less in the noinclude tags)

I've run across something weird with the parser, see Template:FlagboxDoc1 and Template:FlagboxDoc2.

Here's an example with less of the other nasty details of the template:

I want to use a variable call to display some text that may include wiki-code. However I want the text to be displayed and not parsed. So I wrapped the variable in nowiki tags.

<nowiki>{{{1}}}</nowiki>

Of course now the parser doesn't treat the variable as a variable. So I needed the template to accept the variable, and when used spawn some nowiki tags so whatever that variable was called with would not be further parsed. No problem, just wrap the nowiki tags in their own personal escort of includeonly tags, thus the nowiki would only be applied when the template was used, and after the variable had turned into code.

<includeonly><nowiki></includeonly>{{{1}}}<includeonly></includeonly></nowiki>

Even getting my example to work above is being annoying, the closing nowiki should appear inside the includeonly's of course. I figure the combination of nowiki and includeonly tags is screwing up what I think the parser should be doing. Maybe I have to nowiki the nowiki tags to stop them accidentally nowiking the includeonly's?

<includeonly><nowiki><nowiki></includeonly>{{{1}}}<includeonly></nowiki></includeonly></nowiki>

Well, that's just making the parser fail even more, a conglomeration of nowiki tags, including a surrounding pair outside this example is really fucking things up.

I figured maybe escaping some of the angle brackets but I do need the tags evaluated, the usual escaping trick only works for showing tag examples though templates.

This is confusing, but I'll try and round things up:

I want to call a template with a variable that may contain code: EG: {{TemplateO'Doom|[[Example page|Some Hyperlink]]}}

and I want that displayed as plain text on viewing the page:

[[Example page|Some Hyperlink]]

as opposed to the usual situation where the wiki would then go and turn that into a link like so:

Some Hyperlink

Am I missing something really obvious, or what? -- User:The Rooster RoosterDragon User talk:The Rooster 16:29, 18 July 2009 (BST)

Is it safe to assume that you solved this problem?--The General T Sys U! P! F! 20:49, 11 August 2009 (BST)
Nobody responded, I didn't really solve it but instead used a workaround. I pass the normal version and a nowiki'ed version if needed now. It's not too bad, but it'd be nice to be able to get rid of the redundancy if anybody has some bright ideas. -- User:The Rooster RoosterDragon User talk:The Rooster 23:27, 11 August 2009 (BST)

Help!

I accidentally uploaded this: Image:Redmoonrise.png. I grabbed the wrong file and I want it deleted! Where do I request this? --SarahElaine 00:42, 11 November 2009 (UTC)

The pages for deletion are found at A/D and A/SD depending on circumstances. I've put this one up for you and it should be sorted shortly, there's nothing more you need to do in this case. -- To know the face of God is to know madness....Praise knowledge! Mischief! Mayhem! The Rogues Gallery!. <== DDR Approved Editor 00:49, 11 November 2009 (UTC)

Is this possible?

Is it possible to downscale this:

The Malton Suburb of Empty Template
NW N NE
W
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
a field a field a field a field a field a field a field a field a field a field
E
SW S SE

Notes

Into a smaller, 3x3 area? It's probably easy to do, but I'm stumped. -- TheBardofOld 23:40, 27 May 2010 (BST)

You'd need to edit the template. We already have a similar template that works on a 4x4 group of blocks, and you can see it in action at, say, Caiger Mall, up in the top left of the page. It's the Multiblock Structure template. If that'll work for you, great. If not, you'll probably want to start either with that or with the one you're currently using and then just chop it back to be 3x3. Aichon 01:19, 28 May 2010 (BST)
Alright, thanks. -- TheBardofOld 02:49, 28 May 2010 (BST)

Mini Calendar Help

I created this Calendar and then started work on a mini version of it. I'm having trouble getting the table to do what I want, though. I'd like for the cells to display a title when hovering over the cell similar the BB3 minimap to the right:

We are in:
[[{{{suburb}}}]]


I found that I would need to use an HTML table rather than CSS but I can't seem to get the code right. It could be that I've just stared at it too long and am missing something simple. Could someone help? I am using the templates {{CalendarOfEventsMini}} and {{CalendarDaysMini}}. I reverted the templates back to CSS so you could get a better idea of how I'd like the end result to appear. Thanks in advance for any help. ~Vsig.png 19:29, 16 August 2010 (BST)

ETA: Also if anyone can think of a way to template the whole thing that would be lovely. The problem I encounter is that the table is not static; it changes every 28 to 31 days. The only solution to that problem that I have come up with so far is one massive variable formula (i.e. if month = Septermber then use this table, if Month = October then use this table). That would be a lot of coding and I'm not entirely sure if variable formulas would work like that. ~Vsig.png 21:20, 16 August 2010 (BST)
Template a table with enough spaces for the largest grid you could need (I imagine that'd be a 31-day month beginning on a Sunday, yeah?). Fill each cell with an If template that'll make it white if only containing a number, black if containing "N", and coloured with a hex colour if one is supplied. Should allow you to enter a date, or an event with a background colour, or just N for a null cell. As for the mouse-over titles, you'll need to have each cell contain the code title="TITLE" in the cell's display code (ie, the stuff before the pipe that separates the display stuff from the contents stuff). You may have to leave that as a template variable so you can adjust it while using it as a template. If you ask really really nicely I could try to give it a bash but If templates are not my friends. Strength is just an accident arising from the weakness of others 21:30, August 16, 2010
Hi, I'm the guy that did all of the BB3 coding, including that map and the other similar ones. You don't actually have to use HTML coding to make it work. I just chose to do that since it was easier for me, given that wiki tables have quite a few quirks to them that I didn't want to have to deal with at the time (stuff like adding an extra pixel here or there, or breaking dramatically when you use certain types of code). If you want a MUCH simpler example of how to make those hover-over words appear, check here, where I actually use just a regular wiki table to do it and even offer a brief explanation. I think I used basically the same idea for BB3minimap, so you should be able to work with that one I linked a bit more easily.
As for the calendar being a template, that'd be a bit trickier, since there are lots of things you'd need to consider. If you want to make a calendar that auto-generates everything with the start of each new month, I think it might theoretically be possible, but after giving it a minute or two of thought, I don't see how it could be done easily or with anything less than a few thousand lines of code if you need to address all of the possible issues. Simply not worth the effort, if you ask me. If, instead, you want to do as you suggested, where you code up each month's calendar in advance and have it simply swap one for the next one, then that's actually pretty simple. You could do something like the following to make it work:
{{switch
|{{CURRENTMONTH}}
|case: 1={{User:Vapor/Sandbox/Calendar 1}}
|case: 2={{User:Vapor/Sandbox/Calendar 2}}
|case: 3={{User:Vapor/Sandbox/Calendar 3}}
|case: 4={{User:Vapor/Sandbox/Calendar 4}}
|case: 5={{User:Vapor/Sandbox/Calendar 5}}
|case: 6={{User:Vapor/Sandbox/Calendar 6}}
|case: 7={{User:Vapor/Sandbox/Calendar 7}}
|case: 8={{User:Vapor/Sandbox/Calendar 8}}
|case: 9={{User:Vapor/Sandbox/Calendar 9}}
|case: 10={{User:Vapor/Sandbox/Calendar 10}}
|case: 11={{User:Vapor/Sandbox/Calendar 11}}
|case: 12={{User:Vapor/Sandbox/Calendar 12}}
}}
Then, you would just put the code for each month's calendar on that page. It would switch out on its own at the start of each month, but it would still, unfortunately, require that you code each calendar from scratch. Ideally you could reuse most of the code though, so it shouldn't mean a whole lot of new code each month. You could also do as Misanthropy suggested, which will let you generate the calendar if you give it the numbers and colors for each individual block in the calendar, and that should be possible with much less code than the auto-generating idea I bounced around earlier. Keep us posted here if you bump into any other issues or if anything we said doesn't make sense. Aichon 23:44, 16 August 2010 (BST)

Thanks both Misanthropy and Aichon. It looks like my title problem really was a simple as having a pipe in the wrong spot and then overthinking the problem. I got it working with the info you both provided. Thanks.

As for the template, I agree that it would be a lot of work to have the template contain the code to auto-generate. It just wouldn't be worth it I think. I really just needed something to add to the group page without using 100 lines of code on an already cluttered page. What Aichon suggested will work for that and I like that it auto updates at the start of each month. Coding the calendars isn't all that time consuming. I did August, Semtember and October in about 15 minutes. I think I'll go with Aichon's idea for our group and maybe offer a tut in case anyone else wants to use it. Thanks again for the help. ~Vsig.png 03:13, 17 August 2010 (BST)

ETA: On second thought the above code does not appear to work for me. I copied the {{switch}} template from above here and the code for my calendar here, but it returns...nothing. In fact, changing "Case: 8=(anything)" returns nothing so I'm not sure what I could be doing wrong?? On a side note if you can help me get past this one part I may have figured out how to wrap it all up into one template.~Vsig.png 05:05, 17 August 2010 (BST)
I tried playing around with it, and I really have no idea why it's not working. I couldn't see a thing that was wrong (the code mirrors the same code I use for my userpage, which switches daily, and apart from using {{CURRENTMONTH}} instead of {{CURRENTDOW}}, I see nothing different. I'll try another time using {{CURRENTMONTHNAME}} and named cases to see if that helps at all. Strength is just an accident arising from the weakness of others 05:21, 17 August 2010 (BST)
Nope, no luck. Trying something else now. Gimme ten. Strength is just an accident arising from the weakness of others 05:25, 17 August 2010 (BST)
The word "case" needs to be lowercase (as opposed to "Case"), and I told you slightly incorrectly earlier regarding the numbers you should use. The "case: 1" parts of the code should read "case: 01" instead, since the {{CURRENTMONTH}} magic word gives us back the number of the month with zeros padding the front for the single-digit months. As soon as I made those fixes, it worked fine on your page when I was previewing it. Aichon 05:32, 17 August 2010 (BST)
I made both of those fixes to no avail. Weird. Strength is just an accident arising from the weakness of others 05:33, 17 August 2010 (BST)

Ah ok thanks. Working now. When it didn't work originally I removed the "case:" so it read just "|8=...". I must have capitilized when i retyped it. I'll work on a template when I have more time. Thanks again for the help. ~Vsig.png 05:55, 17 August 2010 (BST)

Ok so now I've created my Template. {{2010CalSmall}} now produces a small calendar based on user defined parameters. I had to ditch the idea of an auto updating calendar since it wouldn't do much good to have the month update but not the other parameters. One could acheive the same by using Aichon's suggestion above but place {{2010CalSmall}} on the page rather than the code. I ran into one new problem, though:
{{2010CalSmall
|Month=September
|Heading_Color=#660000
|ColSpan_Color=#CCCCCC
|Date6_Bgcolor=#660000
|Date6_Fontcolor=#FFCC33
|Date6_Event=Malton Murder Awards MMX}}

Produces


September, 2010
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
As you can see the calendar does what I want except that hovering over empty cells displays blank parameter data rather than leaving leaving title blank. I think what I need is some sort of Null handling to negate the issue but I can't seem to figure that part out. The title data is found on Template:CalendarDaysMini.
The only other issue I'm having with it is sizing. I can't seem to adjust the size table or any of its cells (the cells are tables themselves). Hopefully this doesn't fall under the same problem Aichon brought up earlier with wiki table quirks. It's almost there. Just need a bit more help. Sorry for bugging y'all so much. ~Vsig.png 20:36, 17 August 2010 (BST)
The parameter you've set up to be changed can be given a default (like how many templates will say "This user" unless a name is supplied. I could be wrong, but just add the default after a pipe after the parameter number (so if you're using {{{1}}}, make it {{1|Default text}}. A space, or better yet,   should be used as your default text. Strength is just an accident arising from the weakness of others 21:07, 17 August 2010 (BST)
Awesome! That did the trick. Much obliged (once again)~Vsig.png 21:23, 17 August 2010 (BST)

I reeeally hate to keep bugging you guys but I have another question. Is there any reason why this works:

{{switch
|{{CURRENTMONTH}}
|case: 01=
|case: 02=
|case: 03=
|case: 04=
|case: 05=
|case: 06=
|case: 07=
|case: 08={{2010CalSmall|Month=August}}
|case: 09={{2010CalSmall|Month=September}}
|case: 10=
|case: 11=
|case: 12=
}}

But this will not:

{{switch
|{{CURRENTMONTH}}
|case: 01={{2010CalSmall|Month=January}}
|case: 02={{2010CalSmall|Month=February}}
|case: 03={{2010CalSmall|Month=March}}
|case: 04={{2010CalSmall|Month=April}}
|case: 05={{2010CalSmall|Month=May}}
|case: 06={{2010CalSmall|Month=June}}
|case: 07={{2010CalSmall|Month=July}}
|case: 08={{2010CalSmall|Month=August}}
|case: 09={{2010CalSmall|Month=September}}
|case: 10={{2010CalSmall|Month=October}}
|case: 11={{2010CalSmall|Month=November}}
|case: 12={{2010CalSmall|Month=December}}
}}

It seems to be a problem with the way the switch template handles these nested templates. If I add more than 2 nested templates, the template itself breaks and I'm not sure why. I'm trying to set up a calendar on our group page that will auto update with all the upcoming events without having to recode it each month and without having to use multiple user pages. I'm testing it out here.~Vsig.png 20:33, 21 August 2010 (BST)

You've hosed the inclusion limit. The wiki couldn't handle so many templates. However why not just use {{2010CalSmall|Month={{CURRENTMONTHNAME}}}} which does the same?
Anyway, I quite liked the idea but having to custom tool every month was annoying, so I came up with a version with floating cells. You push them along a bit and they overflow to the next line. This means you can program a month with the setting of the offset for that month, rather than custom tooling a whole table. It also means the inclusion cost is way lower.
Also, I totally broke your existing usage because I'm a bastard. Sorry about that, but it shouldn't be too hard to fix. I also did my best to make my version look as similar as possible to your old version, hopefully it's still good. -- User:The Rooster RoosterDragon User talk:The Rooster 22:40, 23 August 2010 (BST)
Aha! Thanks! I did find that I could use {{2010CalSmall|Month={{CURRENTMONTHNAME}}}} but I wanted something I could spool up a few months at a time without coding each month. I guess what I should have said is I want to do this:
{{switch
|{{CURRENTMONTH}}
|case: 01={{2010CalSmall|Month=January}}
|case: 02={{2010CalSmall|Month=February}}
|case: 03={{2010CalSmall|Month=March}}
|case: 04={{2010CalSmall|Month=April}}
|case: 05={{2010CalSmall|Month=May}}
|case: 06={{2010CalSmall|Month=June}}
|case: 07={{2010CalSmall|Month=July}}
|case: 08=
{{2010CalSmall
|Month=August
|TextColor=Black
|CellColor=White
|BlankColor=lightgray

|Color27=#FFCC33
|BackColor27=#660000
|Text27=Drinks on Vapor
}}

|case: 09=
{{2010CalSmall
|Month=September
|TextColor=#330066
|CellColor=#EECCEE
|BlankColor =#CCCCCC

|Color6=#FFCC33
|BackColor6=#660000
|Text6=Malton Murder Awards MMX

|Color22=#FFFFFF
|BackColor22=#330066
|Text22=Group Anniversary
}}
|case: 10={{2010CalSmall|Month=October}}
|case: 11={{2010CalSmall|Month=November}}
|case: 12={{2010CalSmall|Month=December}}
}}
And thanks to your changes, that now works and I can call this project done. I can now have several months calendar on my user page without a monolithic code. It won't be hard to make changes to exisiting usage. I appreciate your help. Drinks on me! ~Vsig.png 23:39, 23 August 2010 (BST)
I love Rooster's elegant solutions. Aichon 01:21, 24 August 2010 (BST)
I second that. --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 01:40, 24 August 2010 (BST)

Inline table in Sig

I'm trying to insert a template into a sig and keep it inline with the rest of my sig. The template contains a table and it keeps taking up an extra row. The template is {{OctoBashSig}} (found here). I tried a few variations of the inline style attribute with no luck. Can someone help? ~Vsig.png 19:08, 2 September 2010 (BST)

What do you mean that it takes up an extra row? I'm afraid I don't follow. If you mean that it drops down to the next line, then the problem is that you're using display: inline-block, which is non-functional in IE7 and dysfunctional in IE8. There are ways to make it work, but generally it should be avoided, I'd say. You might consider just display: inline, but I'd say a better solution would be to just rewrite it using a span tag instead since I don't see a reason why it needs to be in a table at all, let along a div. Also, I see that you're using -moz-border-radius. Might I suggest using {{border-radius}} instead since it works in more browsers? Or, barring that, at least include WebKit as well, since that'll add compatibility for Chrome and Safari. Aichon 03:05, 3 September 2010 (BST)
Yeah it was dropping down to the next line. I started messing with it again after posting here (sorry) and put it in a div table and changed to display: inline-block from display: inline. It goes on one line now but hoses the wiki (makes everything after it subscripted). The reason I wanted it to be a table is because the moon isn't an image its 2 nested tables. I think the best solution here is to just use an image instead. I didn't know -moz-border-radius was incompatible with certain browsers. I see it all over the wiki. In fact it's pretty prominent on the October Bash page. I'll have to check it tomorrow and consider switching to {{border-radius}}. ~Vsig.png 03:56, 3 September 2010 (BST)
Yeah, the "moz" stands for "Mozilla", meaning it only works with Firefox. If you do -webkit-border-radius you get support for Chrome and Safari as well. Or you can just use that template to get support for all three of them, plus Opera and some more obscure ones. As for "inline-block", as I said, I wouldn't use it with a signature since it's broken in IE7 and IE8 unless you do certain fixes to it, meaning that your signature would probably be in violation of policy. If you check that link to my talk page I gave, Rooster and I discuss some of the stuff related to the fix, since we were actually just dealing with that very issue earlier this week. Aichon 08:42, 3 September 2010 (BST)

This Page Was Last Modified On

Am I the only one that uses this space for questions any more? :) Anyhow I'm trying to figure out how to access the revision timestamp for a given page and display it on another. I've found that I could use {{REVISIONTIMESTAMP}} to return the info but not sure how I would get that info onto another page. For example, I'd like to be able to grab the revision timestamp of a suburb's danger level page, use a mathematical formula to subtract the current timestamp and then display the number of days (or hours or whatever) since the last update. I hope that makes sense. I thought this might be good data for the suburb info template or even the danger map itself. I think if I can figure out how to grab it I can do the mathematical part pretty easily. ~Vsig.png 21:40, 14 September 2010 (BST)

Twas always a rare-use page. Still useful though. Anyway given the lacklustre version of our wiki and lack of extensions like ParserFunctions, what you're asking is basically impossible. :( Mega-kudos if anybody can prove me wrong though. -- User:The Rooster RoosterDragon User talk:The Rooster 03:53, 15 September 2010 (BST)
Gotta concur. If it's possible to do that math (and I don't think it is), it'd be a gargantuan effort to sort through the logic of it all and would take a massive amount of code since you'd be implementing all of the math functions from scratch using switch statements (which is actually possible to do, for limited number ranges). As for including that on another page, I don't think it's possible to do at all with our wiki software as it is. Aichon 07:43, 15 September 2010 (BST)
What about a bot? Admittedly I know nothing about the API, but it seems like in theory a bot could be set to check the revision time stamp, do some calculations, then edit the line on another page with it's results. That's essentially what EMRPBot does, right? Checking timestamp may not even be the best way. Maybe it could check the actual danger level status and base its calculations on it.--~Vsig.png 16:48, 15 September 2010 (BST)
Well it could, but I would ask if we even need to know the age of the suburb danger levels. It seems to work well enough at the moment. -- User:The Rooster RoosterDragon User talk:The Rooster 17:20, 15 September 2010 (BST)
I knew that question would come up :). Personally I think it would be very beneficial information to have for both factions. Practical standpoint: Survivors could know how long a suburb has been dangerous or ghost town, zeds could know how well kept the suburb is before raiding it. Pride standpoint: Survivors: We maintain this suburb pretty well; look only 1 week of dangerous in the last 6 months. Zeds: Look we totally ruined this suburb and it's been a ghost town for weeks. RP Standpoint: Riddleybank, heart of Barrah, as seen by it's ghost town status for over 5 months.
I just think it's time the community had some statistical information on danger levels.--~Vsig.png 18:27, 15 September 2010 (BST)
If I was doing it, I'd just have a "user" line for adding a timestamp like the building reports, no need for a bot then. And if I was adding a user line I'd only do it if you could show me a need for it from a bunch of people who are in dire need of such functionality so adding it was worthwhile. The user line on building reports is a problem.
The system has been around for years, worked mostly well enough and nobody has ever complained about a lack of timestamps before. If it would "just be interesting" to know, then you can try Suburb/History for pictures, or check revision dates yourself. For historical interest, you can try getting DDR to make another video, though I think we'd have to fill in some days from revision timestamps. And if you want early history, either pray Kevan made a backup of the purges and he's willing to restore them, or that there's a copy of the page on a net archive somewhere. I know I'd be "kinda interested" in a video spanning whatever time we can fill in. But I'm going off-topic now anyway. -- User:The Rooster RoosterDragon User talk:The Rooster 19:00, 17 September 2010 (BST)
It's really not all that important, honestly. I'll keep an eye on Suburb/History. I might revisit the idea later if a simpler solution comes to mind. ~Vsig.png 16:25, 18 September 2010 (BST)
I know no one was going to ask, but I'll say on record, a big fat "ha" at doing another "XXXX Days in Urban Dead". If I'd have known I'd still be playing the game for 3 years, I'd have gone diligently to this day. Unfortunatley, I never did, and thanks to my quality control video-wise, I don't think anything less would suffice :( -- LEMON #1 16:32, 18 September 2010 (BST)

Unique text/random text generation

I'm starting to see what you all meant by lack of parser functions and extensions. My latest hair-brained idea requires a bit of unique text generation. I'd like the text to be generated from a separate sting of text (ex: in the text icecream the function would look for the third letter from the left and return e and then a switch applied to turn e into z). With the wiki's lack of a proper parser function to to the work, I'm looking for a workaround. If anyone knows or can think of a way to do it, you'd get massive kudos.

I may also be able to use random text generation if the above doesn't work. What I'm trying to accomplish is the generation of unique IDs based on external URLs using only wiki markup. Think tinyurl on the wiki. The user is able to generate a unique ID, post it in-game and direct their audience to the wiki to retrieve the URL. Must contain only letters and punctuation found in zamgrh so it's useful to both survivors and zombies. --~Vsig.png 16:33, 17 September 2010 (BST)

I don't think it's possible, again for the reasons you cite. I'd also advise against pursuing it, honestly, since those pages would be up for speedy deletion, given that they'd be unused redirects. That just creates more work for sysops (and sysop wannabes helpful folks). Better to just use tinyurl or whatnot, I think. Aichon 16:41, 17 September 2010 (BST)
I should have been more specific. There would be only one page which would act as a repository for all unique IDs and URLs. I don't think that would create any unused redircts (could be wrong). I'm hoping it's possible and my meager wiki knowledge just can't come up with a way. --~Vsig.png 16:47, 17 September 2010 (BST)
Until a parser package is installed, there isn't much you can do if you need a random number generator or parser. A poor man's workaround is to use the Current Time magic words to load unique text based on when the page is accessed. You could use different combinations of CurrentHour, CurrentDay, CurrentWeek, etc depending on how many unique text words/sentences you require. See here for the magic words for some magic words you can try. It will not be perfect because pages are cached, but it may suit your needs. Here is a quick example:
User:MHSstaff/DemoMain
The code:
{{User:MHSstaff/Demo{{CURRENTHOUR}}}}
where the pages you load would be named like SomethingXY where X would be like from 1-24 if you are using current hour, and Y would be 1-7 if you are using day of week. The demo will only work for certain hours since I did not make a unique text string for every hour; the others will show up as red, unedited pages depending on when you click on the link. Basically it loads different text pages based on the current hour into the DemoMain page in my userspace. If you decide to go this route, I'd use your userspace and maybe run it be the sysops since the number of pages needed could quickly get out of hand. For my currenthour example, I would need 24 separate pages.-MHSstaff 17:34, 17 September 2010 (BST)
You could also probably hack something together with the {{If equal}} template and the time magic words to get around having a million pages. -MHSstaff 17:57, 17 September 2010 (BST)
Ok couple of things. The unique IDs aren't seperate wiki pages. They're simply unique strings of text found on a table. Here is an example:
Unique ID URL User Date
zr-gmmz www.google.com User:Vapor 18:13, 17 September 2010 (BST)
The unique ID is then given in game. The target audience then goes to the repository page on the wiki, searches for the unique ID and then refers to the URL on the table.
I had the exact idea for creating random text using {{CURRENTHOUR}}. The problem I ran into is that the output is not static. Therefore the text string I was able to generate would probably change by the time my audience came to check the wiki for the unique ID. See my sandbox for my the ourput.
Definitely keep the ideas coming, though. I'd like to see at least ONE of my ideas come to fruition. --~Vsig.png 18:13, 17 September 2010 (BST)
Why not take the entire idea to fruition, but instead just have users enter their own ID? Avoids all this hassle and you get the same result far as I can see. -- User:The Rooster RoosterDragon User talk:The Rooster 18:35, 17 September 2010 (BST)
Well now that is a simple enough solution, isn't it? My only issue would be that it runs the risk of not being a uinque ID if user's pick their own. I'm going to mock something up using the idea, though.--~Vsig.png 18:42, 17 September 2010 (BST)
Have the users enter their own information like Rooster suggests, and maybe use a template. To get around the problem of having non unique IDS, you can have the repository page show the currently available ID using the time magic words, and basically have the user cut and paste that when they enter their information.
So rather then having them enter
UserID{{CURRENTHOUR}}{{CURRENTDAY}}{{CURRENTMONTH}}{{CURRENTYEAR}},
the page would say "To add your info, copy and paste the template code below.
{{MyTemplate|ID=UserIDXXYYZZWW|VAR2=TheyEnter|Var3=TheyEnter}}
where the page gives XX,YY,ZZ, etc depending on when they access it using time and statistic magic words. It will be static then since they are copying the numbers, rather than the magic word code. -MHSstaff 23:36, 17 September 2010 (BST)
Yeah that's pretty much where I'm going with it right now except the page will contain the unique ID, generated with magic words and switches. The user copies the Unique ID from the page and pastes it into a template. See my work in progress.
I know this has been brought up recently by someone who shall remain unamed, but it there a magic word-like template that I can use to display current minute or current second? I'm almost there with the truly unique ID idea. ~Vsig.png 23:52, 17 September 2010 (BST)

ETA So I went ahead and made a template to calculate current minute. It works, however it doesn't seem to be updating properly. {{CURRENTMINUTE}} . It updates when previewing and if it's saved but not automatically every minute like it should. Any ideas? ~Vsig.png 16:10, 18 September 2010 (BST)

Page-caching will break it; it will work the first time they see the page and probably daily-semidaily after that. But for your purpose, that's probably ok since it will update the unique id for new users when they come to copy the template code to enter their information. It just won't update as often as you may like for someone who has already seen the page (and presumably already has their unique id). New but static IDS will still be generated for new people, which is what you want. Good job btw. It looks pretty nice. -MHSstaff 16:19, 18 September 2010 (BST)
Actually, this would likely do the trick, even with page caching. Every time a page is edited, the cache for it has to be emptied and replaced since the page has changed. Since you only need new IDs after someone uses the existing one, and they have to edit the page to use the existing one, you're guaranteed that the cache will update a minimum of once per ID, meaning that people should see different IDs in most cases (I can think of some cases where they still wouldn't, but hopefully those won't be common). Aichon 16:56, 18 September 2010 (BST)
Yeah that's exactly what I was thinking. There might be a rare circumstance when 2 people get the same code but it will be rare. Unless of course a bunch of people start using it every minute of every day.
So I'm going to go ahead and get a regular page started. I'm thinking of names for the service. The one I keep going to is Gabba Gabba. Thoughts? Is that too...silly? ~Vsig.png 17:05, 18 September 2010 (BST)
ETA: So I'm pretty much done with the page now. I would like to solicit some people to test it. I've started the discussion page User talk:Vapor/sandbox/sandbox8 and want to move the technical help over there.. I'm interested to see what it would take to break it. Just read over the directions and start posting some messages. I'd also really like to know how many messages I can get on the page before the template inclusion limit is reached. Thanks for helping. --~Vsig.png 04:38, 21 September 2010 (BST)
I dont' know what the fuck that is but it looks AMAZING -- LEMON #1 07:07, 21 September 2010 (BST)
Thanks for the compliment...I think :) --~Vsig.png 21:40, 21 September 2010 (BST)