1 of 2
1
Yearly Archives plugin
Posted: 03 March 2006 09:39 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  298
Joined  10-18-2004

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.

 Signature 

Low: the Pro Network member who brought you Low Variables, Low Reorder, Low NoSpam, Low Seg2Cat and many more...

Profile
 
 
Posted: 03 March 2006 03:18 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  560
Joined  05-15-2004

Is it possible to get it to entirely skip years without any entries? smile

 Signature 


:: Westeros :: Hippoi Athanatoi ::

Blackadder: “Baldrick, have you no idea what irony is?”   
Baldrick: “Yeah! It’s like goldy and bronzy, only it’s made of iron.”
Blackadder III, Amy and Amiability

Profile
 
 
Posted: 03 March 2006 04:08 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  298
Joined  10-18-2004

Now it is. smile

 Signature 

Low: the Pro Network member who brought you Low Variables, Low Reorder, Low NoSpam, Low Seg2Cat and many more...

Profile
 
 
Posted: 03 March 2006 04:16 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  560
Joined  05-15-2004

Thank you smile

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

 Signature 


:: Westeros :: Hippoi Athanatoi ::

Blackadder: “Baldrick, have you no idea what irony is?”   
Baldrick: “Yeah! It’s like goldy and bronzy, only it’s made of iron.”
Blackadder III, Amy and Amiability

Profile
 
 
Posted: 03 March 2006 04:19 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  298
Joined  10-18-2004

Ack! My fault for wanting to implement things too quickly. Hang on a sec…

 Signature 

Low: the Pro Network member who brought you Low Variables, Low Reorder, Low NoSpam, Low Seg2Cat and many more...

Profile
 
 
Posted: 03 March 2006 04:28 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  298
Joined  10-18-2004

Couldn’t reproduce the Notices, but it should be fixed now, methinks.

 Signature 

Low: the Pro Network member who brought you Low Variables, Low Reorder, Low NoSpam, Low Seg2Cat and many more...

Profile
 
 
Posted: 03 March 2006 04:30 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  560
Joined  05-15-2004

Yup, looks fixed. smile

Thank you so much for the quick addition & fix.

 Signature 


:: Westeros :: Hippoi Athanatoi ::

Blackadder: “Baldrick, have you no idea what irony is?”   
Baldrick: “Yeah! It’s like goldy and bronzy, only it’s made of iron.”
Blackadder III, Amy and Amiability

Profile
 
 
Posted: 16 June 2006 11:04 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1758
Joined  05-17-2002

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="
{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
 Signature 
Profile
MSG
 
 
Posted: 17 June 2006 04:05 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  298
Joined  10-18-2004

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?

 Signature 

Low: the Pro Network member who brought you Low Variables, Low Reorder, Low NoSpam, Low Seg2Cat and many more...

Profile
 
 
Posted: 17 June 2006 10:02 AM   [ Ignore ]   [ # 9 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30388
Joined  04-29-2002

I’m using 1.1 version of the plugin.. with modified CSS from Chris’ CSS.

Yearly Archives Test

Profile
MSG
 
 
Posted: 17 June 2006 10:28 AM   [ Ignore ]   [ # 10 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1758
Joined  05-17-2002
Lodewijk - 17 June 2006 08:05 AM

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.

 Signature 
Profile
MSG
 
 
Posted: 17 June 2006 10:31 AM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1758
Joined  05-17-2002

Lodewijk, I’d be happy to give you temp super-admin access to my site if that helps.

 Signature 
Profile
MSG
 
 
Posted: 17 June 2006 12:00 PM   [ Ignore ]   [ # 12 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30388
Joined  04-29-2002

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

Testing again

Profile
MSG
 
 
Posted: 17 June 2006 12:48 PM   [ Ignore ]   [ # 13 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1758
Joined  05-17-2002

Well, not sure what’s up. I upgraded to the latest build and same issue. I tried specifying different weblogs as well but no dice.

 Signature 
Profile
MSG
 
 
Posted: 17 June 2006 01:08 PM   [ Ignore ]   [ # 14 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30388
Joined  04-29-2002

It’s just you. smile Seriously, I’m using the same code you are in a standalone template.

Yearly Archives Wiki Entry

Profile
MSG
 
 
Posted: 17 June 2006 01:50 PM   [ Ignore ]   [ # 15 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1758
Joined  05-17-2002

lol… well, yeah, I figured its just me. Sue, can you do me a favor and turn your site off and check the plugin? Maybe this issue is coming up because the site is switched off. I’m not sure why that would make a difference but I’m curious.

 Signature 
Profile
MSG
 
 
Posted: 17 June 2006 03:53 PM   [ Ignore ]   [ # 16 ]  
Chancellor's Fellow
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30388
Joined  04-29-2002

Checked with it off - no difference on my end.

Profile
MSG
 
 
Posted: 17 June 2006 03:57 PM   [ Ignore ]   [ # 17 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  298
Joined  10-18-2004

Leslie, how many entries do you have, or should be showing up there? You can PM me with login data if you wish. I think I might be able to check it out tomorrow (when it’s daytime in the Netherlands… ^_^).

 Signature 

Low: the Pro Network member who brought you Low Variables, Low Reorder, Low NoSpam, Low Seg2Cat and many more...

Profile
 
 
Posted: 17 June 2006 05:45 PM   [ Ignore ]   [ # 18 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  1758
Joined  05-17-2002

I lodewijk, I’ll probably PM you the login stuff. Though at the moment I’m pulling my hair out tracking down strange IE 6 bugs so I’m in my rush to get this figured out. I hate, and I don’t use that word often, IE with a passion that surprises myself.

I’ve got just over 600 entries going back over 3 years. So that puts me more than most people, but not up on the power blogger level like say, Ruzin. lol. Thanks for the help guys, I appreciate it.

 Signature 
Profile
MSG
 
 
   
1 of 2
1