Geeklog-Core / geeklog

Geeklog - The Secure CMS.
https://www.geeklog.net
25 stars 19 forks source link

Add Media tab in Media Gallery plug-in does not work in Denim Three #1066

Closed hirorongl closed 4 years ago

hirorongl commented 4 years ago

The screen does not change even if you select browser upload, FTP upload, or remote media from the tab menu that selects the upload method.

Sample URL: https://dokokano.domain/mediagallery/admin.php?album_id=2&mode=upload

Geeklog: 2.2.1sr1 MegiaGallery: 1.7.0 Theme: Denim Three

hirorongl commented 4 years ago

UIKit tab cannot handle links

https://yootheme.com/support/question/67740

remove uk-tab

hirorongl commented 4 years ago

Sample

/mediagallery/admin.php : line62 function MG_navbar


function MG_navbar($selected='', $album_id)
{
    global $_CONF, $_MG_CONF, $LANG_MG01, $LANG_MG03;

    include_once $_CONF['path'] . 'system/classes/navbar.class.php';
    $navbar = new navbar;
    $navbar->add_menuitem($LANG_MG01['swfupload_media'], $_MG_CONF['site_url'] . '/admin.php?mode=upload&album_id=' . $album_id);
    $navbar->add_menuitem($LANG_MG01['browser_upload'], $_MG_CONF['site_url'] . '/admin.php?mode=browser&album_id=' . $album_id);
    if (SEC_hasRights('mediagallery.admin')) {
        $navbar->add_menuitem($LANG_MG01['ftp_media'], $_MG_CONF['site_url'] . '/admin.php?mode=import&album_id=' . $album_id);
    }
    $navbar->add_menuitem($LANG_MG01['remote_media'], $_MG_CONF['site_url'] . '/admin.php?mode=remote&album_id=' . $album_id);
    $navbar->set_selected($selected);
    $retval .= $navbar->generate();
    $retval = str_replace('uk-tab', '', $retval);
    return $retval;
}
eSilverStrike commented 4 years ago

By the way, the latest version of Media gallery is 1.7.2.2

We had this issue in the forum but developed a work around for it. Here is the code from the forum to use as an example. It should work for Media Gallery

require_once $_CONF['path_system'] . 'classes/navbar.class.php';
$navbar = new navbar;
$navbar->add_menuitem($LANG_GF06['1'], $_CONF['site_admin_url'] .'/plugins/forum/index.php');
$navbar->set_onclick($LANG_GF06['1'], 'location.href="' . "{$_CONF['site_admin_url']}/plugins/forum/index.php" . '";'); // Added as a fix for the navbar class (since uikit tabs do not support urls)
$navbar->add_menuitem($LANG_GF06['3'], $_CONF['site_admin_url'] .'/plugins/forum/boards.php');
$navbar->set_onclick($LANG_GF06['3'], 'location.href="' . "{$_CONF['site_admin_url']}/plugins/forum/boards.php" . '";'); // Added as a fix for the navbar class (since uikit tabs do not support urls)
eSilverStrike commented 4 years ago

Transferring issue to Media Gallery repository. Please add any new comments about this issue here: https://github.com/Geeklog-Plugins/mediagallery/issues/4