Project

General

Profile

Using eXtplorer with Wordpress.

Added by Henrique Ribeiro about 11 years ago

Hi, I'm using eXtplorer with a wordpress page, just adding some lines in includes/init.php file.

Look:
I was putted the extplorer folder inside my website, accessing in mydomain.com/extplorer, but just will to work if I am logged in normal site.

I have a AWS Server in Amazon, and work perfectlly, but in my official website in other server, don't.

The file init.php was editted with the lines bellow Joomla check.

// Don't edit this lines...
if ( !ext_isjoomla() ) {
// login to use eXtplorer: (true/false)
$GLOBALS["require_login"] = true;
} else {
$GLOBALS["require_login"] = false;
}
// Don't edit this lines...

//Integration with wordpress
error_reporting(E_ALL);
$GLOBALS["require_login"] = true;
include('../wp-load.php');
include('../wp-blog-header.php');
if(is_user_logged_in()) {
$user_info = get_userdata(get_current_user_id());
if ( $user_info->user_level <= 1 ) die("<b>Voce precisa de mais poder, volte ao treinamento!</b>");
$GLOBALS["require_login"] = false;
}else{ die("<b>Voce precisa de mais poder, volte ao treinamento!</b>"); }
// End of integration with wordpress