Extended Live Archives for WordPress 2.3

As tagging function is included in coming WordPress 2.3, the database schema is changed accordingly. The following tables become obsolete.

  • wp_categories
  • wp_link2cat
  • wp_post2cat

And the following tables are added.

  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy

This schema change make some plugins failed to run and Extended Live Archives (ELA) is one of them.

I've modified ELA to accommodate the new database schema of WordPress 2.3, that's the one running on this blog now. Four files have been changed, i.e.

  1. af-extended-live-archive.php
  2. af-extended-live-archive-include.php
  3. af-extended-live-archive-option.php
  4. includes/af-ela.php

You can grab them here (Downloaded 4992 times). Please backup the above three files before overwrite them.

2007-07-07 - Sorry guys, I have catered the changes of category structure only, tag is still using the one with Ultimate Tag Warrior but not WordPress 2.3. Stay tune for the new patch.
2007-07-10 - Patch 1.1 - added tag color / size options, get rid of UTW and use tag of WordPress 2.3 completely.


下個版本 WordPress 2.3 新增了 tagging 功能,database schema 亦作出相應的改動,以下 3 個 tables 將會刪除。

  • wp_categories
  • wp_link2cat
  • wp_post2cat

取而代之是這 3 個 tables。

  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy

根據新的 database schema,我對 ELA 作出了相應的改動,我修改了以下 4 個 files。

  1. af-extended-live-archive.php
  2. af-extended-live-archive-include.php
  3. af-extended-live-archive-option.php
  4. includes/af-ela.php

大家可在這裡下載(已下載 4992 次),記著將以上 3 files 備份才將之覆蓋。

2007-07-07 - 真的不好意思,我只針對了 category structure 的改變,tag 依舊使用 Ultimate Tag Warrior 而非 WordPress 2.3 的,遲些會推出更新版本。
2007-07-10 - Patch 1.1 - 新增 tag color / size 選項,完全脫離 UTW 和轉用 WordPress 2.3 內置的 tag。

