Template talk:Cite book

From Dungeons and Dragons Wiki
Jump to: navigation, search

Wikipedia Style[edit]

This template is used very often, when content from Wikipedia is moved here. Wikipedia's template has a lot more functions, though, and that way this cause problems (like with authors at Canon:Forgotten Realms) and each time, the template was used in Wikipedia it has to be adapted here. Would it make sense to change to Wikipedia's template completely? I don't think that this will cause problems with all the cases that we have used this version of the template now, but I am not sure, and I also do not know if there will be any problems with just pasting the Wikipedia template here. What does anybody else think? Does anyone want to do this? Daranios 12:09, 23 July 2011 (UTC)

The wikipedia template looks like it has a lot of extra bits that we wouldn't use, so I'm slightly inclined to just fix this one, but we can do either. What's the problem with the FR page? - Tarkisflux Talk 17:25, 23 July 2011 (UTC)
The Wikipedia template includes the possiblities "last", "first", "authorlink" and "coauthors" instead of our just "author". So if an article is just imported from Wikipedia, author(s) do not show up correctly like in the references section of Canon:Forgotten Realms. I exchanged the "last" and "first" entries with "author" in Canon:Dragonlance, but I am still missing the coauthors there. Of course this could be changed in the articles manually, but maybe that work could be avoided. Daranios 13:42, 24 July 2011 (UTC)
So the current template doesn't work for multiple authors and it isn't compatible with any wikipedia imports. I could fix multiple authors on this one, but that doesn't do anything for compatibility. So yeah, we can just use the wikipedia template, but we'll need to rename either this one or that one. Rename this one can be covered with a text replace, renaming the wikipedia one requires manual updating of the called template anytime a page is imported. Let me know which you prefer. - Tarkisflux Talk 15:17, 24 July 2011 (UTC)
I am not quite sure I understand. I think I would prefer to rename this template and keep the name for the Wikipedia one. However, I am not sure if it might not just be possible to change this template into the one from Wikipedia? Daranios 18:29, 26 July 2011 (UTC)
As a test, I just pasted in the Wikipedia template with its sub-templates without knowing what I was doing. So far, I have seen no problems arising. The only thing that seems not to be working correctly is the ISBN number. "ISBN" is now a link to the (non-existing) page of that name, instead of being one link together with the actual number to Book sources, like it is supposed to be. And as I am quite unfamiliar with all the background of the template I have imported, I don't know how to change that. Daranios 16:50, 28 July 2011 (UTC)
I was expecting there to be an issue with the old template parameters in the new template. I haven't taken a full look at all of the template calls yet, so I'll take your word for it that it's working so far. I have also tracked down the ISBN issue and removed the link. - Tarkisflux Talk 18:37, 28 July 2011 (UTC)

Would this work better?[edit]

Havvy pointed out that there were a lot of subpages here, and it looks like they were added for ease of use for often referenced books. I thought referencing the publication page would cut down on a lot of the work and new pages, with the added side effect of making people who reference stuff fill in the publication pages ;-). So I went and made Template:Cite Pub to do that. Let me know if you think it works better, or want things on it adjusted, or would rather keep the subpages here instead. - Tarkisflux 18:24, 30 December 2010 (UTC)

