Jump to content
Sign in to follow this  
jbrouwer

deactive pagelines-buddypress plugin with a hook

Recommended Posts

jbrouwer

Hi, How can I deactivate the pagelines-buddypress plugin with a hook? The reason is that the plugin is not compatible with WP Touch. I would like to let WP Touch handle the mobile version of Buddypress. Thanks!

Share this post


Link to post
Share on other sites
Simon
What do you mean by disable it? Disable the css?

Share this post


Link to post
Share on other sites
Rob
I don't believe you can deactivate the plugin using a hook. Either it's activated or not. In order to use a hook to deactivate, essentially the Buddypress plugin would have to be activated, and the conflict would remain even if you somehow, miraculously deactivated it for mobile view. Perhaps you need a separate install just for Buddypress, so you can have a mobile view that doesn't include that.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Simon
You can disable the css by deregistering it.... http://codex.wordpress.org/Function_Reference/wp_deregister_style

Share this post


Link to post
Share on other sites
jbrouwer
Ok. The WP Touch plugin has an option to deactivate plugins which are not compatible or who you would not need (or like) to use on mobile devices. However, this option does not work for the pagelines-buddypress plugin, probably because the plugin refers to some pagelines code. I read on the WP Touch forum you should manually remove the plugin's hooks (in the wp touch child theme). The buddypress pages turn up white on mobile devices (using wp touch). Could that be a css problem?

Share this post


Link to post
Share on other sites
Simon
I have no idea, you can add a function to the wp-touch child theme to remove the css by deregistering it. If its a white screen is an error_log file written? php usually writes errors to a log file. If not open wp-config.php and enable debug, then try again.

Share this post


Link to post
Share on other sites
jbrouwer
I didn't got a error log before, but this turns up: [quote]Fatal error: Call to a member function build_layout() on a non-object in /public/sites/www.pepperbase.com/wp-content/plugins/pagelines-buddypress/pagelines-buddypress.php on line 121[/quote]

Share this post


Link to post
Share on other sites
jbrouwer
Used this function [code]add_action( 'wp_print_styles', 'my_deregister_styles', 100 ); function my_deregister_styles() { wp_deregister_style( 'plbp-style' ); }[/code] in the wp-touch child theme, but without result. The page is not loading at all, so this is probably not the solution.

Share this post


Link to post
Share on other sites
jbrouwer
Sometimes it is a blank screen and sometimes I get this error: [quote]Fatal error: Call to a member function build_layout() on a non-object in /public/sites/www.pepperbase.com/wp-content/plugins/pagelines-buddypress/pagelines-buddypress.php on line 121[/quote]

Share this post


Link to post
Share on other sites
Simon
Right, reason this is happening, the plugin assumes you have PAgeLines framework installed and active as it needs functions to run. You mobile theme is switching themes on the fly, so the theme files are not available to the plugin. I will add a new version tomorrow to check PL is the actual active theme.

Share this post


Link to post
Share on other sites
jbrouwer
Hi, I forgot about this problem, but the error still appears if I let wp touch handle the buddypress pages. Could this be fixed the way Simon suggested (on feb 6...).

Share this post


Link to post
Share on other sites
Danny
Hi, I will bring this to Simon's attention for you.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Simon
try this: http://paste.pagelines.com/6zu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×