Template talk:Ansreq/Sandbox

From Pathfinder Wiki

This is great! Let's adopt it into the non-sandboxed version ASAP. I've also been thinking that we should change the blue table to have two columns instead of two rows:

Requirement {{{num}}}

{{:{{{page}}}/Requirement/{{{num}}}}}

We should also add de and pt-br to the supported languages. Sometimes it takes me longer to come around than it should. --Jomegat (talk) 08:00, 8 November 2020 (EST)

That's a very good idea with the two columns. Looks great.
Okay... I'll see what I can do. Maybe I will need some kind of a plugin or so. What has to be done is written in the template maybe somebody will have an idea about my main problem.
No problem me too :)
Don't you think it is better to wait with the languages and add them with a bot all at once? --DesignerThan (talk) 10:54, 8 November 2020 (EST)
I did some work at the Template. I hope you guys will like those!
I moved the button into the table. That way the answer collapses all the way. I also moved it in a own Template, that way it will be useable in many places. It would also be possible to use it to show/hide all the answers with one push of the "button" but for that see the discussion of the template.--DesignerThan (talk) 19:48, 8 November 2020 (EST)
Wow, I am so behind. I have NOT had time to look at everything. I will try to do so this week. It seems like you guys are making a lot of progress! -- w126jep (talk) 20:09, 8 November 2020 (EST)

There's no need to have a bot add languages to the "requirement" templates. We usually do that by hand as there are only a handful of templates. Jaceil... don't worry about being super engaged right now. You have a lot on your plate In Real Life and this seems to be coming along nicely. I've extracted the requirements from all the honors except the ones in the Recreation, SG&O, and Vocational categories so far. I have been making some tweaks to the requirements here and there, like adding a requirement 6 when the honor has a 6a and 6b, but no 6 as a parent, and adding subrequirement letters here and there where they are missing. It doesn't change anything about the requirements except that it adds the metadata structure I need to make this stuff work. I'd like to add a template to all the .../Requirements pages so that it shows the name of the honor, and maybe the patch and skill level. The patch will be more difficult since we're specifying that in the honor_desc template in the answer keys. Once we have worked out a template (the coding as well as the presentation), I can put a bot together to add it to all the requirements pages.

I was looking at an IA page today, and saw some of the kludges we have in place for including requirements for honors. Now that we're on track to have each requirement on its own page, that can be cleaned up and formatted more nicely.

It came to me the other day that instead of using a Wikibot that understands the Translate extension for handling the mechanical translation of the requirements into Spanish, we could use a more generic screen-scraping robot instead. There are several out there. --Jomegat (talk) 20:24, 8 November 2020 (EST)

Okay, I thought there are more. Nice work. Maybe you can explain it to me how the thing with the requirements is working? I know how to use it but not how it works. Somehow I don't get it. xD
Can you link in one of the IA pages? So I know what we are talking about.
I think you guys know, what the best way is for the translations, I will keep out of that discussion. But what interessets me is, what you think about the repositioning of the custom button and the color in the head. Maybe you can write some short words. --DesignerThan (talk) 02:35, 9 November 2020 (EST)

How to use this template

I'm trying to get my head around how we would use this template, and I think I'm getting close. If we added the content as an argument, I think we'd invoke the template, specify, page, and num - but to get the answer to show up inside the box, I think we'd also need a content argument. Then it could be called like this:

{{ansreq |page={{PAGENAME}} |num=3a |content=This text supplies the answer to the requirement. It can contain MW markup such as tables, and bold, but maybe not headings? (We have a lot of answers with subheadings in them). But maybe it could? }}

But...

One of the things we need to keep in mind is that we need to make it as easy as possible for the wiki-novice to add answer content, so maybe leaving the answers outside the template is a better approach. That's what I was attempting when I was making template:ansreq start by closing the previous divs (unless the requirement number was 1). Then we'd need one more template to close the divs for the last requirement - which is what the template:lastsubreq was supposed to do, but it went too far and closed itself and its parent. That only worked because the parent was the last requirement. I think if we renamed lastsubreq to closereq, made it close only its own divs, and then used it at the end of the last subrequirement within a requirement, and at the end of the last requirement in the honor, we'd be golden. Hopefully my explanation is clear enough to convey my idea? --Jomegat (talk) 23:48, 8 November 2020 (EST)

Yeah, I was thinking about the same thing. But my conclusion was somehow the same like yours. The problem with the content argument, I think, will be that there will be some problems with MW content (tables, other templates) and I think it won't be that nice to edit with the sections.
I come to the same conclusion like you. The attempt with automatically closing the divs is nice I think, but I ask myself if it is not easier to do it manually every time with the template, because it is easier to communicate to the user that the requirement has to be started with ansreq and ended with closereq every time then it has only be done at the end. But I don't really know what's best... I can also find myself explaining the way it is now xD.
Definitely we should build up a Help Namespace with explanaitions of all that. "How to create a Honor?", "How to translate a Honor?", and so on ... What we also should do, I think, is to add a description and generic example of the template to it like at the Template:CustomToggleButton.--DesignerThan (talk) 02:35, 9 November 2020 (EST)
I implemented an explanation and example now and did a test in the Amphibian Sandbox 2. As I used the example I came across the not so nice thing that I wanted a line break between the answer and the next AnsReq-Box (in the code), but because the box gets closed by the next one the line break was added to the answer. That can be prevented with the <nowiki>-tag but I think the nicer solution would be, if every AnsReq-Box needs to be closed with a CloseReq-Template.--DesignerThan (talk) 04:28, 9 November 2020 (EST)