function wppa_get_lbtitle($type, $id)
{
    if (!is_numeric($id) || $id < '1') {
        wppa_dbg_msg('Invalid arg wppa_get_lbtitle( ' . $id . ' )', 'red');
    }
    $thumb = wppa_cache_thumb($id);
    $do_download = wppa_is_video($id) ? false : wppa_switch('art_monkey_on_lightbox');
    if ($type == 'xphoto') {
        $type = 'mphoto';
    }
    $do_name = wppa_switch('ovl_' . $type . '_name') || wppa_switch('ovl_add_owner');
    $do_desc = wppa_switch('ovl_' . $type . '_desc');
    $do_sm = wppa_switch('share_on_lightbox');
    $result = '';
    if ($do_download) {
        if (wppa_opt('art_monkey_display') == 'button') {
            $result .= '<input' . ' type="button"' . ' title="' . __('Download', 'wp-photo-album-plus') . '"' . ' style="cursor:pointer; margin-bottom:0px; max-width:500px;"' . ' class="wppa-download-button wppa-ovl-button"' . ' onclick="wppaAjaxMakeOrigName( ' . wppa('mocc') . ', \'' . wppa_encrypt_photo($id) . '\' );"' . ' value="' . rtrim(__('Download', 'wp-photo-album-plus') . ' ' . wppa_get_photo_name($id, wppa_switch('ovl_add_owner'), false, false, wppa_switch('ovl_' . $type . '_name'))) . '"' . ' />';
        } else {
            $result .= '<a' . ' title="' . __('Download', 'wp-photo-album-plus') . '"' . ' style="cursor:pointer;"' . ' onclick="wppaAjaxMakeOrigName( ' . wppa('mocc') . ', \'' . wppa_encrypt_photo($id) . '\' );"' . ' >' . rtrim(__('Download', 'wp-photo-album-plus') . ' ' . wppa_get_photo_name($id, wppa_switch('ovl_add_owner'), false, false, wppa_switch('ovl_' . $type . '_name'))) . '</a>';
        }
    } else {
        if ($do_name) {
            $result .= wppa_get_photo_name($id, wppa_switch('ovl_add_owner'), false, false, wppa_switch('ovl_' . $type . '_name'));
        }
    }
    if ($do_name && $do_desc) {
        $result .= '<br />';
    }
    if ($do_desc) {
        $result .= wppa_get_photo_desc($thumb['id']);
    }
    if (($do_name || $do_desc) && $do_sm) {
        $result .= '<br />';
    }
    if (wppa_opt('rating_max') != '1' && wppa_opt('rating_display_type') == 'graphic') {
        $result .= wppa_get_rating_range_html($id, true);
    } elseif (wppa_opt('rating_display_type') == 'likes' && wppa_switch('ovl_rating')) {
        $result .= wppa_get_slide_rating_vote_only('always', $id, 'is_lightbox');
    }
    if ($do_sm) {
        $result .= wppa_get_share_html($thumb['id'], 'lightbox');
    }
    if (wppa_may_user_fe_edit($id)) {
        if ($type == 'slide') {
            $parg = esc_js('\'' . wppa_encrypt_photo($id) . '\'');
        } else {
            $parg = '\'' . wppa_encrypt_photo($id) . '\'';
        }
        if (wppa_opt('upload_edit') == 'classic') {
            $result .= '
			<input' . ' type="button"' . ' style="float:right; margin-right:6px;"' . ' class="wppa-ovl-button"' . ' onclick="' . ($type == 'slide' ? '_wppaStop( ' . wppa('mocc') . ' );' : '') . 'wppaEditPhoto( ' . wppa('mocc') . ', ' . $parg . ' );"' . ' value="' . esc_attr(__(wppa_opt('fe_edit_button'))) . '"' . ' />';
        }
    }
    $result = esc_attr($result);
    return $result;
}
function wppa_slide_rating_vote_only($opt, $id = '0', $is_lightbox = false)
{
    wppa_out(wppa_get_slide_rating_vote_only($opt, $id, $is_lightbox));
}