Recent Topics

1 Mar 01, 2011 04:26    

My b2evolution Version: 4.0.3

I'm not really sure what to call it but I think I can explain it well enough to get a straight answer ;)

I want to check to make sure a plugin is installed and if it is I want my skin to display a block of code. I just need to know if its possible and what the code should be for my * if * ...

if (plugin_installed($plugin_name))
{
	// display the code required
}

I figure there probably is something like that I can use to completely hide sidebar content blocks if the required plugin isn't installed ... not to mention other uses ;)

2 Mar 01, 2011 05:08

if( ($MyPlugin= $GLOBALS['Plugins']->get_by_code('whatever')) !== false )
{
	if( $MyPlugin->status == 'enabled' )
	{	//plugin is enabled
             //Do something
	}

}

3 Mar 01, 2011 06:01

Thank you very much :D

It looks like exactly what I need, do you know of any examples I could look at to fully understand the code?

4 Mar 01, 2011 09:06

if( ($PingPlugin= $GLOBALS['Plugins']->get_by_code('ping_b2evonet')) !== false )
{
	if( $PingPlugin->status == 'enabled' )
	{	
             echo "you have b2evolution ping plugin installed.";
	}

}


Form is loading...