JTable::addIncludePath($base_path . DS . 'tables');
    }
    $model_pathes[] = $base_path . DS . 'models';
    $view_pathes[] = $base_path . DS . 'views';
    if ($show_debug_info) {
        echo 'extension<pre>', print_r($extension, true), '</pre><br>';
        echo 'extensionpath<pre>', print_r($extensionpath, true), '</pre><br>';
        echo 'base_path<pre>', print_r($base_path, true), '</pre><br>';
        echo 'controller<pre>', print_r($controller, true), '</pre><br>';
        echo 'model_pathes<pre>', print_r($model_pathes, true), '</pre><br>';
        echo 'view_pathes<pre>', print_r($view_pathes, true), '</pre><br>';
    }
}
// normale extension ende
// overlay extension anfang
$arrExtensions = JoomleagueHelper::getExtensionsOverlay(JRequest::getInt('p'));
for ($e = 0; $e < count($arrExtensions); $e++) {
    $extension = $arrExtensions[$e];
    $extensionpath = JLG_PATH_SITE . DS . 'extensions-overlay' . DS . $extension;
    // include file named after the extension for specific includes for examples
    if (file_exists($extensionpath . DS . $extension . '.php')) {
        //e.g example.php
        require_once $extensionpath . DS . $extension . '.php';
    }
    if ($app->isAdmin()) {
        $base_path = $extensionpath . DS . 'admin';
        // language file
        $lang->load('com_joomleague_' . $extension, $base_path);
    } else {
        $base_path = $extensionpath;
        //language file