Template talk:BuildingStatus

From The Urban Dead Wiki

(Redirected from BuildingStatus)
Jump to: navigation, search

Question

Forgive my ignorance, but would there be any way for a seperate template to call only the status variable from this template? Essentially, I'm trying to feed building statuses from the Danger Reports into a map template I'm creating. Any help is much appreciated. --SupaJames 20:46, 13 February 2008 (UTC)

Theorethically, yes, and it's even possible that could be managed practically. Although it requires modifications for this template to be made that might not work out well... Anyway, please point me to this your map --~~~~ [talk] 21:23, 13 February 2008 (UTC)
Give me a few days, I've actually just done this. User:Karek/ProjDev#Buildings_Update_Danger_Maps for a preview. I'll start modifying templates when I get the next part done(making it so the suburb auto updates based on number of buildings at certain danger levels).--Karekmaps?! 22:32, 24 February 2008 (UTC)

New Optional Variable

I added a optional variable to the template. There was an issue with including strategic information on generically named areas such as junkyards, factories, etc. For Display's sake, I changed the template to

<big>'''{{{buildingtype|[[{{{building|unknown}}}]]}}}'''</big><br/>

If buildingtype is defined and a value is present, then it will use that as the display name instead of providing a link to the building. Using the buildingtype variable such as

{{BuildingStatus|
building=51,75|
buildingtype=A Factory|
xy=(51,75)|
status=in zombie hands|
comment=Reports show that the ransacked factory is currently being occupied by zombie hordes.|
user=-- [[User:Majii|Majii]] 05:07, 12 August 2007 (BST)
}}

can be useful for the following type of entries: User:DangerReport/51,75User:DangerReport/52,75

while normal sites are left unchanged

Mall-safe-small.jpg

Club Crook
Generator out of fuel
--Reimannsum (talk) 19:41, 9 January 2019 (UTC)

-- Majii 06:54, 12 August 2007 (BST)

Maybe it would better if you first played with it in sandbox before making changes to the template, as your examples look broken... Anyway, wikiarticle is Factory 51,75, so the danger report should have name User:DangerReport/Factory 51,75. I don't see what the problem with it. --~~~~T''' 11:02, 12 August 2007 (BST)

added line break and hyphen before status variable

The status listing was getting line broken on my display rather often, at least when the building name was long and especially when the xy variable was being used to display co-ordinates. So I put it on a fresh line. I think the new formatting is easier to read in general, and is MUCH better when there are long building names. --Seb_Wiers VeM 22:25, 13 May 2007 (BST)

added variable "xy" , used to list optional co-ordinates next to building name

I added a new variable so that building co-ordinates could be included. Besides its general utility (why NOT list the co-ordinate next to the building name whenever possible) this will make integrating nic and the NT Status Map much easier. --Seb_Wiers VeM 19:56, 12 May 2007 (BST)

well, the main reason there were no coordinates before - this is also used for multiblock buildings. but as this your adding isn't obligatory - no problems. Looks nice, by the way --Duke GarlandLCD 10:15, 13 May 2007 (BST)
Thanks. Hopefully people will notice the option is there and use it, but if not, no big deal- as you noted, the xy variable has no impact if not defined. --Seb_Wiers VeM 21:31, 13 May 2007 (BST)
Just a thought, you could do separate templates for malls and forts with listed xy values. Or add a second one for an array (25,25->30,30 is a square, yay.). --Sebastian Foucan 20:07, 24 July 2007 (BST)
There is already a {{MallStatus}} template. However, the {{{2}}} template could be used in the same manner as you suggest; there is no restriction on what you enter as the co-ordiantes. For example, you could have
{{BuildingStatus|
Building=Ackland Mall|
xy=(32,44)(33,44)(32,45)(33,45)|
status= under attack|
comment= Zombies continue to represent a minor nuisance to the Mall. PKers, however, are running rampant.|
user=--[[User:Tarumigan|Tarumigan]] 11:01, 22 July 2007 (EST)|
}}

, which gives this:

Mall-under attack-small.jpg

(32,44)(33,44)(32,45)(33,45) (bic) (statuses) (update)
Ackland Mall
Zombies continue to represent a minor nuisance to the Mall. PKers, however, are running rampant.
--Tarumigan 11:01, 22 July 2007 (EST)

before adding another variable: background color

Mmkay, sometimes plugs get on pages with non-white background. Icon image is on white background. I'ld like to add a variable there that would be by default white (so no existing template would be bothered by it), but provide possibility of change for situations i'm described. However this has a little complication, as the icon has rounded edges that would be left white. Thus i'm going to switch all iconz to gif with transparency on those edges. (could also do with PNG, but stupid IE needs extra HTML to support PNG alpha-channel). If nobody will be against, i'll do it soon. --~~~~ [talk] 20:38, 16 February 2008 (UTC)

