Some have you may of noticed that when the Compactor or ECML custom markup plugin are enabled that most of the plugins don't work properly. This isn't anything to do with Compactor or ECML but rather the individual plugins page handler functions not working correctly. Below you will find patches for all the plugins I have installed. If you have one that isn't working please let me know and I'll update this list.
in blog/status/start.php replace the whole blog_page_handler function with
function blog_page_handler($page) {
// The first component of a blog URL is the username
if (isset($page[0])) {
set_input('username',$page[0]);
}
// The second part dictates what we're doing
if (isset($page[1])) {
switch($page[1]) {
case "read":
set_input('blogpost',$page[2]);
@include(dirname(__FILE__) . "/read.php");
return true;
break;
case "friends":
@include(dirname(__FILE__) . "/friends.php");
return true;
break;
}
// If the URL is just 'blog/username', or just 'blog/', load the standard blog index
} else {
@include(dirname(__FILE__) . "/index.php");
return true;
}
return false;
}
in bookmarks/status/start.php replace the whole bookmarks_page_handler function with
function bookmarks_page_handler($page) {
// The first component of a bookmarks URL is the username
if (isset($page[0])) {
set_input('username',$page[0]);
}
// The second part dictates what we're doing
if (isset($page[1])) {
switch($page[1]) {
case "read": set_input('guid',$page[2]);
@include(dirname(dirname(dirname(__FILE__))) . "/entities/index.php");
return true;
break;
case "friends": @include(dirname(__FILE__) . "/friends.php");
return true;
break;
case "inbox": @include(dirname(__FILE__) . "/inbox.php");
return true;
break;
case "items": @include(dirname(__FILE__) . "/index.php");
return true;
break;
}
// If the URL is just 'bookmarks/username', or just 'bookmarks/', load the standard bookmarks index
} else {
@include(dirname(__FILE__) . "/index.php");
return true;
}
return false;
}
in mod/kaltura/start.php replace the whole kaltura_video_page_handler function with
function kaltura_video_page_handler($page) {
global $CONFIG;
if (isset($page[0])) {
switch ($page[0]) {
case 'all':
case 'friends':
case 'show':
@include(dirname(__FILE__) . "/searchvideos.php");
return true;
break;
case 'recreateobjects':
@include(dirname(__FILE__) . "/recreateobjects.php");
return true;
break;
default:
@include(dirname(__FILE__) . "/index.php");
return true;
}
}
else {
// If the URL is just 'feeds/username', or just 'feeds/', load the standard feeds index
@include(dirname(__FILE__) . "/index.php");
return true;
}
return false;
}
in mod/messages/start.php replace the whole messages_page_handler function with
function messages_page_handler($page) {
// The first component of a messages URL is the username
if (isset($page[0])) {
set_input('username',$page[0]);
}
// The second part dictates what we're doing
if (isset($page[1])) {
switch($page[1]) {
case "read": set_input('message',$page[2]);
@include(dirname(__FILE__) . "/read.php");
return true;
break;
}
// If the URL is just 'messages/username', or just 'messages/', load the standard messages index
} else {
@include(dirname(__FILE__) . "/index.php");
return true;
}
return false;
}
in mod/status/start.php replace the whole status_page_handler function with
function status_page_handler($page) {
// The first component of a status URL is the username
if (isset($page[0])) {
set_input('username',$page[0]);
}
// The second part dictates what we're doing
if (isset($page[1])) {
switch($page[1]) {
case "read": set_input('statuspost',$page[2]);
@include(dirname(__FILE__) . "/read.php");
return true;
break;
case "friends": // TODO: add friends status page here
break;
}
// If the URL is just 'status/username', or just 'status/', load the standard status index
} else {
@include(dirname(__FILE__) . "/index.php");
return true;
}
return false;
}
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
thanks! cheers!
Are these patches for version 1.0 or 1.1?
1 or 1.1 I don't think they changedthe plugins much.
This is a great plugin Oliver, thanks for the contribution! Is it odd that i didnt have to adjust any of the plugins above as they seem to work perfectly ?
The only plugin that didnt work with compactor is KALTURA VIDEO :(
Actually not true :( just realized the status isnt working correctly either.
Great Job again Oliver...
I was reading an older post so didnt see the Kaltura on this page....
Anyhow, Compactor is in, it works GREAT.....the only plugin I cant get working with compactor is STATUS, and i can do with that if i have to...
Thanks again!
ECML Seems to break the bookmark plugin as weel. Just returns to index when you click on a bookmark entry. Can you post a fix for its start.php also please?
Thanks for documenting this
Hey Ollie,
just tried Compactor in combination with Files plugin. Does not work. Especially the files/world.php does not show anything at all.
Any idea of how to solve this?
Thanks though for the great plugin.