CDC Clean Archives
This is a quick and hasty hacking of the SRG Clean Archives by Shawn Grimes.
I’d been wanting to modify it a bit to allow for collapsing each month to require less scrolling. Currently in this version aside from the months collapsing using the fx.Accordion effect in the Moo.fx libraries it’s precisely the same as Shawn Grimes published plugin.
You can see it in action on my archives page.
How do I use it?
Upload the cdc_clean_archives.php to your wp-content/plugins/ folder and activate it through your wordpress admin panel.
The Month/Year format is surrounded by “h5†tags. If you would like to change this, just open up the cdc_clean_archives.php file and look for this line of code:
echo get_archives_link(‘#’, $text, ”,’
‘,’
‘,”);
There you can change the current tags to whatever you would like to use. Such as a h2, h3, etc. and re-save the file. Just be sure not to delete the quote marks or the class name (that’s what allows the accordion effect).
The list of of articles can be styled in your css by setting up a .postspermonth class.
Here is an example:
.postspermonth {
margin: 5px 0 10px 0;
list-style: none;
padding-left: 25px;
}
The output from this plug-in is already wrapped in the needed “ul†tags. All you need to do is customize the class to your taste.
To call the plug-in all you need to do is insert the following string of code where you want the archives to be displayed, ie your sidebar or on a separate archive page:
cdc_clean_archives()
Then add this to the head of your archive page:
Version .60:
Integrated the moo.fx javascripts into the function simplifying the installation of the plugin.
And that is all. Enjoy!
To see a working example of this plug-in please visit http://www.cdcstudios.com/archive.php
Credits:
==============================================
Shawn Grimes (http://hexfactor.com)
Sebastian Schmieg (http://www.kingcosmonaut.de)
Chris J. Davis (http://www.chrisjdavis.org)
Skippy (http://skippy.net/)
Jan (http://www.foundandlost.nl/)
Development has stopped on this plugin. I’d highly recommend this version instead:
http://www.viper007bond.com/wordpress-plugins/clean-archives-reloaded/
It uses a much better caching system than mine.













May 12th, 2006 at 3:39 am
Thanks for the nice Clean AJAX Archives!
May 12th, 2006 at 2:39 am
Thanks for the nice Clean AJAX Archives!
May 21st, 2006 at 3:49 pm
The only thing that I think should be fixed is that when you have the page scrolled down and you click to have something expand, it automatically goes back to the top of the page and then you are forced to scroll back down. Is there a way to prevent that?
Thank you,
Kahil
May 21st, 2006 at 2:49 pm
The only thing that I think should be fixed is that when you have the page scrolled down and you click to have something expand, it automatically goes back to the top of the page and then you are forced to scroll back down. Is there a way to prevent that?
Thank you,
Kahil
May 22nd, 2006 at 12:40 pm
Great plugin – I will go to use it soon.
Waiting and hoping for the next upgrades :)
Tal.
May 22nd, 2006 at 11:40 am
Great plugin – I will go to use it soon.
Waiting and hoping for the next upgrades :)
Tal.
May 28th, 2006 at 1:17 pm
I have followed your instructions (installed the plugin, placed php call on the archive page, uploaded scripts and linked them in my header). The archive list shows up but without the accordian effect. All I know is that there are a couple of undefined classes:
moo.fx.js line 57
moo.fx.pack.js line 10
.. though I doubt that that actually makes any difference.
I had been using Hicksdesign style archives but was fed up with the scrolling too.
Any ideas? Known bugs?
Looks great on your site.
May 28th, 2006 at 12:17 pm
I have followed your instructions (installed the plugin, placed php call on the archive page, uploaded scripts and linked them in my header). The archive list shows up but without the accordian effect. All I know is that there are a couple of undefined classes:
moo.fx.js line 57
moo.fx.pack.js line 10
.. though I doubt that that actually makes any difference.
I had been using Hicksdesign style archives but was fed up with the scrolling too.
Any ideas? Known bugs?
Looks great on your site.
May 28th, 2006 at 9:10 pm
I’m having the same issue as Matt, above, after having followed the same steps. Just chiming in so I’ll remember to come back and look for an update!
May 28th, 2006 at 8:10 pm
I’m having the same issue as Matt, above, after having followed the same steps. Just chiming in so I’ll remember to come back and look for an update!
May 30th, 2006 at 10:27 pm
Are you using the archives on a page or on a standalone “archives.php” style page? I have had infrequent issues with people using pages generated by wordpress. I’ll be releasing an update with a few new bug fixes that’ll fix issues with IE 7 as well as really trying to nail down the pages issue (I still haven’t encountered it here or on my test blog).
If you can turn the plugin on and then let me take a look at it I’ll try and resolve the issue for you.
May 30th, 2006 at 9:27 pm
Are you using the archives on a page or on a standalone “archives.php” style page? I have had infrequent issues with people using pages generated by wordpress. I’ll be releasing an update with a few new bug fixes that’ll fix issues with IE 7 as well as really trying to nail down the pages issue (I still haven’t encountered it here or on my test blog).
If you can turn the plugin on and then let me take a look at it I’ll try and resolve the issue for you.
June 24th, 2006 at 10:33 pm
Hi Chris, your plugin looks pretty impressive, but I’m a newbie so I really have no clue with the instruction. Where exactly do I have to put the javascript? In the archive.php of my theme? And do I have to put the javascripts in the js folder of my theme?
I tried these already and activate the plugin but doesn’t work so far.
Sorry for these stupid questions, I appreciate your help.
Alex
June 24th, 2006 at 9:33 pm
Hi Chris, your plugin looks pretty impressive, but I’m a newbie so I really have no clue with the instruction. Where exactly do I have to put the javascript? In the archive.php of my theme? And do I have to put the javascripts in the js folder of my theme?
I tried these already and activate the plugin but doesn’t work so far.
Sorry for these stupid questions, I appreciate your help.
Alex
June 27th, 2006 at 3:36 pm
All you need to do is add the following to a new page (outside of wordpress) named archive.php : cdc_clean_archives()
IF that doesn’t work let me know and I’ll email you for more information.
June 27th, 2006 at 2:36 pm
All you need to do is add the following to a new page (outside of wordpress) named archive.php : cdc_clean_archives()
IF that doesn’t work let me know and I’ll email you for more information.
June 28th, 2006 at 2:08 pm
Thanks Chris for your answer, but it doesn’t work, as a test I put the scripts in a “scripts” folder and created an archive.php file. Still not working.
http://www.derfrison.com/archive.php
I really appreciate your help
Alex
June 28th, 2006 at 2:30 pm
Try making a copy of your themes page template and then renaming it archive.php and then put the required tag into the middle where the post portion should go.
That should fix the issue. Send me an email via my contact page if you’d like me to do it for you. I’m currently trying to find a way around the wordpress not allowing php to be run in a post without requiring yet another plugin.
June 28th, 2006 at 1:08 pm
Thanks Chris for your answer, but it doesn’t work, as a test I put the scripts in a “scripts” folder and created an archive.php file. Still not working.
http://www.derfrison.com/archive.php
I really appreciate your help
Alex
June 28th, 2006 at 1:30 pm
Try making a copy of your themes page template and then renaming it archive.php and then put the required tag into the middle where the post portion should go.
That should fix the issue. Send me an email via my contact page if you’d like me to do it for you. I’m currently trying to find a way around the wordpress not allowing php to be run in a post without requiring yet another plugin.
July 10th, 2006 at 2:16 pm
Hello Chris,
I’m having the same issue as Alex, but I managed to make the correct changes (at least I think I had). Nothing appears :(
And I’m sure the “cdc_clean_archives.php” file is being loaded, because if you take a look at the source code of my archives page it shows the three js. calls:
http://blog.ipbrasil.com/arquivos/
Any ideas?
I really would love to have your plugin working in my blog.
Thanks,
Juliano.
July 10th, 2006 at 1:16 pm
Hello Chris,
I’m having the same issue as Alex, but I managed to make the correct changes (at least I think I had). Nothing appears :(
And I’m sure the “cdc_clean_archives.php” file is being loaded, because if you take a look at the source code of my archives page it shows the three js. calls:
http://blog.ipbrasil.com/arquivos/
Any ideas?
I really would love to have your plugin working in my blog.
Thanks,
Juliano.
July 10th, 2006 at 7:13 pm
Here’s the easiest solution I can give you.
Go to your wp-content/templates/<template you=”you” use=”use”>
and copy the index.php file. Rename the copy to archive.php then delete the entire “post” div and replace it with this:
<div id="archive"><h1>< ?php _e(‘Archives:’); ?></h1>
Click any of the months below to see a list of the all posts from that month.
< ?php cdc_clean_archives() ?>
</div>
Save that archive.php file in your root directory (http://yourdomain.com/archive.php)
That should fix the issues perfectly.
Let me know if there is anything else.</template>
July 10th, 2006 at 6:13 pm
Here’s the easiest solution I can give you.
Go to your wp-content/templates/
and copy the index.php file. Rename the copy to archive.php then delete the entire “post” div and replace it with this:
<div id="archive"><h1>< ?php _e(‘Archives:’); ?></h1>
<p>Click any of the months below to see a list of the all posts from that month.</p>
< ?php cdc_clean_archives() ?>
</div>
Save that archive.php file in your root directory (http://yourdomain.com/archive.php)
That should fix the issues perfectly.
Let me know if there is anything else.
July 11th, 2006 at 5:20 am
Hmm, I don’t have a “wp-content/templates/”, but a “wp-content/themes/” folder, and there isn’t an index.php file in there…
I noticed that the theme I’m using is a litle different from the default and classic themes, and maybe that’s the problem. What I made was to take the index.php file from another theme, remove the “post” div and add the code you gave me, but that didn’t work too.
The odd thing is that I tried the srg_clean_archives before testing yours and it didn’t work too… :(
If I send access data to you (FTP and admin panel), would you take a look at this for me, please? I’m not in a hurry at all.
I appreciate your help :)
July 11th, 2006 at 4:20 am
Hmm, I don’t have a “wp-content/templates/”, but a “wp-content/themes/” folder, and there isn’t an index.php file in there…
I noticed that the theme I’m using is a litle different from the default and classic themes, and maybe that’s the problem. What I made was to take the index.php file from another theme, remove the “post” div and add the code you gave me, but that didn’t work too.
The odd thing is that I tried the srg_clean_archives before testing yours and it didn’t work too… :(
If I send access data to you (FTP and admin panel), would you take a look at this for me, please? I’m not in a hurry at all.
I appreciate your help :)
July 11th, 2006 at 11:39 am
That’d be fine Juliano. I’d be happy to take a look at it.
July 11th, 2006 at 10:39 am
That’d be fine Juliano. I’d be happy to take a look at it.
July 12th, 2006 at 7:47 pm
[...] To do so, I created a plugin (which may end up on the projects page if anyone express interest in having it) based on Chris O’Rourke’s CDC Clean Archives plugin (which is based on Shawn Grimes’ Clean Archives plugin. [...]
July 21st, 2006 at 10:05 am
hello, its not working to me either… is the plugins already fix?
July 21st, 2006 at 9:05 am
hello, its not working to me either… is the plugins already fix?
July 29th, 2006 at 9:51 pm
Since Viper’s done a much better version of this, I’m going to end development of it for now. It might end up integrated into the next big moodash release but likely it is done for good.
July 29th, 2006 at 8:51 pm
Since Viper’s done a much better version of this, I’m going to end development of it for now. It might end up integrated into the next big moodash release but likely it is done for good.
August 19th, 2006 at 12:11 pm
hello,
i would like to integrate this great plugin in my theme – it’s full of moo.fx!
everything works fine, but there are no effects!
the reason might be that i’m using the lite version of prototype. please have a look at http://web2.vs242109.vserver.de/index.php/archiv (my test blog) and i hope you can tell me how to have the same effect with prototye.lite :)
August 19th, 2006 at 11:11 am
hello,
i would like to integrate this great plugin in my theme – it’s full of moo.fx!
everything works fine, but there are no effects!
the reason might be that i’m using the lite version of prototype. please have a look at http://web2.vs242109.vserver.de/index.php/archiv (my test blog) and i hope you can tell me how to have the same effect with prototye.lite :)
August 20th, 2006 at 10:05 am
ok, i ve solved my problem. “indow.onload” does not work. ;)
August 20th, 2006 at 9:05 am
ok, i ve solved my problem. “indow.onload” does not work. ;)
September 29th, 2006 at 3:14 am
hi
i could exclude a category from the archive?
how to?
thnx
September 29th, 2006 at 2:14 am
hi
i could exclude a category from the archive?
how to?
thnx
October 6th, 2006 at 1:12 am
I’m not sure how you’d do that actually.
October 6th, 2006 at 12:12 am
I’m not sure how you’d do that actually.
April 3rd, 2007 at 9:53 pm
[...] CDC CLean Archives: Great archive generating plugin, with neat effects. [...]
April 5th, 2007 at 8:32 pm
[...] CDC CLean Archives: Great archive generating plugin, with neat effects. [...]