Hacking Extended Live Archives plugin to support multisite installations

Since I´m running a couple blogs on one wordpress installation I noticed today, that ELA doesn’t work well in this environment. Since it uses only one cache directory the archive is mixed up with all these articles.

I was digging around and noticed, that only 3 values in 3 files are related. So decided to make use of ‘$_SERVER["SERVER_NAME"]‘ to have unique cache directories.

Here comes the patch:

diff -Nur orig/af-extended-live-archive-options.php af-extended-live-archive-options.php
--- orig/af-extended-live-archive-options.php 2006-02-22 19:06:00.000000000 +0100
+++ af-extended-live-archive-options.php 2006-05-26 22:47:28.000000000 +0200
@@ -7,7 +7,7 @@
*/

include_once(ABSPATH . WPINC . '/class-snoopy.php');
-$af_ela_cache_root = ABSPATH . 'wp-content/af-extended-live-archive/';
+$af_ela_cache_root = ABSPATH . 'wp-content/af-extended-live-archive/' . $_SERVER["SERVER_NAME"] .’/';

function af_ela_info($show=”) {
switch($show) {
diff -Nur orig/af-extended-live-archive.php af-extended-live-archive.php
— orig/af-extended-live-archive.php 2006-02-19 15:26:00.000000000 +0100
+++ af-extended-live-archive.php 2006-05-26 22:47:35.000000000 +0200
@@ -13,7 +13,7 @@
// | http://www.sonsofskadi.net/wp-content/elalicenses.txt |
// +———————————————————————-+
*/
-$af_ela_cache_root = ABSPATH . ‘wp-content/af-extended-live-archive/’;
+$af_ela_cache_root = ABSPATH . ‘wp-content/af-extended-live-archive/’ . $_SERVER["SERVER_NAME"] .’/';
$debug = false;
$utw_is_present = false;

diff -Nur orig/includes/af-ela.php includes/af-ela.php
— orig/includes/af-ela.php 2006-04-28 14:07:00.000000000 +0200
+++ includes/af-ela.php 2006-05-26 22:46:33.000000000 +0200
@@ -397,7 +397,7 @@
$paged_post = 0;

// the paths for the cache files and settings
- $path = ABSPATH . ‘wp-content/af-extended-live-archive/’;
+ $path = ABSPATH . ‘wp-content/af-extended-live-archive/’ . $_SERVER["SERVER_NAME"] .’/';
if (!is_dir($path)) $path = get_settings(’siteurl’) . ‘/wp-content/af-extended-live-archive/’;

// get settings and construct default;

Creative Commons License
The Hacking Extended Live Archives plugin to support multisite installations by Cyconet Blog, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at blog.waja.info.

1 Response to “Hacking Extended Live Archives plugin to support multisite installations”


  1. 1 cyco

    I did also send the patch to Arnaud and got the following reply:

    That’s a very goo dpoint you raised and I will integrate the patch. As for when I am not sure since unfortunatly. I’ll try to let you know.

Leave a Reply




Too Cool for Internet Explorer