Module talk:Footnotes: Difference between revisions

Content deleted Content added
m Template:sfnp: clarified my earlier comment in the light of the later tweak
Line 43:
::Nope, <code><nowiki>{{sfnp|James|2004}}</nowiki><code> generates the following footnote.{{sfnp|James|2004}}
::(After the tweak noted below, <code><nowiki>{{sfnp|Smith|2005|ps=none}}</nowiki><code> generates the following footnote.{{sfnp|Smith|2005|ps=none}})
::{{reflist-talk}}
::So as a CS2 user, I end up with <code><nowiki>{{sfnp|ps=|...}}</nowiki></code> but would prefer {{para|ps|none}} for same reason as you (well, actually I'd prefer another template, and did once create one, but the consensus was to delete it).
::Doing things in a "round-about way" is a sure recipe for software errors (at least that's what I used to teach in first-year software engineering). The complexity of the current code is shown by the fact that it isn't easy to work out what {{tl|sfnp}} actually does. A separate function is clearer and easier to maintain. Or perhaps better still (because more modular), pass appropriate parameters to <code>f.sfn()</code>. [[User:Peter coxhead|Peter coxhead]] ([[User talk:Peter coxhead|talk]]) 21:13, 15 December 2014 (UTC)
Line 52:
 
:::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 22:02, 15 December 2014 (UTC)
 
::::Ok, tweaked {{tlx|sfnp/sandbox}} to pass the bracket defaults as {{para|bracket_year_left|(}} and {{para|bracket_year_right|)}} to <code>f.sfn()</code> in [[Module:Footnotes/sandbox]] where those parameters override the defaults normally used by {{tlx|sfn}}:
:::::Some text using {{tlx|sfnp}}.{{sfnp|Smith|2005|ps=none}}
:::::Some text using {{tlx|sfnp/sandbox}}.{{sfnp/sandbox|Smith|Jones|2005}}
:::::Some text using {{tlx|sfnp/sandbox|ps{{=}}none}}.{{sfnp/sandbox|Smith|Jones|Babcock|2005|ps=none}}
{{reflist-talk}}
 
::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 13:08, 16 December 2014 (UTC)