How to edit wikipedia citation templates style?

Hi everyone, newbie wikipedian here.

I recently found out about your project and is very impressed, because before I have used self-made bookmarklet. Your project saves me a lot of time by extracting metadata for most of the pages.

Default template "{{Cite web| title = Zotero Forums - Start a new discussion| accessdate = 2016-05-28| url = https://forums.zotero.org/post/category/11/}}" is great, but I also want it to add <ref></ref> tags around template, and also automatically replace | with {{!}}, because vertical bar adds unwanted split in template arguments.

I have read https://www.zotero.org/support/dev/citation_styles/style_editing_step-by-step and https://github.com/citation-style-language/csl-editor/wiki/User-guide-for-the-CSL-Editor, but for me hardest thing is to find out where file with citation style is located, to edit it directly or to create copy. I'm using firefox extension on Ubuntu.
  • The wikipedia citation template isn't a citation style, but an export translator
    https://www.zotero.org/support/dev/translators/coding#export_translators

    I think adding ref tags might make sense. Could you explain your 2nd proposed change? Do you mean "escaping" pipes (|) in titles when exporting them as a template or not using the pipes in the template to separate fields?

    You could also look at using the ref toolbar 2.0 or the cite function built into WP's new visual editor, both of which rely on Zotero technolgy in the back (i.e. when adding a citation via URL bar). Several of us are working with wikimedia folks to further improve these, but they're pretty great already.
  • Oh, I heard something about that visual editor. But I'm already get used to working in wikimarkup editor.

    Yes, excaping pipes. Because pipe there means "next parameter" and it often is present in titles of websites, so it breaks formatting.

    And that wikipedia templates is citations, is great relief, because I know JavaScript a little bit better than CSL. So, this is code I want: https://github.com/zotero/translators/blob/master/Wikipedia%20Citation%20Templates.js, yes?

    I located that file on my computer, at "~/.mozilla/firefox/ej9vbwqo.default/zotero/translators/Wikipedia Citation Templates.js". I'll try my changes there.

    Should I make a pull request when I'll be happy with results?
  • yes, I think we'd take a PR when you're ready, thanks!
Sign In or Register to comment.