<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.peacocktech.com/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.peacocktech.com/index.php?action=history&amp;feed=atom&amp;title=BibliographicExtension%2Fbibliographyformat.php</id>
		<title>BibliographicExtension/bibliographyformat.php - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.peacocktech.com/index.php?action=history&amp;feed=atom&amp;title=BibliographicExtension%2Fbibliographyformat.php"/>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;action=history"/>
		<updated>2026-05-18T15:36:38Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.7.1</generator>

	<entry>
		<id>http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4317&amp;oldid=prev</id>
		<title>137.166.127.86 at 15:24, 16 October 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4317&amp;oldid=prev"/>
				<updated>2006-10-16T15:24:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;amp;diff=4317&amp;amp;oldid=4314&quot;&gt;(Difference between revisions)&lt;/a&gt;</summary>
		<author><name>137.166.127.86</name></author>	</entry>

	<entry>
		<id>http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4314&amp;oldid=prev</id>
		<title>137.166.127.86 at 15:17, 16 October 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4314&amp;oldid=prev"/>
				<updated>2006-10-16T15:17:33Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;amp;diff=4314&amp;amp;oldid=4139&quot;&gt;(Difference between revisions)&lt;/a&gt;</summary>
		<author><name>137.166.127.86</name></author>	</entry>

	<entry>
		<id>http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4139&amp;oldid=prev</id>
		<title>Trevorp at 05:04, 27 August 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4139&amp;oldid=prev"/>
				<updated>2006-08-27T05:04:38Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 05:04, 27 August 2006&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 114:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 114:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    if(key_exists('year', $this-&amp;gt;mFields))&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    if(key_exists('year', $this-&amp;gt;mFields))&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;      return $this-&amp;gt;mFields['year'];&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;      return $this-&amp;gt;mFields['year'];&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    if(key_exists('date', $this-&amp;gt;mFields))&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      $date=split('/', $this-&amp;gt;mFields['date']);&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      return date('Y', strtotime('1/1/'.$date[0]));&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return '?';&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return '?';&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;/tr&gt;

			&lt;/table&gt;
		</summary>
		<author><name>Trevorp</name></author>	</entry>

	<entry>
		<id>http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4135&amp;oldid=prev</id>
		<title>Trevorp at 04:32, 27 August 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4135&amp;oldid=prev"/>
				<updated>2006-08-27T04:32:41Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 04:32, 27 August 2006&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 18:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 18:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    foreach($names as $key=&amp;gt;$item)&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    foreach($names as $key=&amp;gt;$item)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    {&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;      &lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;preg_match&lt;/span&gt;(&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;'/(.*&lt;/span&gt;)&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;\s+&lt;/span&gt;(&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;.*)/&lt;/span&gt;', &lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;trim(&lt;/span&gt;$item)&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;, &lt;/span&gt;$&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;match&lt;/span&gt;);&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      &lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;$item=trim&lt;/span&gt;(&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;$item&lt;/span&gt;)&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      $name=split&lt;/span&gt;(&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;' &lt;/span&gt;', $item)&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      &lt;/span&gt;$&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;lastname=array_pop($name);&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      $givennames=BibliographyFormat::makeList($name, ' ', ' '&lt;/span&gt;);&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;      $initials=array();&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;      $initials=array();&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;      $name&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;=array(&lt;/span&gt;)&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      &lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;if(count(&lt;/span&gt;$name)&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;&amp;gt;0)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      &lt;/span&gt;foreach(split(' ', $&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;match[1]&lt;/span&gt;) as $initial)&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;        &lt;/span&gt;foreach(split('&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;[ -]&lt;/span&gt;', $&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;givennames&lt;/span&gt;) as $initial)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      &lt;/span&gt;{&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;        &lt;/span&gt;{&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;        &lt;/span&gt;$initials[]=$initial[&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;0&lt;/span&gt;];&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;          if($initial==strtoupper($initial))&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;        &lt;/span&gt;$&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;name&lt;/span&gt;[]=$initial;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;            for($letter=0; $letter&amp;lt;strlen($initials); $letter++)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      &lt;/span&gt;}&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;              &lt;/span&gt;$initials[]=$initial[&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;$letter&lt;/span&gt;];&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;      $names[$key]=array($&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;match[1]&lt;/span&gt;, $&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;match[2]&lt;/span&gt;, $initials, $name);&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;          else&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;            &lt;/span&gt;$&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;initials&lt;/span&gt;[]=$initial&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;[0]&lt;/span&gt;;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;        &lt;/span&gt;}&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      $names[$key]=array($&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;givennames&lt;/span&gt;, $&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;lastname&lt;/span&gt;, $initials, $name);&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    }&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return $names;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return $names;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 106:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 112:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  function year()&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  function year()&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;    return $this-&amp;gt;mFields['year'];&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    &lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;if(key_exists('year', $this-&amp;gt;mFields))&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;      &lt;/span&gt;return $this-&amp;gt;mFields['year']&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;    return '?'&lt;/span&gt;;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

			&lt;/table&gt;
		</summary>
		<author><name>Trevorp</name></author>	</entry>

	<entry>
		<id>http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4127&amp;oldid=prev</id>
		<title>Trevorp at 03:40, 26 August 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4127&amp;oldid=prev"/>
				<updated>2006-08-26T03:40:48Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 03:40, 26 August 2006&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 117:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 117:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return $this-&amp;gt;mFields['type'];&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return $this-&amp;gt;mFields['type'];&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  function field($name)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    if(!key_exists($name, $this-&amp;gt;mFields))&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      return NULL;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    return $this-&amp;gt;mFields[$name];&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 122:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 129:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return $this-&amp;gt;mFields['reference'];&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    return $this-&amp;gt;mFields['reference'];&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  function formatCount($num)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    if(!is_numeric($num))&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      return $num;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    if($num&amp;gt;3 &amp;amp;&amp;amp; $num&amp;lt;21)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      return $num.'th';&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    switch($num % 10)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    {&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      case 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;        return $num.'st';&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      case 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;        return $num.'nd';&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;      case 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;        return $num.'rd';&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    return $num.'th';&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;  }&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

			&lt;/table&gt;
		</summary>
		<author><name>Trevorp</name></author>	</entry>

	<entry>
		<id>http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4125&amp;oldid=prev</id>
		<title>Trevorp at 10:53, 25 August 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.peacocktech.com/index.php?title=BibliographicExtension/bibliographyformat.php&amp;diff=4125&amp;oldid=prev"/>
				<updated>2006-08-25T10:53:49Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class BibliographicPageParser {&lt;br /&gt;
&lt;br /&gt;
  static function parse($wikiText)&lt;br /&gt;
  {&lt;br /&gt;
    preg_match('/\{\{.*?\/(.*?)(\|.*)\}\}/ms', $wikiText, $match);&lt;br /&gt;
    $fields=array('type'=&amp;gt;$match[1]);&lt;br /&gt;
    preg_match_all('/\|(.*?)=(.*?)(\||$)/ms', $match[2], $match);&lt;br /&gt;
    foreach($match[1] as $key =&amp;gt; $value)&lt;br /&gt;
      $fields[$value]=$match[2][$key];&lt;br /&gt;
    return $fields;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  static function names($names)&lt;br /&gt;
  {&lt;br /&gt;
    $names=split(',', $names);&lt;br /&gt;
    foreach($names as $key=&amp;gt;$item)&lt;br /&gt;
    {&lt;br /&gt;
      preg_match('/(.*)\s+(.*)/', trim($item), $match);&lt;br /&gt;
      $initials=array();&lt;br /&gt;
      $name=array();&lt;br /&gt;
      foreach(split(' ', $match[1]) as $initial)&lt;br /&gt;
      {&lt;br /&gt;
        $initials[]=$initial[0];&lt;br /&gt;
        $name[]=$initial;&lt;br /&gt;
      }&lt;br /&gt;
      $names[$key]=array($match[1], $match[2], $initials, $name);&lt;br /&gt;
    }&lt;br /&gt;
    return $names;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class BibliographyFormat {&lt;br /&gt;
&lt;br /&gt;
  var $mFields=array();&lt;br /&gt;
  static $styleClass = '';&lt;br /&gt;
&lt;br /&gt;
  static function renderWikiText($input)&lt;br /&gt;
  {&lt;br /&gt;
    global $wgOut;&lt;br /&gt;
    return $wgOut-&amp;gt;parse($input, false);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function BibliographyFormat($reference)&lt;br /&gt;
  {&lt;br /&gt;
    $this-&amp;gt;mFields=BibliographicPageParser::parse($this-&amp;gt;getArticleText($reference));&lt;br /&gt;
    $this-&amp;gt;mFields['reference']=$reference;&lt;br /&gt;
    if(BibliographyFormat::$styleClass=='')&lt;br /&gt;
      BibliographyFormat::setStyle('CSUHarvard_Style', 'extensions/bibliographystyle-csu.php');&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
    static function getArticleText($name)&lt;br /&gt;
    {&lt;br /&gt;
      if($name=='')&lt;br /&gt;
        return null;&lt;br /&gt;
      $title=Title::newFromText($name);&lt;br /&gt;
      $title=Revision::newFromTitle( $title );&lt;br /&gt;
      if($title==null)&lt;br /&gt;
        return null;&lt;br /&gt;
      return $title-&amp;gt;getText();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  static function setStyle($style, $file)&lt;br /&gt;
  {&lt;br /&gt;
    require_once($file);&lt;br /&gt;
    BibliographyFormat::$styleClass=$style;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function intext($argv)&lt;br /&gt;
  {&lt;br /&gt;
    return call_user_func(array(BibliographyFormat::$styleClass, 'intext'), $argv, $this);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  static function intextcite($articles)&lt;br /&gt;
  {&lt;br /&gt;
    return call_user_func(array(BibliographyFormat::$styleClass, 'intextcite'), $articles);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function reference($argv)&lt;br /&gt;
  {&lt;br /&gt;
    return call_user_func(array(BibliographyFormat::$styleClass, 'reference'), $this);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  function referenceList($argv)&lt;br /&gt;
  {&lt;br /&gt;
    return call_user_func(array(BibliographyFormat::$styleClass, 'referenceList'), $argv);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  function bibliography($refrenceList)&lt;br /&gt;
  {&lt;br /&gt;
    $bibliography=&amp;quot;bibliography:\n&amp;quot;;&lt;br /&gt;
    foreach ($refrenceList as $item)&lt;br /&gt;
    {&lt;br /&gt;
      $bibliography.=&amp;quot;#&amp;quot;.$item-&amp;gt;reference($str, $argv).&amp;quot;\n&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    return $bibliography;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function names()&lt;br /&gt;
  {&lt;br /&gt;
    return BibliographicPageParser::names($this-&amp;gt;mFields['author']);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function year()&lt;br /&gt;
  {&lt;br /&gt;
    return $this-&amp;gt;mFields['year'];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function title()&lt;br /&gt;
  {&lt;br /&gt;
    return $this-&amp;gt;mFields['name'];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function type()&lt;br /&gt;
  {&lt;br /&gt;
    return $this-&amp;gt;mFields['type'];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function referencename()&lt;br /&gt;
  {&lt;br /&gt;
    return $this-&amp;gt;mFields['reference'];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  static function makeList($items, $delim=', ', $finalDelim=' &amp;amp; ')&lt;br /&gt;
  {&lt;br /&gt;
    $list='';&lt;br /&gt;
    if(count($items)==1)&lt;br /&gt;
      return array_shift($items);&lt;br /&gt;
    foreach($items as $key=&amp;gt;$item)&lt;br /&gt;
      if($key+1==count($items))&lt;br /&gt;
        $list.=$finalDelim.$item;&lt;br /&gt;
      else&lt;br /&gt;
        $list.=$delim.$item;&lt;br /&gt;
    return substr($list, strlen($delim)+0);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Trevorp</name></author>	</entry>

	</feed>