The support forums have a new home! Please visit All in One SEO Pack's new residence at Semper Plugins to purchase a support plan.
Topic RSS
8:49 am
August 28, 2010
OfflineHello,
There seems to be a certain bug in the SEO pack where the title of a page/post/etc would not update when GZIP is enabled. After some hours of debugging I found a fix; perhaps I can help someone else out with posting the fix here.
In aioseop.class.php, find the function replace_title. Replace it with the following;
$clean_content = $this->gzdecode($content);
$len_start = strlen('<title>');
$len_end = strlen('</title>');
$start = strpos($clean_content, '<title>');
$end = strpos($clean_content, '</title>');
$this->title_start = $start;
$this->title_end = $end;
$this->orig_title = $title;
if($start && $end) {
$clean_content = substr($clean_content, 0, $start + $len_start) . $title . substr($clean_content, $end);
}
return gzencode($clean_content);
}
You'll also need the gzdecode function, which can be found on the following page;
http://php.net/manual/en/funct…..decode.php
Look in the comments. Add this function to the class.
I can't guarantee this will work on any site, but it works on mine so I'm happy.
Cheers,
Sander
Most Users Ever Online: 205
Currently Online:
36 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
romiojuliat: 102
yaoming987: 50
jintuy: 50
miki1986: 33
newshow: 28
karen1234: 27
Member Stats:
Guest Posters: 0
Members: 6356
Moderators: 3
Admins: 4
Forum Stats:
Groups: 5
Forums: 23
Topics: 1546
Posts: 3450
Newest Members: carofern@cisco.com, pronto, jessie, pbaylies, ninaeast, freda
Moderators: davecashmore (2), aaron (5), tempadmin (0)
Administrators: WordPress Professional (442), hallsofmontezuma (202), onefinejay (10), stevemortiboy (4)




Log In
Home


