function asb_build_settings_menu_link()
{
    global $mybb, $lang, $html;
    $settings_url = asb_build_settings_url(asb_get_settingsgroup());
    $settings_link = $html->link($settings_url, $lang->asb_plugin_settings, array("icon" => "{$mybb->settings['bburl']}/inc/plugins/asb/images/settings.gif", "style" => 'font-weight: bold;', "title" => $lang->asb_plugin_settings), array("alt" => 'S', "style" => 'margin-bottom: -3px;'));
    return $settings_link;
}
Exemplo n.º 2
0
function asb_admin_update_theme_select()
{
    // is the group installed?
    $gid = asb_get_settingsgroup();
    if ((int) $gid == 0) {
        flash_message($lang->asb_theme_exclude_select_update_fail, 'error');
        admin_redirect('index.php?module=config-settings');
    }
    global $db, $lang;
    if (!$lang->asb) {
        $lang->load('asb');
    }
    $query = $db->simple_select('settings', '*', "name='asb_exclude_theme'");
    // is the setting created?
    if ($db->num_rows($query) == 0) {
        flash_message($lang->asb_theme_exclude_select_update_fail, 'error');
        admin_redirect('index.php?module=config-settings');
    }
    // update the setting
    require_once MYBB_ROOT . 'inc/plugins/asb/functions_install.php';
    $status = $db->update_query('settings', array("optionscode" => $db->escape_string(asb_build_theme_exclude_select())), "name='asb_exclude_theme'");
    // success?
    if (!$status) {
        flash_message($lang->asb_theme_exclude_select_update_fail, 'error');
    } else {
        flash_message($lang->asb_theme_exclude_select_update_success, 'success');
    }
    admin_redirect(asb_build_settings_url($gid));
}
Exemplo n.º 3
0
function asb_build_settings_link()
{
    global $lang;
    if (!$lang->asb) {
        $lang->load('asb');
    }
    $gid = asb_get_settingsgroup();
    // does the group exist?
    if ($gid) {
        // if so build the URL
        $url = asb_build_settings_url($gid);
        // did we get a URL?
        if ($url) {
            // if so build the link
            return "<a href=\"{$url}\" title=\"{$lang->asb_plugin_settings}\">{$lang->asb_plugin_settings}</a>";
        }
    }
    return false;
}