コード例 #1
0
ファイル: comment.inc.php プロジェクト: spacequad/glfusion
/**
 * Plugin function to display a specific comment thread
 * $id      Unique idenifier for item comment belongs to
 * $cid     Comment id to display (possibly including sub-comments)
 * $title   Page/comment title
 * $order   'ASC' or 'DSC' or blank
 * $format  'threaded', 'nested', or 'flat'
 * $page    Page number of comments to display
 * $view    True to view comment (by cid), false to display (by $pid)
 */
function _mg_displaycomment($id, $commentid, $title, $order, $format, $page, $view)
{
    global $_CONF, $_USER, $_MG_CONF, $LANG_LOGIN;
    if (COM_isAnonUser() && $_MG_CONF['loginrequired']) {
        echo SEC_loginRequiredForm();
        exit;
    }
    $retval = '';
    require_once $_CONF['path'] . 'plugins/mediagallery/include/classAlbum.php';
    require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-media.php';
    list($ptitle, $retval, $themeCSS, $album_id) = MG_displayMediaImage($id, 0, 0, 0);
    $retval = $themeCSS . $retval;
    if (SEC_hasRights('mediagallery.admin')) {
        $delete_option = true;
    } else {
        $delete_option = false;
    }
    $view = $view == 1 ? true : false;
    $retval .= CMT_userComments($id, $title, 'mediagallery', $order, $format, $commentid, $page, $view, $delete_option);
    return $retval;
}
コード例 #2
0
ファイル: media.php プロジェクト: spacequad/glfusion
}
$full = 0;
if (isset($_REQUEST['f'])) {
    $full = COM_applyFilter($_REQUEST['f'], true);
}
$mediaObject = 0;
if (isset($_REQUEST['s'])) {
    $mediaObject = COM_applyFilter($_REQUEST['s'], true);
}
$sortOrder = 0;
if (isset($_REQUEST['sort'])) {
    $sortOrder = COM_applyFilter($_REQUEST['sort'], true);
}
$sortID = 0;
if (isset($_REQUEST['i'])) {
    $sortID = COM_applyFilter($_REQUEST['i'], true);
}
$page = 0;
if (isset($_REQUEST['p'])) {
    $page = COM_applyFilter($_REQUEST['p'], true);
}
list($ptitle, $retval, $themeCSS, $album_id) = MG_displayMediaImage($mediaObject, $full, $sortOrder, 1, $sortID, $page);
$themeStyle = MG_getThemeCSS($album_id);
$display = MG_siteHeader($ptitle);
if ($msg != '') {
    $display .= COM_showMessage($msg, 'mediagallery');
}
$display .= $retval;
$display .= MG_siteFooter();
echo $display;
exit;