That will significantly increase the amount of information called in each template wouldn't it? If that's the case then it could cause problems on pages like BIC or anywhere that calls {{BuildingStatus}} more than a few times.--Karekmaps?! 00:39, 17 February 2008 (UTC)
no, it doesn't have to do with more template calls. the most awful in this sense page is Barrville Building Information Center (Scotw is a weirdo - danger report for each building) and even it didn't suffer. --~~~~ [talk] 12:31, 17 February 2008 (UTC)
I meant the image thing you mentioned. When the template is called it can be called again and again repeatedly until it reaches the File Size limit for inclusion/transclusion, what this is is a limit based on the total information in all template calls on the page so the more information in a template page(including things that aren't included) the less times that, and all other, templates can be included. This, of course, doesn't include a template set to noinclude on the template page, as all that it counts for the file size is <noinclude>{{template}}</noinclude> but, it might include images in this calculation and Alpha level transparency in an image usually significantly increases it's file size. I'm not sure if that's the case but it might be best to err on the side of caution. Wikipedia has a meta wiki help article that explains this better but I'd have to dig for it.--Karekmaps?! 12:44, 17 February 2008 (UTC)
I've decided on GIF that only has 1 bit of alpha channel and there's no difference betwean JPEG that currently is there and GIF that i'm uploaing at the moment --~~~~ [talk] 13:17, 17 February 2008 (UTC)

Mmeh... You know what... i don't like how it looks. I'll maybe play with it more later, but whole template is just not "oriented" to have transparent color... And the gif/png problem... bleh. --~~~~ [talk] 13:51, 17 February 2008 (UTC)

Ifdef Call

I may be walking into a pit of ignorance here, but does this template actually make use of the two Template:Ifdef calls in a useful manner? From what I can tell from the documentation, if the user varible is defined, then the template returns a result. In this case that result is...nothing. The output "2=" is code for a varible in the Ifdef template and so this varible gets set to nothing as far as I can tell. I can't discern any difference in reports with their user line and without, even when looking at the page source HTML.

Anyway, if this template is useless in this case, I would heartily suggest it gets dumped. The few bytes it would save isn't much, but on pages that reference hundreds of the danger reports (EG: The BIC or NT Status Map and plenty of other things) it might add up to a nice saving. -- User:The Rooster RoosterDragon User talk:The Rooster 00:32, 28 June 2008 (BST)

Nope, they're not useless. Without them sigs like {{User:SomeUser/sig}} could / would break the template --~~~~ [talk] 16:34, 30 June 2008 (BST)
May I ask in what fashion they would break the template? -- User:The Rooster RoosterDragon User talk:The Rooster 20:56, 30 June 2008 (BST)
It had to do with the "=" in the sig (people that have <font color=blabla> sigs) but i cannot come up with the example right now. if you'll look closely on the history of the page - that was Karek's edit with apropriate comment in Sep 2007. --~~~~ [talk] 20:56, 2 July 2008 (BST)

Compactness Overhaul

I've changed the template a bit (through A/PT). The output looks basically the same, but I cut down on extra code to curtail the size of the inclusion call as far as possible. So far it seems OK, and the supposed signature issue mentioned above doesn't appear to have occurred... it doesn't transfer through from templated sigs, nor non-templated custom sigs as far as I can tell. The only issue is that a reports for big buildings lack an xy variable, and this no longer gracefully hids itself if not defined. If a variable should be set, the template doesn't have a backup plan. The status, comment and user lines do, since they are liable to get screwed over in editing. Three options exist for the xy variable, in order of my preference:

  1. Add in proper co-ords for big buildings.
  2. Add in blank calls for big buildings, to get the same output as before.
  3. Tweak the template so xy does have a fallback.

If co-ords are too long or annoying or whatever, the workaround should be ok since it's only a few templates, but the tweak is also fine.

Further, the new code allows the disambig call to be set, this replicates the function of Template:BuildingStatusDisambig, so helps centralize things a bit, and the other one can be deleted when the links are changed.

If any other problems are noted, do shout. -- User:The Rooster RoosterDragon User talk:The Rooster 00:25, 5 June 2009 (BST)

Direct link to edit page

Would be nice if clicking update went to the actual edit screen instead of us to the template page // Belgianrofliron 14:37, 28 July 2009 (BST)

Can't be done with the system set up as is. The link would have to be external, and since the building variable currently contains spaces and not underscores, this would break the external link. -- User:The Rooster RoosterDragon User talk:The Rooster 22:49, 1 August 2009 (BST)

The above statement is of course moronic and incorrect, disregard that idiots comment. It can be done:

<span class="stealthexternallink">[{{fullurl:User:DangerReport/{{{building|unknown}}}|action=edit}} (update)]</span>

(update)

In the template, piping the building variable to unknown is not required of course.

Is this worthwhile then? -- User:The Rooster RoosterDragon User talk:The Rooster 04:59, 3 August 2009 (BST)

Posting this long after the discussion started, but hey! I think the link should stay as a link to the template page because seeing all the available statuses (stati?) as well as directions is helpful for newbies. --Pedentic 01:19, 8 October 2010 (BST)
They could still see them just fine. The page doesn't suddenly disappear when you go to edit it, after all. Aichon 03:26, 8 October 2010 (BST)

categories

whut about setting them automatically ? why haven't anyone done something like this before ? i'd like to be able to see all the piñata buildings in malton :) --People's Commissar Hagnat [talk] [wcdz] 14:36, 21 December 2010 (UTC)

Get to work then. When I fall, I'll weep for happiness 15:10, 21 December 2010 (UTC)
can't... page is protected and the guy who created can't edit it anymore... can i has ops ? --People's Commissar Hagnat [talk] [wcdz] 04:25, 22 December 2010 (UTC)
dump! --People's Commissar Hagnat [talk] [wcdz] 17:43, 13 January 2011 (UTC)

EBS

I posted this somewhere else but apparently that page is so low traffic, I'm having a hard time finding where I posted this question. So should The Coram building which hosts The Emergency Broadcast System have it's own type of Building Status? One similar to MPM status but can be updated with the EBS status? I was going to put something in a sandbox to test but these templates have so many moving parts that I got too confused. Anyone care to give it a shot? Maybe someone involved in the original BuildingStatus project? ~Vsig.png 15:22, 21 December 2010 (UTC)

Double dump. ~Vsig.png 17:50, 13 January 2011 (UTC)
Personal tools
advertisements