68 Responses to “Extended Live Archives for WordPress 2.3”

  1. 3156

    MT ping DH也是瞬間成功啊。。可憐的中國大陸

  2. 3296

    Hi I am thinking of using ela and this patch will certainly help, but I am using WordPress 2.2 now, can I simply use the patched ela? Will it affect my db tables or any sort?

  3. 3297

    @Darran:這個 patch 只適用於 WordPress 2.3,若果是用 WP 2.2 的話,可以用這篇文章內的 patch。

  4. 3451


    Thanks for the help, I guess I shall wait for the release of WordPress 2.3 next month before installing ELA again. :)

  5. 6535

    Your patch works properly with the new WP 2.3

    Thanks so much ;-)

  6. 6650

    The plugin works great! I seem to get an error message relating to ELA when I try to delete drafts. No big deal though, thanks for the patch!

  7. 6699


    I had downloaded ELA from the above given link, but it does not show anything on the Arhive page.


  8. 6933

    Is there a reason ELA is only showing my main level categories and not the sub-levels? Is that supposed to happen or is that a bug? I'd like to see all categories, not just root categories.

  9. 7157

    @DG, is there any cache files generated in the cache folder?

  10. 7158

    @Brad, I haven't use sub categories before and don't know if it's the intended design of ELA.

  11. 7211


    No, I've de-activated, re-copied even though it's not functioning. All that I'm getting is .JS and .CSS injects in header.

    But on the Page nothing appears.

    Could you diagnose, what could be the problem?

    Waiting for your reply.


  12. 7266

    @DG, I would like to know some additional information.

    1. Have you tried ELA before? I mean in WP 2.2.x or below version. If so, is it working properly until you upgraded to WP 2.3?

    2. Is cache folder resided in wp-content/plugins/af-extended-live-archives/ and writable for everyone?

    3. Though this question is quite odd, is your page called the function af_ela_super_archive()?

  13. 7325


    First of, Thanks for the prompt reply, I've been checking your site regularly for the solution. Here's my input under each of your questions:

    1. Have you tried ELA before? I mean in WP 2.2.x or below version. If so, is it working properly until you upgraded to WP 2.3?

    DG: Yes, I was using ELA upto 2.2.3, and it was working properly. I'm currently updating my template for WordPress 2.3, it's on my test machine. After upgrading ELA stopped working.

    On Google Search, I came to know about your ELA Patch. Which I've download.

    2. Is cache folder resided in wp-content/plugins/af-extended-live-archives/ and writable for everyone?

    DG: Yes, the "Cache" folder is in the above said directory. I've not made any changes.

    Here's some additional input about "Cache". Yesterday, I had removed everything for the Cache folder, as it was carrying previous Cache's of WordPress 2.2.3 ELA version.

    And after running, my Archive page, I found newly generated Cache.

    But eventhough, the Archive page doesn't show anything and remain blank.

    3. Though this question is quite odd, is your page called the function af_ela_super_archive()?

    DG: Yes, I've af_ela_super_archive() in my Archive template.

    Desperately seeking your help/input to run ELA, as I want to turn on WordPress 2.3 on my live site ASAP.


  14. 7373

    我突然發現我的archives頁面裡面的Extended Live Archives區塊是一片空白,但是會生成cache檔案,只是無法load進來!!

  15. 7428

    @DG, it's weird and I can't figure out why this problem happened. I've a vanilla install of WP 2.3 in my testing environment using this patch, everything works. I don't know if there is any conflict between your existing plugins and ELA.

    As you know from googling around, ELA was having some weird problems that can't be explained and some of them can't be resolved. I suggest you can try to use ELA alone to see if it can work. If it work, activate other plugins one by one to check what the conflicting plugin is.

  16. 7430

    @ss:我未遇過這情況,你有否檢查過 ELA 的 .js 和 .css 檔案有否出現在 header 中?

  17. 7482


  18. 7521

    天佑,你個 update 好得!Perfect !

    終於解決了所有 2.3 後所出現的問題 , Thank a lot !

  19. 7956

    I'm having the same problem as DG sadly :(

  20. 8267

    I've actually got this going on when I applied your patches ≤

    WordPress database error: [Table 'wordpress_jb.wp_categories' doesn't exist]
    SELECT COUNT(1) FROM wp_categories

    Category Cloud

    WordPress database error: [Table 'wordpress_jb.wp_categories' doesn't exist]
    SELECT cat_ID, cat_name, category_nicename, category_description, category_parent, category_count FROM wp_categories WHERE cat_ID > 0 AND cat_ID > 1 ORDER BY cat_name asc

    No idea why though; I was under the impression this is what you fixed...

  21. 8283

    @Jeff, your theme is based on K2. The problem you mentioned is not caused by my patch, it caused by K2.

    In the 1st paragraph of your archives page tried to access wp_categories table to show number of categories in your blog. But that table is not existed in WP 2.3 now.

    You can either get the up-to-dated K2 that compatible with WP 2.3 or modify page-archives.php to accommodate the new database schema.

  22. 11118

    I am confused, quiiite confused.

    I am currently running K2, latest release. have WP 2.3.1 installed. In K2 I enable ELA; I assume I must have ELA plugin uploaded and activated? If it is activated or not, nothing on the 'archive' page actually changes. It is just a list of 'browse by month' or 'browse by category' rather than the tab system I have seen elsewhere and even installed on other versions of WP.

    thus, my confusion.

    my archive is only showing up as a list, not dynamic or AJAXy at all. am I missing something in the configuration, or something that needs to be changed in the updated files supplied here?


  23. 11140

    @Nick Normal, K2 has built-in support for ELA but not shipped with ELA. You have to download and install ELA yourself.

    Click "Enable ELA for K2" button in K2 option page just mean to populate custom made configuration setting to ELA that suit the style of K2 only.

  24. 11156

    hi Tinyau guy!

    I tried all of that, promise! I have the plugin activated, and under K2 Options I clicked "Configure Extended Live Archives for K2" but still, it only shows up like this:

    thanks for your reply though!

    like I say, I have installed ELA on other blogs, for other people, but mine is now running 2.3.1, so I thought it is maybe something particular to me? I hope to figure it out though! Thanks for helping!

    cheers, Nick

  25. 11194

    @Nick Normal, you're using K2 latest version. It should be RC3, right?

    I've found that Page template for archives page contained the logic to use ELA only when you're using WP 2.2 or below. To solve your problem, please change line 36 of page-archives.php from

    <?php if (function_exists('af_ela_super_archive') && !($wp_version > 2.2)) { ?>


    <?php if (function_exists('af_ela_super_archive')) { ?>

    Then ELA will be used in your archives page.

  26. 12504

    Thank you so much for the fix :) I was afraid I wouldn't be able to use ELA anymore.

  27. 13807

    Thank you for the fix! I'm writing because I can't get ELA to recognize the tags that I entered through WP (my site is WP 2.3, K2 RC3). The Chronology and Taxonomy results are fine, but it's returning strange results for Folksonomy. Any idea as to what might be happening?

    Thank you again!

  28. 13823

    @Project37, can you explain in details what the problem is?

  29. 13901

    Hi, first of all, let me really, really thank you for the update/patch!
    But in fact, i have to agree: It won´t show sublevels in categories! This is a bit annyoing at least. Never really recognized, how/if the original ELA displayed them. But it would be very nice, if you would find the time to update this version - we´re relying on you! :)

  30. 14064

    Sorry, I should have been more specific!

    Basically, ELA's "Folksonomy" option is only returning posts from the first tag on my list (in my case, the one starting with the letter "b"). As a temporary workaround, I've turned off Folksonomy and am using k2's tag cloud sidebar option. Any ideas as to what might be happening? Thanks again!

  31. 14112

    昨天遇到 phanthomas 提到的問題,子目錄不能顯示,我重新下載這裡的 patch ,似乎尚未修復此問題,我做了一個 patch ,以及描述問題所在,請您看看是否有幫助。


  32. 14348

    天佑, 用了你的 ELA mod, 但 tag tab 出到 link 但沒有字


  33. 14349


    It seems that the plugins is unable to read the font setting in option and thus gives every tag a font size 0 and color 0. Saving a new value in option works.

  34. 14352

    @Jacky - That worked! ***THANK YOU*** :)

  35. 14375

    另外,在 delete draft post 時會有 sql exception:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND tr.term_taxonomy_id > 1 AND p.post_date_gmt  '2007-12-19 07:15:28' ' at line 5]
    SELECT DISTINCT MONTH(p.post_date) AS `month` FROM wp_posts p INNER JOIN wp_term_relationships tr ON (p.ID = tr.object_id ) WHERE YEAR(p.post_date) = AND tr.term_taxonomy_id > 1 AND p.post_date_gmt  '2007-12-19 07:15:28' ORDER By p.post_date DESC

    大概調查過,上一句 sql 問題出自 YEAR(p.post_date) = 沒有了下文。 在af-extended-live-archive-include.php 裏,那個 foreach 裏應該是將已存的 yearTable map 裏的 key (年) 和 value (文章數) 拿出來塞到 sql 到,不知為甚麼吉了。

  36. 14385

    some more clues...

    	$query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, tr.term_taxonomy_id AS `term_taxonomy_id` 
    				FROM $wpdb->posts p
    				INNER JOIN $wpdb->term_relationships tr ON (p.ID = tr.object_id)
    				INNER JOIN $wpdb->term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id)
    				WHERE post_date > 0
    				AND taxonomy = 'category'
    				$exclusions $dojustid
    				ORDER By post_date DESC"; 

    This sql returns no result in my database table. So this is null:
    $this->postToGenerate['new_year']= $results[0]->year;

    When diff year (between file and instant sql result) is empty it will:
    $this->yearTable = array($this->postToGenerate['new_year'] => 0);

    and thus create an key,value pair ""=>0, making $year later on empty.

    I guess they way it should work is at least writing current year (i.e. 2007=>0)

  37. 14767

    Hi Tinyau guy

    thx for your patch, added the info on codex.wordpress.org so it reflects your work

    maybe it would be a good idea if you'd take that plugin over completely and offer a full download with new version number 0.11 beta something?

    The original author seems not to care about it at all and does not even bother to check his own discussion forum on flickr : ELA is not compatible with WP 2.3-beta1 (he's probably too busy with sociology and sucking in California, if we can take his blog seriously, I mean)

  38. 14801

    thank you so much! works perfectly... and brilliantly!

  39. 14835

    Wow, you're an absolute life saver. I spent a good hour trying to figure out why ELA had stopped working (my recent upgrade to 2.3 never entered my mind). Thanks!

  40. 15212


  41. 15213


  42. 15316


    I am using wp2,3,1 version i got

    Fatal error: Call to undefined function: af_ela_create_cache_dir() in /home/blooqle/public_html/wp-content/plugins/af-extended-live-archive/af-extended-live-archive-options.php on line 127

    this error ... i have patched files but still same error ?

    i am using unnamed theme by xu yang ... do you have any advice ?

  43. 15397

    Getting this after applying patch:
    Allowed memory size of 33554432 bytes exhausted (tried to allocate 11 bytes) in /home/reelsmar/public_html/wp-includes/post.php on line 449

    Any ideas?

  44. 15502

    @kemal, I've checked that no function named af_ela_create_cache_dir() is found. Since the distributed ELA should contain the folder cache should in /plugins/af-extended-live-archive/, so no error message will be shown.

    Your problem should be caused by the missing folder cache in /plugins/af-extended-live-archive/. Create cache folder and set its permisssion to 777 should solve your problem.

  45. 15572

    @Stephen, your problem is very weird. This error is appeared when you tried to publish a new post?

  46. 15725

    Thank you for this. It fixed my Wordpress 2.3.2 upgrade. Works fine with K2-rc3 theme.

  47. 16498

    thank you for this. it's perfectly working.
    nice work!

  48. 16852

    having trouble getting this to work. any help would be much appreciated.

    no categories are showing up in the Options ELA panel.
    what is the correct PHP call to use in a page?

    It was working on my blog before I upgraded to wp 2.3.

    Is there a PHP enabling plugin that I should be using?

    Thank you in advance.

  49. 16881

    Hi there, Has there been any updates in getting it to sort categories alphabetically? it appears random at the moment.

  50. 16892

    @K Stone, have you ever use ELA before? To use ELA, first you should create a Page Template with the following sentences.

    Template Name: Archives Template
    if (function_exists('af_ela_super_archive')) {

    Note: The name of Page Template is called "Archives Template"

    Then create a Page in WordPress dashboard to use this template without any content filled in.

  51. 18014

    I just upgraded to 2.3 and ELA was broken. Thank you for this fix - works perfectly!!

  52. 18769

    Thank you so much. Works great with Wordpress 2.5.

  53. 18803

    I don't think ELA works in 2.5. Tim, have you made a post in 2.5 with ELA activated? I got errors. I deactivated ELA, now I can post fine.

    These are the errors:

    Warning: Invalid argument supplied for foreach() in
    /home/xxxxxx/domains/xxxxxx.net/public_html/wp-content/plugins/af-extended-live-archive/af-extended-live-archive-include.php on line
    Warning: Cannot modify header information - headers already sent by (output started at
    /home/xxxxxx/domains/xxxxxx.net/public_html/wp-content/plugins/af-extended-live-archive/af-extended-live-archive-include.php:292) in
    /home/xxxxxx/domains/xxxxxx.net/public_html/wp-includes/pluggable.php on line 689

  54. 18823

    UPDATE: Tim is correct, ELA works great in 2.5! I had a problem with my settings (which hadn't previously been an issue). I tweaked those, emptied the cache and it works great!

  55. 20140

    ELA works fine in 2.5 for me but tags not displayed well. I can see the posts under tags listing, but tags not.

    Any ideas? Thx!

  56. 20148

    Hi, I've tried this plugin with WP 2.5 and it's working. BUT I've noticed that as with the older versions, if i use the ELA plugin, it's not possible to use the possibility of wordpress to use a static front page (in the back-office : Options/write/).

    Any idea ?

  57. 33592

    Thanks for your job.

    It's working on WP 2.6 very well but one problem.
    It shows just 8 categories.

    How can I fix it?

  58. 33679

    I think ELA can't catch categories that made by WP 2.6.

  59. 51129


    It work for my wp 2.7 beta?

  1. 77625 Extended Live Archives fixed for Wordpress 2.3 | Hugh Johnson
  2. 57731 跌跌撞撞,新手装博客 - 蓝色北冰洋
  3. 42123 Blogging Admin | Neptunus Lex
  4. 35302 Utiliser le plugin “Extended Live Archives” avec WordPress 2.6 » article » BLOmiG
  5. 18948 Lots’u-pdates~a — Aja Lapus: Blogging with Standards

Leave a Reply