With this plugin you can easily set up yearly archives. You could consider it an alternative to the Archive Month Links Tag or the existing workarounds. Tested with EE version 1.4.1 build 20060217.
Download the plugin from my site. The docs are there, too.
Thank you 😊
There may be a little bug with this, though. It works, but before it loads the proper page, it loads this for a while:
Notice: Undefined index: 1990 in /home2/sites/westeros.org/www/html/Scripts/ExpressionEngine/system/plugins/pi.yearly_archives.php on line 90
Notice: Undefined index: 1996 in /home2/sites/westeros.org/www/html/Scripts/ExpressionEngine/system/plugins/pi.yearly_archives.php on line 90
Notice: Undefined index: 1997 in /home2/sites/westeros.org/www/html/Scripts/ExpressionEngine/system/plugins/pi.yearly_archives.php on line 90
etc for each year
Can anybody confirm that this works with 1.4.2? It appears to be messing up the years, which chokes the entry count. And yes, weblog1 is the correct weblog shortname. lol. Thanks.
For example, this code:
<ul class="yearly_archives">
{exp:yearly_archives weblog="weblog1" start_month="1" status="not closed”
sort="desc"}
<li>
{if leap_year == 1}<em>{year}</em>{if:else}{year}{/if}
<ul>{months}
<li>
{if num_entries > 0}
<a href="http://{path=blog/archive}{year}/{month_num}/" title="{num_entries} entries in {month} {year}">{month_short}</a>
{if:else}
{month_short}
{/if}
</li>{/months}
</ul>
</li>
{/exp:yearly_archives}
</ul>
returns:
<li>
2
<ul>
<li>
<a href="http://example.com/index.php/home/archives/2/01/" title="0 entries in January 2">Jan</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/02/" title="0 entries in February 2">Feb</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/03/" title="0 entries in March 2">Mar</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/04/" title="0 entries in April 2">Apr</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/05/" title="0 entries in May 2">May</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/06/" title="0 entries in June 2">Jun</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/07/" title="0 entries in July 2">Jul</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/08/" title="0 entries in August 2">Aug</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/09/" title="0 entries in September 2">Sep</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/10/" title="0 entries in October 2">Oct</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/11/" title="0 entries in November 2">Nov</a>
</li>
<li>
<a href="http://example.com/index.php/home/archives/2/12/" title="0 entries in December 2">Dec</a>
</li>
</ul>
</li>
</ul>
Strange. My archives work just fine and I use practically the same code. Are you using the plugin inside some other tag, perhaps? Additional questions: what version of the plugin are you using (1.0 or 1.1)? What version of php are you running?
I’m using 1.1 version of the plugin.. with modified CSS from Chris’ CSS.
Strange. My archives work just fine and I use practically the same code. Are you using the plugin inside some other tag, perhaps? Additional questions: what version of the plugin are you using (1.0 or 1.1)? What version of php are you running?
I’m using the Yearly Archives 1.1 plugin, EE 1.4.2 build 20060530, php 4.3.2 on pM Hosting. The tag is on a page by itself, no other tags present.
I don’t have a URL to show you because at the moment my whole site is offline (in the middle of a big overhaul). Its Ruzin site that inspired trying this out.
I’ve tried removing the conditionals and stripping everything out (including all the html) except the basic year and month stuff, but same issue. It looks like the year is being messed up.
Are you guys on EE 1.4.2? Kinda sounds like it.
Are you guys on EE 1.4.2? Kinda sounds like it.
Yup. Build 20060612
PHP Version 4.4.2 - The vendor upgraded earlier.
On another site with 4.3.11
It’s just you. 😊 Seriously, I’m using the same code you are in a standalone template.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.