Topic on User talk:Harakoni

Jump to navigation Jump to search
SyntaxTerror (talkcontribs)

Hello Harakoni

I would like to use more the Template:Quote, but if it can be good to have a large font size at the top of pages, it is not desirable in the middle of articles, like on Gastro-analyzer#Notes.

In many places, the "indent" method is used (like on Events#Ambrosia sprout) and it is really not the thing to do, as it is meant for code and words are often cut in the middle at the end of the line. A smaller sized quotation template would be useful in cases like this.

I don't know why it is so big on Rimworldwiki compared to Wikipedia, there is maybe different CSS rules, but I don't know much about it.

By the way, I tried to copy the Wikipedia template blockquote, but I couldn't make better than Rimworldwiki's Template:Quote, so I guess that Template:Blockquote, Template:Blockquote/doc and Template:Blockquote/styles.css can be deleted (sorry for that mess...).

I think that Template:Quote can be modified a little so a font size parameter be added.

It quess that adding style="font-size:{{{size|}}}"; to the <blockquote> tag would do the trick, but I'm not sure because this template is using unamed parameters, so maybe it could be parameter 4? (I suck when it comes to this HTML part of wikicode, so I don't know how to write the code for this).

The template would have the same behaviour, so no changes would have to be made where it is already used, but adding size=14px would make quotes the same size as the rest of the article's text.

