Fixing LiveCalendar v1.8.5
Lunedì, 6 Novembre 2006 19:55
I found out a bug in v1.8.5 of LiveCalendar that prevents it from displaying the archives paths correctly when you have installed WordPress in a subdirectory of its own while your blog is placed in the root instead (i.e. when you have 2 different URIs in “WordPress address” and “Blog address” of the “General Options” of your blog).
Here’s an easy and rapid way to fix the problem (lines numbers refer to version 1.8.5 only):
- open up the “kcalendarscript.php” script found in the archive with your favorite text-editor;
- locate line 98 where php ‘$siteurl’ variable is defined and add this new line right after it :
$sitehome = get_settings('home'); - locate line 138 (137 before edit above) where js ’siteurl’ variable is defined and add this new line right after it :
var sitehome = '$sitehome'; - on line 408 (406 before edits above) replace the ’siteurl’ variable with the just created ’sitehome’ one, so that the new line looks like this:
el2.href = sitehome + permastruct; - on line 422 (420 before edits) replace the ’siteurl’ variable like you’ve just done it a while ago:
el2.href = sitehome + m_permastruct; - save the file and upload it in the usual “wp-content/plugins/livecalendar” folder and you’re done!
Now fully enjoy this nice and powerful plugin!