If this template works so well all the time, it's great in my opinion! I would keep the other template(s) dealing with citations however, as long as they are used. If someone can take the time to change the pages where the old templates are used, and the gets rid of the old templates, all the better. (Let's please keep all DnDWiki templates until all old DnDWiki articles have been adapted and shifted into other namespace, some links are broken there so that one does not know if they still might be needed.) Daranios 19:20, 30 December 2010 (UTC)
It will as long as the publication page is filled in nicely (there's new idiot proofing code for the publication infobox so this will get properties in the expected format). Keeping the old ones until things have been migrated is fine, I just wanted to set something up that required fewer subpages and also encouraged filling in publication pages. - Tarkisflux 19:51, 30 December 2010 (UTC)
I have encountered a first minor problem: For the Publication:Manual of the Planes (3e), the book name within the Cite_Pub links to the disambiguation page, not the book's page, like in Canon:Demonweb Pits. I expect this problem will crop up for all cases with different books having the same name, like Monster Manual. I am not too good with syntax issues. Do you see any possibilty to solve that? Perhaps something could be done by linking the title to "[[Publication:{{{1}}}]]", while still showing the "?Title" from the book's page? Daranios 19:42, 7 January 2011 (UTC)
Sorry for the delay, missed this. It's already doing the thing you suggested, it's just not carrying the (stuff) for some reason. I'm looking into it. - Tarkisflux 16:36, 21 January 2011 (UTC)
Nevermind, I know why it's doing this. Should be fixed by end of day. - Tarkisflux 17:31, 21 January 2011 (UTC)
Fixed now. I was wrong about it doing what you suggested, it was just using page title as the link and needed to pull in the page identifier to make it work. Your suggestion was a good one, but I can't pass that information to the formatting template because it's inside of other stuff. Anyway, should be all set now. Let me know if you don't want the identifier to show up in the page link for whatever reason, I can pull that out without a problem but thought it would be useful for disambig purposes. - Tarkisflux 18:07, 21 January 2011 (UTC)
Great! I see your point for keeping the identifier, but my feelings from what I had to learn about citation make me want to really only have the book title, not the name of the link. And the publication year will already tell the edition to those who already have some background knowledge. I. e. I think both versions would be allright, but I would prefer dropping the identifier. Daranios 10:47, 22 January 2011 (UTC)
Removed. - Tarkisflux 17:34, 22 January 2011 (UTC)

Old Version[edit]

Below is the version from DnDWiki. Angela<staff /> (talk | help forum) 01:49, June 24, 2010 (UTC)

<includeonly><cite class="book" style="font-style:normal" {{
  #if: {{{ref|}}}
  |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }}
  #if: {{{author|}}}{{{last|}}}
  | {{
    #if: {{{authorlink|}}}
    | [[{{{authorlink}}}|{{
      #if: {{{last|}}}
      | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
      | {{{author}}}
    | {{
      #if: {{{last|}}}
      | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
      | {{{author}}}
  #if: {{{author|}}}{{{last|}}}
  | {{ #if: {{{coauthors|}}} | <nowiki>; {{{coauthors}}} }}
  #if: {{{origdate|}}}
  |  [{{{origdate}}}]
  | {{
    #if: {{{origyear|}}}
    | {{
      #if: {{{origmonth|}}}
      |  [{{{origmonth}}} {{{origyear}}}]
      |  [{{{origyear}}}]
  #if: {{{date|}}}
  |  ({{{date}}})
  | {{
    #if: {{{year|}}}
    | {{
      #if: {{{month|}}}
      |  ({{{month}}} {{{year}}})
      |  ({{{year}}})
}}{{ #if: {{{author|}}}{{{last|}}} | .
  #if: {{{chapter|}}}
  |  "{{
    #if: {{{chapterurl|}}}
    | [{{{chapterurl}}} {{{chapter}}}]
    | {{{chapter}}}
  #if: {{{editor|}}}
  |  in {{{editor}}}:[[Template:Cite book/editor| ]]
}} <i>{{
  #if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}}
  #if: {{{format|}}} |  ({{{format}}})
  #if: {{{others|}}} | , {{{others}}}
  #if: {{{edition|}}} | , {{{edition}}}
  #if: {{{series|}}} | , {{{series}}}
  #if: {{{language|}}} |  (in {{{language}}})
  #if: {{{publisher|}}}
  | {{#if: {{{format|}}}{{{others|}}}{{{edition|}}} | ,  | .  }}{{ 
    #if: {{{location|}}} 
    | {{{location}}}: 
  #if: {{{pages|{{{page|}}}}}} | , {{{pages|{{{page}}}}}}
  #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi|{{{doilabel|}}}}}} {{{doi}}}]
  #if: {{{id|}}} | . {{{id}}}
  #if: {{{isbn|}}} | . ISBN {{{isbn}}}
  #if: {{{oclc|}}} | . [[OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
  #if: {{{url|}}} | {{
  #if: {{{accessdate|}}} | 
  . Retrieved on [[{{{accessdate}}}]]
  | {{
    #if: {{{accessyear|}}}
    | . Retrieved {{
      #if: {{{accessmonth|}}}
      | on [[{{{accessmonth}}} {{{accessyear}}}]]
      | during [[{{{accessyear}}}]]
}}.{{ #if: {{{quote|}}} |  “{{{quote}}}”

This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
  --><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
  -->&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}<!--                   Field descriptions: http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:book
  -->&rft.genre=book<!--                                                        book: a publication that is complete in one part or a designated finite number of parts, often identified with an ISBN.  (genre could also be bookitem, conference, proceeding, report, document, or unknown)
  -->&rft.btitle={{urlencode:{{{title|}}}}}<!--                                 The title of the book. This can also be expressed as title, for compatibility with version 0.1. "moby dick or the white whale"
  -->{{#if: {{{chapter|}}}   | &rft.atitle={{urlencode:{{{chapter}}}}}   }}<!-- Chapter title. Chapter title is included if it is a distinct title, e.g. "The Push Westward."
  -->{{#if: {{{last|}}}      | &rft.aulast={{urlencode:{{{last}}}}}      }}<!-- First author's family name. This may be more than one word ... e.g. Smith, Fred James is recorded as "aulast=smith"
  -->{{#if: {{{first|}}}     | &rft.aufirst={{urlencode:{{{first}}}}}    }}<!-- First author's given name or names or initials. This data element may contain multiple words and punctuation, e.g. "Fred F", "Fred James"
  -->{{#if: {{{author|}}}    | &rft.au={{urlencode:{{{author}}}}}        }}<!-- This data element contains the full name of a single author, e.g. "Smith, Fred M", "Harry S. Truman".
  -->{{#if: {{{date|}}}      | &rft.date={{urlencode:{{{date}}}}}<!--
  -->{{#if: {{{year|}}}      | &rft.date={{urlencode:{{{year}}}}} }}     }}<!-- Date of publication. Book dates are assumed to be a single year. (or ISO 8601)
  -->{{#if: {{{edition|}}}   | &rft.edition={{urlencode:{{{edition}}}}}  }}<!-- Statement of the edition of the book. This will usually be a phrase, with or without numbers, but may be a single number, e.g. "First edition", "4th ed."
  -->{{#if: {{{publisher|}}} | &rft.pub={{urlencode:{{{publisher}}}}}    }}<!-- Publisher name. "Harper and Row"
  -->{{#if: {{{location|}}}  | &rft.place={{urlencode:{{{location}}}}}   }}<!-- Place of publication. "New York"
  -->{{#if: {{{pages|{{{page|}}}}}}     | &rft.pages={{urlencode:{{{pages|{{{page}}}}}}}}      }}<!-- Start and end pages for parts of a book, e.g. "124-147" ... This data element includes the OpenURL 0.1 definition of "pages".
  -->{{#if: {{{series|}}}    | &rft.series={{urlencode:{{{series}}}}}    }}<!-- The title of a series in which the book or document was issued. There may also be an ISSN associated with the series.
  -->{{#if: {{{isbn|}}}      | &rft.isbn={{{isbn}}}                      }}<!-- International Standard Book Number (ISBN) ... i.e. "057117678X" but it may contain hyphens, e.g. "1-878067-73-7"
  -->{{#if: {{{oclc|}}}      | &rft_id=info:oclcnum/{{{oclc}}}           }}<!-- 
  -->{{#if: {{{doi|}}}       | &rft_id=info:doi/{{urlencode:{{{doi}}}}}  }}<!-- 
  -->{{#if: {{{url|}}}       | &rft_id={{urlencode:{{{url}}}}}           }}<!-- 
  -->"> </span></includeonly>