User talk:David Yamakuchi: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>David Yamakuchi
imported>David Yamakuchi
Line 140: Line 140:
:If/when we implement that, the links in the infobox will need to change.--[[User:David Yamakuchi|David Yamakuchi]] 00:00, 10 April 2008 (CDT)
:If/when we implement that, the links in the infobox will need to change.--[[User:David Yamakuchi|David Yamakuchi]] 00:00, 10 April 2008 (CDT)


==Enlistment==


Since you're so great with logical expressions, I was wondering if you could figure this out.  We have a template {{tl|pl}} that lets you see the article status without having to click on the article.  It pulls data from the metadata template and adds a graphic next to it like so:
*{{pl|phosphorus}}
*{{pl|bowling}}
*{{pl|stone}}
*{{pl|wind}}
*{{pl|thanksgiving}}
These are from level 5 to 0 descending.  Can you think of a way to create a table whereby the articles are automatically put into columns based on their status?  I'm thinking that part of the code from the pl template might be handy:
<pre>
{{#ifeq: {{Template:{{{1|}}}/Metadata|info=status}}|0
|{{#if: {{{2|}}} | [[{{{1|}}}|<font color="#006400">{{{2|}}}</font>]]&nbsp;[[Image:Level0.jpg|10px]] |[[{{{1|}}}|<font color="#006400">{{{1|}}}</font>]]&nbsp;[[Image:Level0.jpg|10px]]}}
</pre>
:Let me see what I can come up with...--[[User:David Yamakuchi|David Yamakuchi]] 01:02, 13 April 2008 (CDT)
::I'm onto something with this:
<pre>
{|border=1
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|0|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|1|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|2|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|3|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|4|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|5|{{pl|Phosphorus}}|&nbsp;}}
|-
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|0|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|1|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|2|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|3|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|4|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|5|{{pl|Bowling}}|&nbsp;}}
|-
|{{#ifeq: {{template:Toy/Metadata|info=status}}|0|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|1|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|2|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|3|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|4|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|5|{{pl|Toy}}|&nbsp;}}
|}
</pre>
It produces:
{|border=1
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|0|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|1|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|2|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|3|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|4|{{pl|Phosphorus}}|&nbsp;}}
|{{#ifeq: {{template:Phosphorus/Metadata|info=status}}|5|{{pl|Phosphorus}}|&nbsp;}}
|-
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|0|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|1|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|2|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|3|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|4|{{pl|Bowling}}|&nbsp;}}
|{{#ifeq: {{template:Bowling/Metadata|info=status}}|5|{{pl|Bowling}}|&nbsp;}}
|-
|{{#ifeq: {{template:Toy/Metadata|info=status}}|0|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|1|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|2|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|3|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|4|{{pl|Toy}}|&nbsp;}}
|{{#ifeq: {{template:Toy/Metadata|info=status}}|5|{{pl|Toy}}|&nbsp;}}
|}
I tried to have it work substituting the article name for {{{1}}} in {{tl|Xl}} but it didn't work. --[[User:Robert W King|Robert W King]] 07:52, 13 April 2008 (CDT)
I'm not sure what your doing here, exactly but if you use a switch you can do it this way:
{|class="wikitable sortable"
|width=100 align=center|0
|width=100 align=center|1
|width=100 align=center|2
|width=100 align=center|3
|width=100 align=center|4
|-
{{tc|Phosphorus}}
{{tc|Bowling}}
{{tc|Toy}}
{{tc|Life}}
{{tc|Biology}}
{{tc|intron}}
{{tc|enzyme}}
|}
See the associated template {{tl|table}} for the switch and {{tl|tc}} for the initial template.  [[User:Chris Day|Chris Day]] 11:05, 14 April 2008 (CDT)
:What I'm trying to do is have an organized table or lists that sort based on status level, without gaps.
::What do you mean without gaps? Would you regard the table above without gaps? [[User:Chris Day|Chris Day]] 11:42, 14 April 2008 (CDT)
:::The initial table I did above, with three entries, does not top-align the entries. --[[User:Robert W King|Robert W King]] 11:48, 14 April 2008 (CDT)
::::I was messing around with the style so it was off for a while.  Is the current version above what you were thinking? [[User:Chris Day|Chris Day]] 11:52, 14 April 2008 (CDT)
:::::No, because not every entry is on the first row {{codefrown}}.  That's the tricky part.  The eventual goal for this thing will be a part of the workgroup template. --[[User:Robert W King|Robert W King]] 12:17, 14 April 2008 (CDT)
::::::So you want everything on a single row (or do you mean colomn?) and sortable (by status and name) ? [[User:Chris Day|Chris Day]] 12:29, 14 April 2008 (CDT)
:::::::Well, each will have their own column, but they should be consecutive rows per column; not dependant on position of the previous entry.  Basically it should look like this:
{|border=1
|{{pl|phosphorus}}
|{{pl|wristwatch}}
|&nbsp;
|{{pl|toy}}
|&nbsp;
|{{pl|thanksgiving}}
|-
|&nbsp;
|&nbsp;
|&nbsp;
|{{pl|wind}}
|&nbsp;
|&nbsp;
|}
where each entry falls below the next automatically, as determined by the template. --[[User:Robert W King|Robert W King]] 12:36, 14 April 2008 (CDT)
OK, now I understand what you are trying to do. Nothing jumps out as a solution to this problem, unless you want to repeat every entry five times and that does not sound ideal.  [[User:Chris Day|Chris Day]] 12:38, 14 April 2008 (CDT)
So we could write:
<pre>
{|
| valign=top|
{|class="wikitable sortable"
|width=100 align=center|0
|-
{{tc0|Phosphorus}}
{{tc0|Bowling}}
{{tc0|Stone}}
{{tc0|Life}}
{{tc0|Biology}}
{{tc0|intron}}
{{tc0|enzyme}}
|}
| valign=top|
{|valign=top class="wikitable sortable"
|width=100 align=center|1
|-
{{tc1|Phosphorus}}
{{tc1|Bowling}}
{{tc1|Stone}}
{{tc1|Life}}
{{tc1|Biology}}
{{tc1|Evolution}}
{{tc1|Orchid}}
|}
| valign=top|
{|class="wikitable sortable"
|width=100 align=center|2
|-
{{tc2|Phosphorus}}
{{tc2|Bowling}}
{{tc2|Stone}}
{{tc2|Life}}
{{tc2|Biology}}
{{tc2|Evolution}}
{{tc2|Orchid}}
|}
|}
</pre>
Which would show three columns as below:
{|
| valign=top|
{|class="wikitable sortable"
|width=100 align=center|0
|-
{{tc0|Phosphorus}}
{{tc0|Bowling}}
{{tc0|Stone}}
{{tc0|Life}}
{{tc0|Biology}}
{{tc0|intron}}
{{tc0|enzyme}}
|}
| valign=top|
{|valign=top class="wikitable sortable"
|width=100 align=center|1
|-
{{tc1|Phosphorus}}
{{tc1|Bowling}}
{{tc1|Stone}}
{{tc1|Life}}
{{tc1|Biology}}
{{tc1|Evolution}}
{{tc1|Orchid}}
|}
| valign=top|
{|class="wikitable sortable"
|width=100 align=center|2
|-
{{tc2|Phosphorus}}
{{tc2|Bowling}}
{{tc2|Stone}}
{{tc2|Life}}
{{tc2|Biology}}
{{tc2|Evolution}}
{{tc2|Orchid}}
|}
|}
The simple version of above is (i have only coded it for three different status values):
::The following: <nowiki>{{WgTable|Phosphorus|Bowling|Stone|Life|Biology|Evolution|Orchid|Glycolysis}}</nowiki> will give the three columns below:
{{WgTable|Phosphorus|Bowling|Stone|Life|Biology|Evolution|Orchid|Glycolysis}}
So, if you get you n+1 bit worked out for the {{tl|WgTable}} template this should work.  [[User:Chris Day|Chris Day]] 13:35, 14 April 2008 (CDT)
:What? --[[User:Robert W King|Robert W King]] 13:37, 14 April 2008 (CDT)
David was playing around with using logic arguments (countdown arguments? I don't know the official name) to reduce the amount of repetitive code.{{{ i.e using expressions like<nowiki> {{ #expr: {{{n}}} -1}}|}}}</nowiki> where n is the number of items in the list.
So for the three colomn table above n=8 (Phosphorus|Bowling|Stone|Life|Biology|Evolution|Orchid|Glycolysis). I can code for that in {{tl|WgTable}} but the problem comes when you have 100 links.  Obviously it would be possible to code the {{tl|WgTable}} template to be used by up to 100 names, or even more, but I'm not sure that is the ideal way we want to go.  [[User:Chris Day|Chris Day]] 13:51, 14 April 2008 (CDT)
::To continue, if {{tl|WgTable}} had up to 100 parameters it could tabulate up to 100 article names (it currently has the ability to tabulate 40 different articles by status and alphabetical order), but anything over would not get listed. [[User:Chris Day|Chris Day]] 14:11, 14 April 2008 (CDT)
:The thing is, there's still manual work involved in that process, which is what I'm trying to avoid. --[[User:Robert W King|Robert W King]] 14:01, 14 April 2008 (CDT)
Not sure what you mean by manual work.  You plan to automatically generate a list of articles for each work groups page? Wouldn't that be huge, and redundant with the categories we already have?  I thought your goal here was to have some kind of refined list.  Would that not have to have some kind of manual component? [[User:Chris Day|Chris Day]] 14:11, 14 April 2008 (CDT)
:Maybe I'm not being clear on what I'm trying to do.  I want to use one template command to organize a table/graphic of article statuses, that users can use by typing in <nowiki>{{blah|articlename}}</nowiki> for each article and have it appropriately rendered.  There shouldn't be any manual sorting; it should all be dynamic if possible. --[[User:Robert W King|Robert W King]] 14:19, 14 April 2008 (CDT)
And that is exactly what you get with the {{tl|WgTable}} template. Maybe you are missing how it works? Test with with seven random articles and see what happens. As follows <nowiki>{{WgTable|Random1|Random2|Random3......Random7}}</nowiki> [[User:Chris Day|Chris Day]] 14:21, 14 April 2008 (CDT)
:Now you try it up to 40 different articles (<nowiki>{{WgTable|Random1|Random2|Random3......|Random40}}</nowiki>). If this is not what you want then I'm not really sure what you are trying to do.  [[User:Chris Day|Chris Day]] 14:45, 14 April 2008 (CDT)
Here are 40 random article from the biology all article list:
Coded as:<nowiki> {{WgTable|Adhesion plaques|Adipose tissue|Aerobic organism|Aeropyrum pernix|Affinity chromatography|Agkistrodon piscivorus conanti|AIDS|Alanine|Alanine cycle|Alcor Life Extension Foundation|Alexander Fleming|Alipiopsitta xanthops (Yellow-faced Parrot)|Allelopathy|Allen's rule|Allopatric speciation|Allozymes|Altruism|Amanita phalloides|Amaryllis|American Cryonics Soc|Amino acid|Anabolic steroids|Anabolism|Anal scale|Anatolian Shepherd Dog|Anatomy|Human anatomy|Angiotensin|Animal|Animal consciousness|Animal fancy|Anterior pituitary|Antineoplastons|Ape|Apoptosis|APP|Ara autocthones (Saint Croix Macaw)|Arbitrary culture theory|Archaea|Arcuate nucleus}}</nowiki>
And rendered as:
{{WgTable|Adhesion plaques|Adipose tissue|Aerobic organism|Aeropyrum pernix|Affinity chromatography|Agkistrodon piscivorus conanti|AIDS|Alanine|Alanine cycle|Alcor Life Extension Foundation|Alexander Fleming|Alipiopsitta xanthops (Yellow-faced Parrot)|Allelopathy|Allen's rule|Allopatric speciation|Allozymes|Altruism|Amanita phalloides|Amaryllis|American Cryonics Soc|Amino acid|Anabolic steroids|Anabolism|Anal scale|Anatolian Shepherd Dog|Anatomy|Human anatomy|Angiotensin|Animal|Animal consciousness|Animal fancy|Anterior pituitary|Antineoplastons|Ape|Apoptosis|APP|Ara autocthones (Saint Croix Macaw)|Arbitrary culture theory|Archaea|Arcuate nucleus}}
:Is there a way to configure what it looks like? --[[User:Robert W King|Robert W King]] 15:00, 14 April 2008 (CDT)
::You can probably tweak it to look however you like.  Feel free to play with it.  I have just been trying to get my brain around the mechanics of it rather than the look.  Is this what you are trying to do?  The critical thing is how many actual articles do you anticipate having in any given table. [[User:Chris Day|Chris Day]] 15:07, 14 April 2008 (CDT)
:::It could be a lot. --[[User:Robert W King|Robert W King]] 15:10, 14 April 2008 (CDT)
::::Well clearly it is possible to accommodate a lot. But it might be better if it can be coded for any value up to ''n'' other wise the template will start to get pretty big. Let's wait and see if David can get it to work. [[User:Chris Day|Chris Day]] 15:14, 14 April 2008 (CDT)
Hi David, I have set up the {{tl|WgTable}} template so it can distinguish redirects too. Currently it can work with up to 100 article names. Obviously, if you can get some kind if logic in there to work with value N, that will be great.
There is one bug that is a pain, there cannot be a space between the article name and the pipe (or brackets) otherwise the status call to the metadata template does not work.  For example, <nowiki>{{WgTable| Biology | Life }}</nowiki> does not work but <nowiki>{{WgTable| Biology| Life}}</nowiki> does work. You can see an experiment on the biology workgroup at [[CZ:Biology_Workgroup#Lower_priority]] and similar sections. [[User:Chris Day|Chris Day]] 11:18, 15 April 2008 (CDT)
:The current CZ setup seems to preclude us from directly doing recursion like we would probably want for this "N+1" type of implementation you mention above.  This does make sense for security reasons, as with this kind of recursion a user could send the server into an infinite loop...and that would make us unhappy.  Looks like in this case perhaps the direct implementation is the most straightforward, albeit a little cumbersome--[[User:David Yamakuchi|David Yamakuchi]] 15:51, 15 April 2008 (CDT).


== Template Recursion ==
== Template Recursion ==

Revision as of 22:33, 16 April 2008

Welcome!

Citizendium Getting Started
Join | Quick Start | About us | Help system | How to start a new article | For Wikipedians
How to Edit
Getting Started Organization Technical Help
Policies Content Policy
Welcome Page


Welcome to the Citizendium! We hope you will contribute boldly and well. You'll probably want to know how to get started as an author. Just look at CZ:Getting Started for other helpful "startup" links, and CZ:Home for the top menu of community pages. Be sure to stay abreast of events via the Citizendium-L (broadcast) mailing list (do join!) and the blog. Please also join the workgroup mailing list(s) that concern your particular interests. You can test out editing in the sandbox if you'd like. If you need help to get going, the forums is one option. That's also where we discuss policy and proposals. You can ask any constable for help, too. Me, for instance! Just put a note on their "talk" page. Again, welcome and have fun! Dan Nachbar 08:52, 29 December 2007 (CST)

Hi David

Regarding this, to get new content-area workgroups going, go to CZ:New Workgroup Requests. What's going to happen in the near future is that a whole bunch of new workgroups are going to be created all at once. There'll probably be a community-wide call, discussion, and then I think all the new ones that emerge are going to the editorial council for a vote. In the meantime, no need to let lack of a workgroup halt up work. Just pick something sorta close for now. Stephen Ewen 01:04, 31 December 2007 (CST)

See Special:Log/delete. CZ:Dance Workgroup might be a good part of a proposal for the workgroup, though. Stephen Ewen 01:21, 31 December 2007 (CST)

Hi Stephen,

Whoops!! I hope I didn't cause you too much trouble, I just hit the edit button and there I was adding a new workgroup :-) It all looked so easy until I found I had to make all the pages for it....then it was more of a :-{ Thanks for the guidance. --David Yamakuchi 01:29, 31 December 2007 (CST)

Not any problem at all. I put a plug in for your idea at CZ_Talk:Workgroups#Performing_Arts_section_for_workgroups. Stephen Ewen 01:33, 31 December 2007 (CST)

welcome to history

Welcome to the history workgroup--we really need your help. My daughter just signed up today for a course in fluid mechanics so maybe we'll be calling on help for that too! Richard Jensen 22:23, 6 January 2008 (CST)

Fluid Mechanics...ack! I just wanted to fill in the last couple missing Presidents with some blatently copied (albeit from public domain) material :-) Hey now that you mention it tho, my brakes have been a little spongy lately, maybe your daughter could help me!!!

But seriously, thanks for the note. I'm not great with history, but I got on a roll today and I'm still sorta having fun with it...--David Yamakuchi 22:48, 6 January 2008 (CST)

Calls for citations...

David: Just a heads up. I removed your citation needed template from the Lao Tse article. Larry is vehemently against ever using that or the fact template that you see at Wikipedia. This is based partly on the presumption that since we are vetted experts in our various fields, we know what we're talking about. I created one early on and it was summarily deleted within minutes, with a reprimand from several other editors...that's why you couldn't find it here.

As for that reference, it'll show up. I am compulsive about referencing, and you will rarely see me write something for which I cannot find some source. Blessings... --Michael J. Formica 06:38, 19 January 2008 (CST)

Michael: I did see the lack of a citation needed here, and I've never actually used one before _but_, the statement you made that Lao Tse was born in 604 B.C. is not really verifiable. While I will agree that you'll be able to find some references that says this is true, I will be able to find just as many references that say this is not. If you read the Stanford reference (and you might want to pack a lunnch for that BTW), you will find that there are more than one account of things.

Now, in terms of being vetted experts, and with all due respect to Mr. Sanger, my original entry was poo-poohed (sp?) for being a little wishy-washy in terms of the dates. I believe I said something like 600-200B.C., to which Larry responded "can't we do better?" The simple answer as I see it is NO! If we can't even be sure that the person existed, and there are conflicting accounts of the "real" history, my opinion is that is encumbent upon us as "experts" to present all sides of the story...which is at this point uncertain.

You sir, have stated as a fact something that was originally in the article as debated, _and_ removed my data that represents years of research on the subject. I am dissapointed. I will also point out that even though the data was immediately questioned by the Editor-In-Chief himself, it was not removed. We can't just go deleting things we don't like in articles. Consider the Holocaust entry, eh? The Talk page is used for that, and when that fails the Constables, I'm told, will be more than happy to assist.

That said, I am absolutely _not_ an expert on anything...except maybe my own experiences which I am attempting to selectively share so that we can all benefit from them. But what I can say with ceretainty is that (and since I believe _you_ were the one that added this article to the Religion workgroup, I'm sure you can understand) people can get kinda funny when you start misrepresenting their religion. Lao Tse is revered by many, and dismissed by many others. It's important that we try to consider everyone's opinion here, and not just the opinion that was taught at one particular school.

I'm going to copy this discussion over to the Talk page of the article in the hopes that we can avoid someone else having to go through this again.--David Yamakuchi 11:36, 19 January 2008 (CST)

Recommendation for templates

Consider using the "show preview" button when you make a slight change-- that way it won't flood the "Recent changes" page as much. Template:Codewink --Robert W King 10:45, 28 March 2008 (CDT)

Thanks, I usually _do_ use that for editing regular articles, but I don't in the case of a template.

Sorry about the long history page but "c'est la vie" as they say. Perhaps I will be able to find an admin willing to help me delete the mess once I've learned what I would like to know.--David Yamakuchi 12:28, 28 March 2008 (CDT)

Your version of the infobox

David, see Template_talk:Elem_Infobox_test1. I think it's possible that I may want to slide maybe one or two pieces of information into my original version, but I feel as they get more complex they only become more meaningless to the average person (who is really the target, anyway). --Robert W King 09:06, 31 March 2008 (CDT)

Of course, feel free to use what you like and I agree that it is too complex to use as it is. I like the idea that's going around about the subpage approach, but do believe (obvoiusly) that the infobox can have lots of useful info packed in a small area.--David Yamakuchi 14:32, 1 April 2008 (CDT)

The wikilinks seem like a good solution to implement until something more obvious but less crowded can be implemented. Good job though! Put it into the main Elem_infobox template. Also, I'm not sure that every criteria should be directed to the subpage table. Certainly there should be some very basic things listed, but sorting all the stuff like MSDS, complex properties, etc should definately go on a subpage. Maybe we can get Chris to create a new subpage type. If you can figure out the #IF logic required so that only elements of the table display when they are filled (including the title elements) that would be aces. --Robert W King 17:38, 3 April 2008 (CDT)

info box

What do you think of the recent changes I made? I think if the periodic table picture is designed specifically for this infobox, i.e. <200px it should look pretty good, rather than a shrunk down version. Let me know if there is anything you want put back the way it was previously?

As far as the element specific periodic tables are concerned we can write code that enters the right table automatically based on the element name. Something a long the lines of.

{{#ifexist:Image:Periodic table {{{elementname}}}.jpg| [[Image:Peridic table {{{elementname}}}.jpg|center|135px]]}}

Or what evenr the field name is for the element nane. Chris Day 13:00, 4 April 2008 (CDT)

switch/case is the thing you want there IMHO, but we need the .jpg's yet. Maybe if a few folks get to see the one you did for the template we might have some more to work with soon? I really like the way you got it to come out...thanks again. Now there was just one more thing...:-)--David Yamakuchi 01:36, 5 April 2008 (CDT)

Great work

David, great work on the template. It looks terriffic! --Robert W King 09:45, 8 April 2008 (CDT)

Duel identity

Hi David, I have really cut down the content in the ele template, hopefully nothing to damaging. Also, what is the logic of the duel identities, see the following elements for examples?:

{{#ifeq:{{{elSym}}}|Th|
{{!}}{{ele|{{#if:{{{elementColor|}}}|color={{{elementColor}}}|color=#828200}}|alphaOp=100|elOpacity=1|b=0|elSym={{{elSym}}}}}|
{{#ifeq:{{{elClass}}}|Transition Metal|
{{!}}{{ele|color=#ff00ff|alphaOp=60|elOpacity=.6|b=0}}|
{{#ifeq:{{{elClass}}}|Actinide|
{{!}}{{ele|color=#0000FF|alphaOp=60|elOpacity=.6|b=0}}|
{{!}}{{ele|color=#0000FF|alphaOp=10|elOpacity=.10|b=0}}
}}}}}}

{{#ifeq:{{{elSym}}}|La|
{{!}}{{ele|{{#if:{{{elementColor|}}}|color={{{elementColor}}}|color=#00ae00}}|alphaOp=60|elOpacity=.6|b=0|elSym={{{elSym}}}}}|
{{#ifeq:{{{elClass}}}|Transition Metal|
{{!}}{{ele|color=#ff00ff|alphaOp=60|elOpacity=.6|b=0}}|
{{#ifeq:{{{elClass}}}|Lanthanide|
{{!}}{{ele|color=#00ae00|alphaOp=10|elOpacity=.1|b=0}}|
{{!}}{{ele|color=#00ae00|alphaOp=10|elOpacity=.10|b=0}}
}}}}}}

In the above two cases why do you want the Th and La lighting up in the ff00ff colour when the element is one of the transition metals?


{{#ifeq:{{{elSym}}}|Ge|
{{!}}{{ele|{{#if:{{{elementColor|}}}|color={{{elementColor}}}|color=#828200}}|alphaOp=100|elOpacity=1|b=0|elSym={{{elSym}}}}}|
{{#ifeq:{{{elClass}}}|Post-Transition Metal|
{{!}}{{ele|color=#0000FF|alphaOp=60|elOpacity=.6|b=0}}|
{{#ifeq:{{{elClass}}}|Metalloid|
{{!}}{{ele|color=#a5a5a5|alphaOp=60|elOpacity=.6|b=0}}|
{{!}}{{ele|color=#0000FF|alphaOp=10|elOpacity=.10|b=0}}
}}}}}}

{{#ifeq:{{{elSym}}}|As|
{{!}}{{ele|{{#if:{{{elementColor|}}}|color={{{elementColor}}}|color=#00ae00}}|alphaOp=60|elOpacity=.6|b=0|elSym={{{elSym}}}}}|
{{#ifeq:{{{elClass}}}|Non-Metal|
{{!}}{{ele|color=#00ae00|alphaOp=60|elOpacity=.6|b=0}}|
{{#ifeq:{{{elClass}}}|Metalloid|
{{!}}{{ele|color=#a5a5a5|alphaOp=60|elOpacity=.6|b=0}}|
{{!}}{{ele|color=#00ae00|alphaOp=10|elOpacity=.10|b=0}}
}}}}}}

{{#ifeq:{{{elSym}}}|Br|
{{!}}{{ele|{{#if:{{{elementColor|}}}|color={{{elementColor}}}|color=#ffae00}}|alphaOp=60|elOpacity=.6|b=0|elSym={{{elSym}}}}}|
{{#ifeq:{{{elClass}}}|Halogen|
{{!}}{{ele|color=#ffae00|alphaOp=60|elOpacity=.6|b=0}}|
{{#ifeq:{{{elClass}}}|Non-Metal|
{{!}}{{ele|color=#00ae00|alphaOp=60|elOpacity=.6|b=0}}|
{{!}}{{ele|color=#ffae00|alphaOp=10|elOpacity=.10|b=0}}
}}}}}}

It appears you want they to highlight differently depending on the element. But why would you want them to light up in two different circumstances and with two different colours? Chris Day 22:39, 8 April 2008 (CDT)

The idea was that if you called the template for say Br, you could declare it part of the Halogens (elClass=Halogens) from infobox and show those, or you could declare it a nonmetal (elClass=Non-Metal) and lite up those squares. Same for Lanthanides and actinides, which can be designated as those, transition metals, or rare earth metals along with Y and Sc.--David Yamakuchi 22:46, 8 April 2008 (CDT)
It just didn't make sense to me to light up the Non-Metals and _Not_ light up the halogens...the halogens are nonmetals...aren't they?--David Yamakuchi 22:48, 8 April 2008 (CDT)
Why use different colors? Couldn't they show up when defined as non-metals yet still be coloured as halolgens? Also doesn't no-metal in tnhis usage have a very deifinite meaning rather than the in a general sense? This is not rhetorical, I really don't know. Chris Day 22:56, 8 April 2008 (CDT)

When I looked at a bunch of different tables that's what I saw. Sometimes one way sometimes the other. Tables can't even agree on where the transition elements end. I think we might not be done with this one for a while. But what we can do for now is be ready with a mechanism that supports whatever classification system tomorrow brings...I think--David Yamakuchi 23:03, 8 April 2008 (CDT)

modify periodic style

I assume you are going to mess around with the style of the different cells. I think Robert is already thinking about colors. FYI, colors for each element can be defined at {{Elem_Infobox}}. The cell styles, including cell size, line thickness and color, as well as the opacity values, can be defined at {{Ele it}} for the black cell that marks the specific element‎, at {{Ele off}}‎ for those cells in the background of unrelated elements to the black one and at {{Ele on}} for cells that have related elements.

Feel free to change anything I have done. I'm taking a back seat again for now. Chris Day 11:29, 9 April 2008 (CDT)

Catalog pages

  • the catalog subpage is actually supposed to be the root for catalogues, e.g. Colors/Catalogs/Red. Also, these catalog pages need to be seriously organized in some way. I suggest we get David Volk involved. --Robert W King 19:57, 9 April 2008 (CDT)
If/when we implement that, the links in the infobox will need to change.--David Yamakuchi 00:00, 10 April 2008 (CDT)


Template Recursion

Hi, I was about to leave Chris Day a message and I saw your message to him. You might want to check out this help page on Meta, and also this. I also have a list of helpful template documentation pages on my User: page. J. Noel Chiappa 01:15, 14 April 2008 (CDT)

PS: Your comment about C: Templates have a lot of the look-and-feel of a programming language, but they aren't, so don't be misled. 'Calls' of templates aren't calls in the normal sense. All templates do is replace one (sub-)string with a different (sub-)string: in the evaluation of template(s), one string gets turned into another string, which usually then gets turned into another, and so on. Sometimes the order in which stuff gets done can be confusing; the fact that it's replacement means things can happen in odd (i.e. counter-intuitive, confusing, complex, and hard to understand) ways; e.g. whether the arguments get evaluated before the 'code' (e.g. conditionals). See Migration to the new preprocessor for examples of the kind of thing I'm talking about, where changes to the preprocessor changed what you get from certain 'odd' template syntax. J. Noel Chiappa 01:27, 14 April 2008 (CDT)

There's a "strings" package for MediaWiki, which we don't have installed yet. I seem to recall one one of those pages I have links to, people talking about ways to do some of the strings stuff without it, such as this. Does that Help:Advanced templates have any kludges that are applicable? J. Noel Chiappa 14:55, 14 April 2008 (CDT)
I tried some kind of {{#explode:}} template that I found in the MediaWiki docs. It claimed it would parse a string for me by a delimiter value I gave it, but the page just spit it back out at me in grey :-(--David Yamakuchi 19:49, 14 April 2008 (CDT)
#Explode is part of "strings". J. Noel Chiappa 10:56, 15 April 2008 (CDT)