Also, it would be good to add &nbsp: after the em dash ("—", in front of the author's name).

Harakoni (talkcontribs)

Alright so the template was already set up to also take named parameters, but just undocumented. I've added a size option both unnamed and named and amended the documentation to reflect the current state of it. I also blatantly stole your documentation formatting because it looked so much better than what was currently there. (We should get around to standardizing template documentation but its way down the list)

I absolutely agree that the indent method is not ideal, its just a work around that should be discarded now that Quote is more flexible. Have a play around with the current version and sizes and see what you think works best. Let me know if there's any formatting options or changes you think may be necessary. Also let me know if the current parameter names are fine, its a simple change to add new alternatives/change existing ones. Author is likely more intuitive than "sign" and "cite" but that's what was already there.

I'll leave Blockquote and its associated pages up for now, just in case there is any content/ideas that should be taken from it, or experimentation to be done and then delete them once after you're happy.

SyntaxTerror (talkcontribs)

Nice job.

But I'm unsure of the "sign" parameter name: I think it is better to stay as close as possible to Wikipedia's "author", so contributors that are also on Wikipedia won't be surprised, and people that don't won't see the difference anyway.

Giving the alternate names of the parameters isn't helpful too, it's always better to keep things simple ("idiotproof" ;p ).

On reflexion, maybe it would be better to make a "normal" size for quotes (i.e. not having to specify a smaller size), as in most cases it should be the right size to use in the middle of articles, and allow a bigger size for quotes at the top of pages ?

14 px looks to be fine, it would be the same size as in the "indent" trick (I edited Events#Ambrosia sprout like this). Tell me what you think ?

There is only a handful of places where the template is used at the moment, so the changes won't be too long to make.

By the way, do you know if a "database dump" of this wiki exists? It would be handy for tasks like this. On the other hand, there are only 1297 pages in the "main"), so doing them all in semi-automatic edition with AWB isn't that hard.

Harakoni (talkcontribs)

Tbph I kept the current substitutions options because I didn't want to bother redoing it, testing it, and then changing over the existing implementation, but if you feel it'll transfer easier, I'll do it next time I'm at a PC and free to edit.

Wrt. normal size, as in set it to size 14 by default (i.e. when no size parameter is entered) and use the size parameter for larger page toppers? Yeah thats doable. I can do that at the same time as the above. I think I might also implement a "Large" and "small" default size so that we don't end up with a bunch of little variations and it can be mass updated with one edit. SO you can say size=large or size=small or size=16 if you want to manually set it. I'll set small to 14 and large to whatever it is currently, unless you have some other opinions on it.

The Event page looks great. Much better than what it was. This was a good idea. My only addition would be having the source say something like "event card description" or something just to more plainly express that its a straight copy and paste from the notification.

As for a database dump, you're probably best asking our wonderful administrator User:Zesty on that front, either on the wiki or on the Wiki's discord. The second is probably more likely to get a response though it'll still probably take a day or two. I mostly just use the WhatLinksHere when checking stuff like that. Not the most efficient but it works fine for small jobs like this.

SyntaxTerror (talkcontribs)

14 px and "large" seem fine to me, changes can be made after by only modifying the template anyway.

Maybe the best is to have no parameter for 14 px, and a large= parameter that makes the bigger size if it is filled with anything (e.g. large=yes), with a size= parameter on the side, that is not supposed to be used in the Main.

I made tests and the "standard" size seems to be 17.5 px (?!), it is probably handled by CSS settings, but I don't know where to look nor how to fiddle with this anyway.

Concerning the dump, it doesn't seem to be possible.

Harakoni (talkcontribs)

Ok so large parameter is implement as you describe. Default size is now 14px. Size parameter is maintained but noted as preferred to not be used. Existing examples on pages have been updated

SyntaxTerror (talkcontribs)

It looks great.

I was going to edit the transclusions of the template, but I see that you've already done it. Good job!

I'll try to find some time to implement this template in the places where it should be used.

SyntaxTerror (talkcontribs)

I noticed problems with the template:

1. The external links don't show if the parameter isn't specified:

{{quote|Gastro-analyzer is an implant INTO the nose, while aesthetic nose REPLACES the nose. You can't install a gastro analyzer into a aesthetic nose; it's one or the other.|Tynan Sylvester|"[https://ludeon.com/forums/index.php?topic=51123.msg474313#msg474313 Cannot replace destroyed gastro-analyzer]" on ''Ludeon forums''.</ref>}}

produces:

Gastro-analyzer is an implant INTO the nose, while aesthetic nose REPLACES the nose. You can't install a gastro analyzer into a aesthetic nose; it's one or the other.

— Tynan Sylvester
{{quote|Gastro-analyzer is an implant INTO the nose, while aesthetic nose REPLACES the nose. You can't install a gastro analyzer into a aesthetic nose; it's one or the other.|Tynan Sylvester|source="[https://ludeon.com/forums/index.php?topic=51123.msg474313#msg474313 Cannot replace destroyed gastro-analyzer]" on ''Ludeon forums''.</ref>}}

produces:

Gastro-analyzer is an implant INTO the nose, while aesthetic nose REPLACES the nose. You can't install a gastro analyzer into a aesthetic nose; it's one or the other.

— Tynan Sylvester,  "Cannot replace destroyed gastro-analyzer" on Ludeon forums.</ref>

2. I see a problem on Character Types#Mechanoids but don't know how to solve it. I've never encountered the syntax " {{: " before, it seems to call a page as a template, but here only the top "{{quote}}" template is displayed. A solution would be to copy the template from Mechanoid to Character Types#Mechanoids and remove the "large" parameter, but I don't know what result was intended in the first place.

Can you have a look at these?

Harakoni (talkcontribs)

{{: is how you call a page in the main namespace for transclusion as if it were a template. It looks like Mechanoids has it set to onlyinclude the quote for some reason and so thats all of the page that gets transcluded. Likely it at one point included more from the page, and later edits have damaged the intended transcluded section. I'll take a look at what it used to include, but honestly, we can probably get rid of the transclusion and change it up for a short summary anyway.

I'll get back to you on the Template:Quote issue. Ty for the reports.

Harakoni (talkcontribs)

Right, the issue with the quote paramter is the = sign in the link. Without specifying the parameter it assumes you're trying to set a parameter called "[https://ludeon.com/forums/index.php?topic" to a value of "51123.msg474313#msg474313 Cannot replace destroyed gastro-analyzer]" on Ludeon forums.</ref>"

Obviously, there is no parameter called that anywhere in the template, and because its trying to set a parameter its obviously not a unnamed parameter either, so it ignores it.

Serves me right for not sanitizing my inputs. Not sure how to fix it as yet, will look into it.

Harakoni (talkcontribs)

Hahaha actually no, apparently that quote is all thats ever been transcluded. I have no idea why such a pointless transclusion was made. Removing it now.

Also looks like there is no way to sanitize the input without changing what the user puts in in the first place, its a problem intrinsic to the wiki format. So we might as well just say "only use = signs when naming a parameter"

Sorry for the reply spam.

SyntaxTerror (talkcontribs)

"the = sign in the link"

Damn, I forgot to check that... XP

I don't think that a fix is possible with templates (it has to be done with lua modules I guess).

A solution would be to replace the "=" by &#61;, or to create a template similar to template:!!, but that would be overkill as one just need to use the parameter...

Harakoni (talkcontribs)

>but that would be overkill as one just need to use the parameter

Agreed, especially given it already requires the editors to change their behavior. Might as well change the behavior to the simpler one.

Also just to borrow this thread, I'd guess you're making mass edits with an external tool? You've taken out the spaces in a lot of headings while fixing the capitalization. e.g. "Version History" -> "Versionhistory". nbd and I'm fixing them now, but just something to check next time.

SyntaxTerror (talkcontribs)

oh $#!7.... I try to always double check.

Leave it to me, I'm correcting this right now

Harakoni (talkcontribs)

Seriously don't stress. Mistakes happen.

That said, you also seem to have removed the spaces before several links in this edit, I'm not sure if that happened anywhere else or if its just that page. Might be worth checking jic. Also you lower cased "DLC" there, so if you are doing it automatically, an exception for DPS, DLC, EMP and a few other terms might be in order.

Lastly it looks like you're lower case process broke on ancient mech drop beacon, possibly because the link in question was in a gallery.

SyntaxTerror (talkcontribs)

I'll check all my recent edits, leave it to me for now.

SyntaxTerror (talkcontribs)

It should be good now, thanks for correcting my mess and sorry again for this...

Harakoni (talkcontribs)

Infobox descriptions should be as they appear in game, even if they are wrong/grammatically non-standard/poorly structured etc. If there's an actual error in the source itself, like a spelling mistake, tag it with [sic] but otherwise leave it as is in game.

Similarly, for technical reasons, please leave the capitalization on the Stuff Tags. Usage of them generally can automatically account for some being lower case and some upper, but its best to allow it to be fault tolerant.

This isn't a reprimand or anything. Just a request.

SyntaxTerror (talkcontribs)

Understood.

I am currently working on a regex that will match all words with a faulty capitalisation.

In fact, at the moment I am trying to make it able not to match words inside multiline templates (so it will include infoboxes).

Reply to "Template:Quote"