User talk:Hardvice/Guest stars: Difference between revisions
imported>Hardvice No edit summary |
imported>Hardvice →Lines: fix link |
||
| Line 37: | Line 37: | ||
== Lines == |
== Lines == |
||
Partly to enable this, and partly because it bugs the hell out of me, I added a lines variable to [[Template |
Partly to enable this, and partly because it bugs the hell out of me, I added a lines variable to [[Template:PortalCharacter]] that will set the number of lines of linkspace to add to a cell. This way, we don't need to micromanage nonlinktext to get cell sizes to match; you can just assign "lines=3" to each cell on the page, and they'll all match. Also, the boxes will now scale with the text. Lines defaults to 2 and can currently be set for anything from 1-5; we can add more if we need them.--[[User:Hardvice|Hardvice]] <small>[[User talk:Hardvice|(talk)]]</small> 05:42, 30 November 2007 (EST) |
||
Revision as of 10:42, 30 November 2007
Implementation
Duplication
If we standardize the image names, find a way to match the cell size, and sort out this duplicate problem, this could totally work. We should be able to use a string function to get the number of characters in a name, and if it's less than X, automatically add nonlinktext.--Hardvice (talk) 00:03, 30 November 2007 (EST)
- Right, and there's a few sort functions in Winter that we might be able to use. I left a comment on your talk page.--MiamiVolts (talk) 00:09, 30 November 2007 (EST)
- No need. I just didn't read their documentation very well. Sort is working, duplicates are fixed. All we need are standard image names and to set up the auto nonlinktext.--Hardvice (talk) 01:09, 30 November 2007 (EST)
- Most of the names are pretty standard. I think you tend to use lowercase and I use uppercase--can that be fixed using ucfirst or any of those other fun tricks? It looks like there's only three so far for this season that would need to be fixed: Héctor Luis Bustamante, Oscar Gutierrez, and Kiko Kiko. But that brings up two other issues: guest stars who don't have real-world portraits, and guest stars for whom articles do not yet exist. -- RyanGibsonStewart (talk) 01:20, 30 November 2007 (EST)
- Yeah, since it's generating the page, there's no good way to override it. We can add a separate copy of the image for those with no out-of-character images (for example, re-upload Image:Monty Petrelli.jpg as Image:Jackson Wurth.jpg), which would actually make things easier once we get an OOC image. Folks who don't exist yet aren't going to appear in the portals, but they will appear as soon as they're added, which is kind of nice. And on the off chance that we need to override somebody's name, we can read individual variables from templates called by an article, so we could add a "portalname" variable to template:infobox cast and use that to fill
text=--Hardvice (talk) 01:30, 30 November 2007 (EST)- Couldn't we just add image redirects for those?--MiamiVolts (talk) 01:34, 30 November 2007 (EST)
- In the case where the name is simply different (i.e. Rey Mysterio.jpg for Oscar Gutierrez), yes. In the case of nocastimage pages, it actually works much better if we upload a second copy because then, when we replace it with an out-of-character image, all pages update automatically.--Hardvice (talk) 01:41, 30 November 2007 (EST)
- Actually, image redirects redirect the image page, not the image itself.--Hardvice (talk) 01:44, 30 November 2007 (EST)
- Indeed. Just rediscovered that myself. But, except for nocastimage, the redirect will serve the purpose of not having to have the image in a category twice and re-adding the source information.--MiamiVolts (talk) 01:51, 30 November 2007 (EST)
- Couldn't we just add image redirects for those?--MiamiVolts (talk) 01:34, 30 November 2007 (EST)
- Yeah, since it's generating the page, there's no good way to override it. We can add a separate copy of the image for those with no out-of-character images (for example, re-upload Image:Monty Petrelli.jpg as Image:Jackson Wurth.jpg), which would actually make things easier once we get an OOC image. Folks who don't exist yet aren't going to appear in the portals, but they will appear as soon as they're added, which is kind of nice. And on the off chance that we need to override somebody's name, we can read individual variables from templates called by an article, so we could add a "portalname" variable to template:infobox cast and use that to fill
- Most of the names are pretty standard. I think you tend to use lowercase and I use uppercase--can that be fixed using ucfirst or any of those other fun tricks? It looks like there's only three so far for this season that would need to be fixed: Héctor Luis Bustamante, Oscar Gutierrez, and Kiko Kiko. But that brings up two other issues: guest stars who don't have real-world portraits, and guest stars for whom articles do not yet exist. -- RyanGibsonStewart (talk) 01:20, 30 November 2007 (EST)
- No need. I just didn't read their documentation very well. Sort is working, duplicates are fixed. All we need are standard image names and to set up the auto nonlinktext.--Hardvice (talk) 01:09, 30 November 2007 (EST)
Cell size, text breaks
- I copied the images for the two redirects. Not sure if we can fix the cell size or line breaks since that part is autogenerated. Perhaps if the autogenerator called a template, but I'm not sure that would be worth it.--MiamiVolts (talk) 02:07, 30 November 2007 (EST)
- Cell size can be adjusted (some) by adjusting the number in the expr: on Template:PortalCharacter. Right now it's set to force an extra line if the name is less than 12 characters, which works on my browser, but if some cells are too small on yours, then we can tweak it.--Hardvice (talk) 02:10, 30 November 2007 (EST)
- Mark Colson is showing up as three lines in my browser (Mark on one line, Colson on the one below it, and an empty line below that). Is that on purpose (it's only 11 characters with the space)? The rest are fine. Not all split the last and first names into seperate lines, but that's okay cause the cell is large enough to fit them on the same line.--MiamiVolts (talk) 02:23, 30 November 2007 (EST)
- Cell size can be adjusted (some) by adjusting the number in the expr: on Template:PortalCharacter. Right now it's set to force an extra line if the name is less than 12 characters, which works on my browser, but if some cells are too small on yours, then we can tweak it.--Hardvice (talk) 02:10, 30 November 2007 (EST)
- It's possible to have the navbar be automatically generated too -- again, with the caveat that it will need to be manually updated when it comes time to add a new page. It might be possible to make the cell sizes match, but I doubt it -- in this case, it's probably easier to just valign top all the cells and remove the border, and let the text run as long as it wants. Getting the letters for the small versions might be tough, but can probably be done with string functions--find the last space in the name (may require Winter to loop for this), take the next letter.--Hardvice (talk) 02:27, 30 November 2007 (EST)
- I switched them to use table borders instead of no borders at all. I think it looks better that way. Feel free to revert it if you don't.--MiamiVolts (talk) 02:35, 30 November 2007 (EST)
- Good idea. I switched to cell borders to make them less ... Stalinesque ... but it totally works.--Hardvice (talk) 02:38, 30 November 2007 (EST)
- Yeah, the thin grey borders look great.--MiamiVolts (talk) 02:39, 30 November 2007 (EST)
- Good idea. I switched to cell borders to make them less ... Stalinesque ... but it totally works.--Hardvice (talk) 02:38, 30 November 2007 (EST)
- I switched them to use table borders instead of no borders at all. I think it looks better that way. Feel free to revert it if you don't.--MiamiVolts (talk) 02:35, 30 November 2007 (EST)
Remaining issues
Letters for small version of navbar. If we can print the sortkey and restrict the number of characters, cake.- For characters, we'll need to cat minor, main, recurring, and supporting characters, which we should probably do anyway. We can add logic to the navbar, and have it default to "minor"--that way, we only have to update 20 or so pages for characters who aren't minor.
- Standardize any other odd image names
- If we want to add characters who aren't written, we can stub 'em, or we can have them magically appear when they are written. I personally prefer the latter--I don't really see the point of redlinks in the portals except to make sure things don't get forgotten or misplaced (and now they can't).
- Everybody needs to have
sort=in their infobox for the auto navbar to work.--Hardvice (talk) 03:32, 30 November 2007 (EST)
--Hardvice (talk) 02:44, 30 November 2007 (EST) Otherwise, this should be well within our reach.
- The first looks like the most trouble, as I'm not sure how to print the sortkey. The others seem only to require copying this code into another portal and customizing it for said portal. For the case where there are multiple portal pages for a single category, there should be a redlink that appears in the navbar when a new page is required. Defaulting to "minor" is a good idea. Standardizing the image names is straightforward, and I agree about having the new character pages appear when written. I assume it's possible to remove characters that are labelled with the spoilers category.--MiamiVolts (talk) 03:00, 30 November 2007 (EST)
Lines
Partly to enable this, and partly because it bugs the hell out of me, I added a lines variable to Template:PortalCharacter that will set the number of lines of linkspace to add to a cell. This way, we don't need to micromanage nonlinktext to get cell sizes to match; you can just assign "lines=3" to each cell on the page, and they'll all match. Also, the boxes will now scale with the text. Lines defaults to 2 and can currently be set for anything from 1-5; we can add more if we need them.--Hardvice (talk) 05:42, 30 November 2007 (EST)